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.
1.3 KiB
1.3 KiB
管理面板
无需手动编辑 .env,您可以在 Web 管理面板中管理服务端设置。
启用面板
- 设置
ADMIN_PASSWORD环境变量(不设置则面板禁用)。 - 访问
/admin并登录。
可配置内容
- Models(模型) — 添加提供商及其 API Key 和模型列表,凭据输入框与应用内的模型设置相同。保存后这些模型成为所有用户可用的服务端模型,并在请求时与环境中的
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_*变量在构建时固化,无法在面板中修改。