mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-01 17:10:24 +08:00
feat: support comma-separated AI_MODEL for quick multi-model setup (#870)
Users expected setting AI_MODEL to a comma-separated list to expose multiple models in the picker, but the value was used verbatim as a single model id, leaving the picker with only the "Server Default" fallback. Add a third-priority fallback in loadEnvServerModelsConfig: when AI_MODELS_CONFIG and ai-models.json are both absent, AI_MODEL contains a comma, and AI_PROVIDER is set to a known provider, synthesize an equivalent ServerModelsConfig with the provider's models trimmed, deduplicated, and the first marked as default. Also makes getAIModel and getValidationModel pick the first comma-split value when falling back to AI_MODEL, so requests started before the client picker hydrates still resolve to a real model id. Docs (en/cn/ja) and env.example updated; tests cover the new fallback plus the no-comma / no-AI_PROVIDER negative cases.
This commit is contained in:
@@ -216,7 +216,7 @@ AWS BedrockとOpenRouter以外のすべてのプロバイダーはカスタム
|
||||
|
||||
### サーバーサイドマルチモデル設定
|
||||
|
||||
管理者は、ユーザーが個人のAPIキーを提供することなく利用できる複数のサーバーサイドモデルを設定できます。`AI_MODELS_CONFIG` 環境変数(JSON文字列)または `ai-models.json` ファイルで設定します。
|
||||
管理者は、ユーザーが個人のAPIキーを提供することなく利用できる複数のサーバーサイドモデルを設定できます。`AI_MODELS_CONFIG` 環境変数(JSON文字列)または `ai-models.json` ファイルで設定します。同一プロバイダー内の複数モデルだけが必要な場合は、`AI_MODEL` にカンマ区切りでモデルIDを列挙する簡易設定も使えます。
|
||||
|
||||
**モデル要件**:このタスクは厳密なフォーマット制約(draw.io XML)を持つ長文テキスト生成を伴うため、強力なモデル機能が必要です。Claude Sonnet 4.5、GPT-5.1、Gemini 3 Pro、DeepSeek V3.2/R1を推奨します。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user