When Google had no capacity for the model, agy ended the reply with
"⚠ Our servers are experiencing high traffic right now, please try again
in a minute. (UNAVAILABLE (code 503): No capacity available for model …)".
The bridge passed it on as the whole reply, a 200, so nothing behind
magpie tried again. ifccod found this and patched it in their fork
(ifccod/opencode-agy-cli-auth, MIT, FORK.md "Busy ending"). Their code
is ported here: the ending is held and matched by its start, the way the
quota ending is, and it ends the turn as overloaded_error with status
503 (HTTP 503 without streaming). Retrying is allowed, and the account is
not rested.
agy 1.5.10 words a banned account's 403 without the
"PERMISSION_DENIED (code 403):" that 1.5.9 put in front. A real banned
account was probed over ACP on 11-18: the whole reply was that sentence,
end_turn, a 200. The bare sentence is now a marker, answered with the
same no-retry permission_error 403 as #1201.
Not taken from the fork: its video path. That path has agy's server-side
read_file open videos downloaded into a media folder added with
--add-dir, and it lets any gateway caller have agy read paths on the
host. It was not tried with a real account either, since the probe
account is banned.
Run (mica, HOME=$(mktemp -d), at 89df5a62+this diff):
- packages/agy-cli/test repeat-batch.mjs: 79 pass, 0 fail. usage.mjs
(cp-hook preload): 44 pass.
- The new tests on the old index.mjs, by hand: 3 of the 4 fail (busy
stream, busy non-stream 503, 1.5.10 ban). The quoting test passes on
both, as it should.
- Root bun test: 9070 tests, 0 fail, 20 skip (487s).
Not tried: a real high-traffic ending; it is taken from ifccod's capture.
Co-authored-by: ifccod <102718410+ifccod@users.noreply.github.com>