From 1e63653f52e49d0ff8a0a7ab1e4166d11cd6e636 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 Aug 2026 14:21:46 +0000 Subject: [PATCH] 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. --- volc_limit_sync.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/volc_limit_sync.py b/volc_limit_sync.py index 3b64189..265ecb0 100644 --- a/volc_limit_sync.py +++ b/volc_limit_sync.py @@ -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