Cline answers a free model's daily cap with 429 "Daily free limit reached
on model X. Try again in 23h 59m". failure() reads "daily" as quota, so
the whole key rested for 15 minutes and every other free model on the
account was refused without being asked; the reporter saw the account
sent to the back of the list after one model's limit.
The limit is per model by Cline's own words, and Cline's client treats it
so (CLINE_FREE_MODEL_LIMIT_MARKER "free limit reached on model" and the
"try again in" reset parse in cline/cline sdk errors.ts). So for a Cline
provider (ClinePinnable: ClinePass, a cline.bot host, the Cline plugin)
that refusal now rests restID() (that model) for the time it names
(By "resets"). Another vendor's same words, and a Cline 429 that doesn't
name a model's limit (5-hour/weekly, "Rate limit exceeded"), rest the key
as before. No per-provider toggle: it would make account-wide 429s hit
the account once per model, the risk-control pattern the gateway avoids.
The Cline plugin's "usage limit reached: <body>" keeps the words (checked
with node on its failure() for all three body shapes), so moved users get
it too with no plugin change.
Run on 95e7c6bcc (origin/main) + this change:
- gofmt -l internal/gateway: empty. GOOS=darwin, linux and windows
go vet -tags nogui ./internal/gateway/: ok. Before the rebase (at
69d7ee33a) also go vet ./... for darwin, linux nogui and windows, and
darwin, linux nogui and windows builds: ok.
- Full suite: SUITE_LINE
- internal/gateway package: left to the batch suite. At 69d7ee33a the
first full run was green in every other package and red in gateway only
through the leak below (fixed since); later runs died on a pruned
shared cache, a 30m timeout under load ~100, and a kill for disk.
- go test -run 'TestCline' with -count=3 -shuffle=on: ok (at 69d7ee33a).
- Broken by hand: with routing.go at HEAD both new tests fail; the
end-to-end one answers mimo with 429 "ClinePass: Daily free limit ...
(out of its allowance: not asked again before ...)", the reporter's
symptom. With the duration parse off: "rests 14m59s by quota, want
23h59m by resets".
- The first full run caught the new test's rest leaking through
restingUntil into TestClinePinsDeepSeek; the test now clears it on
cleanup.
Not tried against a real Cline account (none here); the fixture is the
literal message from Cline's own tests.