Files
magpie/internal
yetone e2d52b5012 provider: ZCode's mover min is 0.1.49, whose -Trial entry is no longer answered "quota exhausted" after a free-first refusal (Can4ry_ on X)
Can4ry_ on X: GLM-5.3-Flash-Trial answered "429 · ZCode's limited quota
for glm-5.3-flash is exhausted or temporarily unavailable" in magpie while
ZCode's own app was served. The plain GLM-5.3-Flash also kept going to
the Coding Plan after the Start Plan opened at 23:00. And there was no
freeFirst under Providers › ZCode.

zcode 0.1.49 (plugins 36a017a):
- A free-first gift refusal that isn't a quota answer (405/3012) now
  rests only free first's use of the model. Before, it shared the rest a
  -Trial entry obeys, so the Trial answered a local 429 without asking
  ZCode.
- The local 429 keeps the spent words last. 0.1.48 appended "(ZCode
  answered 429 …)" after them, so zcodeSpentWords didn't match and the
  account rested whole.
- free first is a switch, "Free quota first", in the provider's editor
  under Plugin options, just above Advanced (auth.options free_first,
  on by default).
keepMovedCurrent updates every moved user to 0.1.49.

The gateway test gets 0.1.49's rested wording, which rests the Trial
entry alone, and 0.1.48's, which rested the account.

Correction to plugins 36a017a's body: its old-code block-page test
fails because the old code has no `sidelined` map. Its second plain
request did not go to the gift again.

Run on mote, at this tree (rebased on origin/main 7aff42d86, run again there):
- go vet ./internal/provider ./internal/gateway
- go test ./internal/provider -run 'Mov|Migrat|Mover|ZCode|Zcode|Plugin',
  ok
- go test ./internal/gateway -run 'ZCode|Zcode', ok, both new subtests
  pass
- gofmt -l clean
- npm view --prefer-online @magpie-community/opencode-zcode-auth version
  says 0.1.49

Broken by hand: in the plugin (see 36a017a), the new tests against the
old index.mjs, 4 fail, the reported case among them (429 for 200).

Not tried:
- the full suite. mote is running other sessions' suites, and this
  change is one string in the mover plus test cases.
- a real move to 0.1.49.
- a real Start Plan refusal: the owner's account has no live gift.
- the editor's switch in a running app. It comes from host.js optionsOf
  and app.js pluginOptionsField, unchanged.
2026-11-04 02:07:15 +08:00
..
…
…
…
…
…
…
…
…