fix: merge env AI_MODELS_CONFIG with admin panel providers

Previously, saving in the admin panel wrote a complete AI_MODELS_CONFIG
into settings.json, which (by overlay precedence) replaced any config
from .env or ai-models.json — admins lost their env-configured models.

The panel no longer writes AI_MODELS_CONFIG. Instead its providers are
merged with the env baseline at read time in loadRawServerModelsConfig,
and panel credentials go to ADMIN_-prefixed env vars wired up via
apiKeyEnv/baseUrlEnv so they never shadow standard vars. Env-based
providers now appear read-only in the panel, name clashes are rejected,
and a panel default overrides the env default. data/ is now gitignored.
This commit is contained in:
dayuan.jiang
2026-06-11 13:44:38 +09:00
parent a90a87355b
commit 8ca628a872
7 changed files with 359 additions and 109 deletions

3
.gitignore vendored
View File

@@ -76,3 +76,6 @@ ai-models.json
# local backups
*.bak
.gstack/
# admin panel settings (contains secrets)
data/