Commit Graph
2 Commits
Author SHA1 Message Date
yetone 42216ea609 gateway, gui: one model out of its pool rests on that model's rows only, not on the account's other models (#1960, WardLu)
An Antigravity account out of its Claude & GPT pool (claude-opus-5.5
refused until Sunday) rests that model alone: the gateway keys the rest
by restID and still sends gemini-3.8-flash, in its own pool, to the
account. Routing's page didn't know a rest could be one model's: it
kept rests by key or account, so the stage marked the account's
gemini-3.8-flash row "quota used up · back at Sun 17:53", and the row
under Accounts and keys said the whole account was out.

- gateway: Rest.Model names the model a rest is for when it rests by
  restID (a pool, a model not served, a paid model beside free ones);
  "" for an account- or key-wide rest.
- routing.js: restModel reads it (or, for a kept request from before,
  the model on the end of Rest.Key). The stage keeps a model's own rest
  by key and model, so only that model's row rests; an answered try
  ends the account's rest and its own model's. Accounts and keys keeps
  an account's model rests apart from its own: the account isn't shown
  as out, a line names the models resting with why and when, and Try
  now lifts those rests. An account resting as a whole is as before.
- docs/subsystems/gateway-routing.md says so.

Run: routing-model-rest.test.cjs (new), Chromium and WebKit, 1100 and
420, en/zh/zh-TW/ja/de, 20/20; with the old routing.js it fails
("old@x.test: gemini-3.8-flash rests with Opus"). All 74 routing/rest
GUI test files in both engines (456 each, 0 fail).
TestPoolRefusalRestsTheModelOnly checks Rest.Model, set and read back.
go test ./internal/gateway ./internal/gui, gofmt -l, go vet
darwin/linux/windows (-tags nogui).
Not tried: the reporter's real Antigravity account in the app.
2026-10-13 17:40:47 +08:00
yetone 56cfb8fbba gateway, provider: a subscription refused for a pool of its allowance that counts some models only rests for that model, not the account (Xiaopodev on X) — Cursor's Other Models used up kept Auto and Composer, still in Cursor Models, off the account too: the refusal rested the whole account by its restKey. Allowance.Pooled says a refusal is the model's alone when the windows full for it each count some models only (a plugin's models/notModels pool, Opus's own week), or none known full, only pools count it; restAfter then rests restID (account/model), which every rest check already looks at beside restKey. Tested with the owner's real Cursor account in a sandbox HOME: its real pools read Auto and Composer in Cursor Models, Opus and GPT in Other Models; after an Other Models refusal for claude-opus-5-5 only that model rested, and cursor/auto and cursor/composer-2.5 answered 200 through the account. TestAllowancePooled and TestPoolRefusalRestsTheModelOnly are new; the latter fails without the change. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass. 2026-10-05 23:21:24 +08:00