mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 14:22:28 +08:00
feat: add OpenRouter support and fix input disabling
- Add OpenRouter provider support with @openrouter/ai-sdk-provider - Fix input not disabling during 'submitted' state for fast providers - Apply disable logic to all interactive elements (textarea, buttons, handlers) - Clean up env.example by removing model examples and separator blocks - Upgrade zod to v4.1.12 for compatibility with ollama-ai-provider-v2 - Add debug logging for status changes in chat components
This commit is contained in:
55
env.example
55
env.example
@@ -1,83 +1,34 @@
|
||||
# AI Provider Configuration
|
||||
# Choose your AI provider and model
|
||||
|
||||
# AI_PROVIDER: Which provider to use
|
||||
# Options: bedrock, openai, anthropic, google, azure, ollama
|
||||
# Options: bedrock, openai, anthropic, google, azure, ollama, openrouter
|
||||
# Default: bedrock
|
||||
AI_PROVIDER=bedrock
|
||||
|
||||
# AI_MODEL: The model ID for your chosen provider (REQUIRED)
|
||||
# See examples below for each provider
|
||||
AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0
|
||||
|
||||
# ===========================================
|
||||
# AWS Bedrock Configuration
|
||||
# ===========================================
|
||||
# AWS_REGION=us-east-1
|
||||
# AWS_ACCESS_KEY_ID=your-access-key-id
|
||||
# AWS_SECRET_ACCESS_KEY=your-secret-access-key
|
||||
|
||||
# Popular Bedrock Models (Claude via Bedrock):
|
||||
# - global.anthropic.claude-sonnet-4-5-20250929-v1:0 (Latest Claude Sonnet 4.5)
|
||||
# - anthropic.claude-sonnet-4-20250514-v1:0 (Claude Sonnet 4)
|
||||
# - anthropic.claude-3-7-sonnet-20250219-v3:0 (Claude 3.7 Sonnet)
|
||||
# - anthropic.claude-3-5-haiku-20241022-v1:0 (Claude 3.5 Haiku)
|
||||
|
||||
# ===========================================
|
||||
# OpenAI Configuration
|
||||
# ===========================================
|
||||
# OPENAI_API_KEY=sk-...
|
||||
# OPENAI_ORGANIZATION=org-... # Optional
|
||||
# OPENAI_PROJECT=proj_... # Optional
|
||||
|
||||
# Popular OpenAI Models:
|
||||
# - gpt-5 (GPT-5)
|
||||
# - gpt-4o (GPT-4 Optimized)
|
||||
# - gpt-4-turbo (GPT-4 Turbo)
|
||||
# - o1 (Reasoning model)
|
||||
# - o3 (Reasoning model)
|
||||
# - o4 (Reasoning model)
|
||||
|
||||
# ===========================================
|
||||
# Anthropic (Direct) Configuration
|
||||
# ===========================================
|
||||
# ANTHROPIC_API_KEY=sk-ant-...
|
||||
|
||||
# Popular Anthropic Models:
|
||||
# - claude-sonnet-4-5 (Latest Claude Sonnet 4.5)
|
||||
# - claude-haiku-4-5 (Claude Haiku 4.5)
|
||||
# - claude-opus-4-1 (Claude Opus 4.1)
|
||||
# - claude-3-7-sonnet-latest (Claude 3.7 Sonnet)
|
||||
# - claude-3-5-haiku-latest (Claude 3.5 Haiku)
|
||||
|
||||
# ===========================================
|
||||
# Google Generative AI Configuration
|
||||
# ===========================================
|
||||
# GOOGLE_GENERATIVE_AI_API_KEY=...
|
||||
|
||||
# Popular Google Models:
|
||||
# - gemini-2.5-pro (Gemini 2.5 Pro)
|
||||
# - gemini-2.5-flash (Gemini 2.5 Flash)
|
||||
# - gemini-2.0-flash (Gemini 2.0 Flash)
|
||||
# - gemini-1.5-pro (Gemini 1.5 Pro)
|
||||
# - gemini-1.5-flash (Gemini 1.5 Flash)
|
||||
# - gemini-1.5-flash-8b (Gemini 1.5 Flash 8B)
|
||||
|
||||
# ===========================================
|
||||
# Azure OpenAI Configuration
|
||||
# ===========================================
|
||||
# AZURE_RESOURCE_NAME=your-resource-name
|
||||
# AZURE_API_KEY=...
|
||||
|
||||
# Azure Model Configuration:
|
||||
# Use your deployment name (not the model ID)
|
||||
# Example: if you deployed GPT-4 as "my-gpt4-deployment"
|
||||
# AI_MODEL=my-gpt4-deployment
|
||||
|
||||
# ===========================================
|
||||
# Ollama (Local) Configuration
|
||||
# ===========================================
|
||||
# OLLAMA_BASE_URL=http://localhost:11434/api # Optional, defaults to localhost
|
||||
|
||||
# IMPORTANT: This app requires models that support tool calling (v2 specification)
|
||||
# Note: Models must be installed locally with `ollama pull <model-name>`
|
||||
# OpenRouter Configuration
|
||||
# OPENROUTER_API_KEY=sk-or-v1-...
|
||||
|
||||
Reference in New Issue
Block a user