fix: add deepseek-v4-flash-0731 alias and fix config discovery skipping commented lines

- Add MANUAL_MONITORED_MODEL_ALIASES entry for
  deepseek-v4-flash-0731 -> deepseek-v4-flash-ga-260731,
  since VolcEngine resource pack uses MMDD format while
  upstream model name uses -ga-YYMMDD (inconsistent naming).

- Fix config.yaml auto-discovery to skip lines starting with '#',
  preventing commented-out api_base lines from leaking into the
  currently-open entry and misclassifying non-VolcEngine models.
  This was causing deepseek-v4-flash (via NEWAPI) to be falsely
  detected as a monitored VolcEngine model.
This commit is contained in:
root
2026-08-09 14:21:46 +00:00
parent 43f1cc302a
commit 1e63653f52
+10
View File
@@ -99,6 +99,9 @@ MANUAL_MONITORED_MODEL_ALIASES = {
"doubao-seed-code": "doubao-seed-code-preview-251028",
"doubao-seed-translation": "doubao-seed-translation-250915",
"doubao-seed-2-0-code": "doubao-seed-2-0-code-preview-260215",
# 火山资源包名用 MMDD(deepseek-v4-flash-0731),上游模型名用 -ga-YYMMDD(-ga-260731),
# 两者不一致,必须手工映射,否则资源包会被 "Not in monitored models" 跳过。
"deepseek-v4-flash-0731": "deepseek-v4-flash-ga-260731",
}
# Auto-discovered monitored upstream models and endpoint pairs from config.yaml
@@ -884,6 +887,13 @@ def active_monitor_loop():
for line in lines:
sline = line.strip()
# Skip commented lines (YAML comments). Otherwise commented-out
# api_base lines (e.g. a disabled model block) leak into the
# currently-open entry and can misclassify a NewAPI entry as
# VolcEngine.
if sline.startswith("#"):
continue
# Start of a new model definition
if sline.startswith("- model_name:"):
# Commit previous entry if valid