feat(Claude): 将范围超出/信用拒绝情况转移到请求的模型(仅限订阅切换)
作者: hank-warren创建于 2026年9月17日更新于 2026年9月17日
标签Fixed
Summary On a Claude OAuth credential where usage credits (overage) are enabled but the org spend cap is reached, a 429 for a model that can only be served from overage cools down the entire credential for the upstream Retry-After (33.7h in my case), even though the same credential is still healthy and serving on its included subscription allowance. I'd like a toggle to keep CPA on subscription allowance only — never spending usage credits, and never generalizing an overage-only rejection to the whole credential. Version: v7.3.6 (Docker eceasy/cli-proxy-api:v7.3.6). ### What happens A Claude-fable-5-1 request landed on a team-plan credential. Fable on that org can only be served from overage, so Anthropic returned 429 with these unified headers: Anthropic-Ratelimit-Unified-Status = rejected Anthropic-Ratelimit-Unified-Representative-Claim = seven_day_overage_included Anthropic-Ratelimit-Unified-7d-Status = allowed <-- included weekly is fine Anthropic-Ratelimit-Unified-7d-Utilization = 0.69 Anthropic-Ratelimit-Unified-5h-Utilization = 0.00 Anthropic-Ratelimit-Unified-7d_oi-Status = rejected Anthropic-Ratelimit-Unified-7d_oi-Utilization = 1.02 Anthropic-Ratelimit-Unified-Overage-Status = rejected Anthropic-Ratelimit-Unified-Overage-Disabled-Reason = org_spend_cap_reached Retry-After = 121180 CPA recorded a model-scoped cooldown for Claude-fable-5-1 (correct) **and** a credential-level next_retry_after 33.7h out, which set unavailable: true on the credential. From GET /v0/management/auth-files: ```json { "account": "…", "unavailable": true, "status": "error", "next_retry_after": "2026-09-19T09:00:13+08:00", "cooldowns": [{ "scope": "model", "model_key": "Claude-fable-5-1", "reason": "quota", "http_status": 429 }] } The credential then served no model at all — Opus and Sonnet included — for the full window. ### Why that's wrong here I called api.Anthropic.com/v1/messages directly with the same credential while CPA had it benched: POST /v1/messages model=Claude-opus-4-5-20251101 -> HTTP 200 Anthropic-ratelimit-unified-status = allowed Anthropic-ratelimit-unified-representative-claim = five_hour Anthropic-ratelimit-unified-7d-status = allowed (0.69 utilization) Anthropic-ratelimit-unified-overage-status = rejected (org_spend_cap_reached) The representative claim — and therefore the unified status — depends on which window the requested model draws from. For an overage-only model it is seven_day_overage_included and rejected; for a subscription-served model it is five_hour and allowed. So a credential-level Retry-After taken from an overage-only rejection does not describe the credential. ### Requested behavior Either or both, off by default: 1. Claude.model-level-cooling — the Claude counterpart …
内容来源: router-for-me/CLIProxyAPI