mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-08 18:57:47 +08:00
Tabs Models, General, Drawing and About, each with a fixed title row. The models tab becomes three pages: the user's providers with one status each and the server's models; a searchable picker of all 24 providers in four groups; and a provider page in three steps (connection, models, test). A new provider gets its first suggested model, and a passing test offers to use the model in the chat. Bedrock asks for one way of signing in, with an optional session token for temporary access keys. The composer's model picker lists every model, marking untested and failed ones, and can open the provider picker. A chat error that offers model settings opens the provider the request went to.
2.0 KiB
2.0 KiB
管理パネル
.env を手動で編集する代わりに、Web 管理パネルでサーバー設定を管理できます。
パネルの有効化
ADMIN_PASSWORD環境変数を設定します(未設定の場合、パネルは無効になります)。/adminにアクセスしてサインインします。
設定できる項目
- Models(モデル) — プロバイダーの API キーとモデルリストを追加します(認証情報の入力欄はアプリ内のモデル設定と同じです)。保存するとそれらは全ユーザーが利用できるサーバーサイドモデルになり、リクエスト時に環境の
AI_MODELS_CONFIG/ai-models.jsonとマージされます(パネルがこれらの環境ファイルを変更することはありません)。 - その他のセクション — アクセスコード、生成パラメータ、機能、可観測性、クォータ。保存された設定は
data/settings.jsonに書き込まれ、即座に反映されます — 再起動は不要です(Langfuse や DynamoDB など一部の設定は「再起動が必要」と表示されます)。
優先順位
パネルで保存された設定は環境変数を上書きし、環境変数は組み込みのデフォルト値を上書きします。保存した値を削除すると環境変数にフォールバックします。
注意事項
- シークレットは
data/settings.jsonに平文で保存されます(ファイルモード 600)。このファイルは非公開に保ってください。 - サーバーレスプラットフォーム(Vercel、Cloudflare Workers)には永続ディスクがないため、パネルは読み取り専用です — その環境では環境変数で設定してください。
- Docker 使用時は、
data/ディレクトリがdocker-compose.ymlのボリュームで永続化されます。 NEXT_PUBLIC_*変数はビルド時に固定され、パネルでは変更できません。