mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-27 16:07:02 +00:00
P2-2/P2-4/P2-5 from review: - validateLinkedAccount/revalidateLinkedAccount now check monitorAccountQuotaCapability after the platform match, blocking combos that would permanently error at runtime: deepseek coding and custom-domain kimi coding (no quota endpoint), zhipu payg (no balance endpoint), anthropic/openai API-Key accounts (usage query requires oauth; anthropic setup-token still allowed via local estimation). gemini/grok/antigravity stay permissive. Quota mode surfaces CHANNEL_MONITOR_ACCOUNT_NOT_SUPPORTABLE on edit; probe mode silently unbinds (same as platform mismatch). - applyMonitorUpdate re-runs validateCheckMode on the effective provider+check_mode whenever either field is patched, so a provider-only update can no longer persist antigravity+probe (the check is conditioned on provider/check_mode presence so legacy illegal rows can still be renamed/disabled). - normalizeMonitorPrimaryModel only substitutes the "quota" placeholder for pure quota mode; quota_probe with an empty model now fails with MissingPrimaryModel instead of probing model="quota". The quota branch also moves ahead of the grok default, so grok+quota now gets "quota" rather than "grok-4.5" (review L-item). Tests: capability matrix (15 cases incl. anti-over-blocking rows), linked-account wiring, revalidate quota/probe split, provider-only update bypass + legacy-row rename, quota_probe missing-model create, normalize matrix.