mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-11-07 09:47:23 +00:00
生产现网发现(issue #1 排查):billing.rules 里一条指向 https://opencode.ai/inference/v1 的规则,在该源 base_url 变成 .../inference/openai/v1 之后匹配不到任何源;严格编译因此让**整个** profile 不生效 —— 账单恒 0、unpriced_reqs 涨到 3.7 万,唯一痕迹是一行启动日志。 - 严格编译失败时降级为 lenient:应用能匹配的规则,其余按 profile default; - 日志用 ERROR 点名**具体哪条 URL** 写错(新增 billing.UnmatchedRuleURLs), 并说明未匹配流量的记账去向; - 判据 TestBillingStaleRuleURLStillAppliesOtherRules:一条过期规则 + 一条有效 规则 ⇒ 有效规则必须仍然生效。