v0.1.3817 and the fixes after it scoped Fable's quota refusals ("hit your
limit", "reached your Fable limit") to Fable. A plain 429 rate_limit_error
is failRate, and restAfterMarked rested the whole account for it, with its
backoff ladder and sink: Fable rate limited showed "限流 · 42 分钟后恢复" on
the account's Opus row too.
claudeModelRate: a Claude account's failRate that names no window that
counts every model (5-hour, session, weekly, usage limit, organization,
overage, or a representative-claim header of five_hour/seven_day) rests
that model only, in restAfterMarked, rateRest and the sink. Anthropic counts
rate limits per model. Quota refusals and account windows rest the account
as before. Messages, Chat Completions, Responses, groups and the Routing
rows share restAfter.
No real Fable 429 was available: ~/.config/magpie/usage.jsonl, rests.json
and app.log hold none, and Claude Code's bridge keeps no response headers,
so the rule is not checked against real anthropic-ratelimit-unified-*
headers. The account-wide limit the logs do hold ("You've hit your weekly
limit · resets 2pm") is in the test and still rests the account.
Cost if the guess is wrong (Anthropic applies a plain 429 to the whole
account): the next Opus request to that account gets its own 429, rests
Opus there, and falls over to the next account in the same client request,
as any rested candidate does; the user sees no error. One extra refused
request per model per rest. The test checks Opus's own rest and that
Fable's stays and a second account is not resting.
Run at this tree (mote): TestClaudeModelRateRestsThatModelOnly red with
claudeModelRate returning false (account rests, Model empty), green with
it; TestFallback* ok; gofmt. Package internal/gateway and internal/provider
run, and vet on darwin, linux and windows, were still running at commit;
results follow. Not tried: a real Fable-limited account.