Files
magpie/docs
yetone caa5367336 gateway: a remote magpie's quota, credit or rate refusal rests only that model, not the whole remote (bigsteven on Discord)
A Remote magpie provider (LAN share) serves every model through one
key. When it answered 429 "usage limit … resets in 3 hours" for one
model, the key rested whole for those 3 hours. A group then never
moved on to the remote's other models that still had quota, and the
user had to ask again by hand. The remote magpie rests its own
providers' models itself, so one model out of quota there says nothing
of its others.

remoteModelRest: on a Remote magpie provider, failQuota, failCredit
and failRate rest c.restID() (the model) in restAfterMarked and
rateRest. A refused key or an unreachable computer still rests the
whole remote.

Run:
- TestRemoteMagpieQuotaRestsTheModel, against a fake remote whose codex
  model answers 429 quota, glm 429 rate, and kimi OK. A direct request,
  then two groups. It fails with remoteModelRest taken out.
- go test -tags nogui -count=1 -timeout 30m ./internal/gateway: ok.
- gofmt -l is clean. go vet passes on darwin, GOOS=linux -tags nogui
  and GOOS=windows.

Not tried: two real computers on a LAN share.
2026-10-14 14:47:37 +08:00
..