A New API relay with Chat, Responses and Anthropic URLs has channels per
API. Claude Code's /v1/messages turn for gpt-6.1-sol was relayed on the
Anthropic URL (usable lists the client's own API), where the relay has no
channel for a GPT and answers 503 "No available channel for model ...
under group ..." (or 当前分组 ... 无可用渠道). wrongEndpoint only knew 4xx
words, so the 503 reached Claude Code, and only removing the Anthropic URL
helped.
catalog.NoChannel recognises that 503 (and 404) in English and Chinese.
Server.noChannelElsewhere, used in passthrough and forwardTranslated next
to wrongEndpoint, marks the model unfit on that API and asks the next one
usable gives, but only when p speaks another API; with none left the
relay's word is returned and nothing is remembered. Claude models still go
to Anthropic: the rule fires only on the refusal.
Run (wsl-run, magpie-desktop): new TestNoChannelOnOneAPIGoesToTheNext
(fake New API: 503 bodies in Claude and OpenAI shapes; GPT goes to Chat on
the first ask and is not asked on Anthropic again; Claude stays on
Anthropic) and TestNoChannelWithNothingElseIsTheError, red on the old code
(503 reached the client), green with the fix; catalog.TestNoChannel;
TestToolsThatNeedResponses* siblings; go vet catalog+gateway; go test
catalog, gateway, provider (see push note). The 503 body is New API's as I
know it from its source, not captured from a live relay.
Not tried: a real New API relay; windows/darwin vet; GUI (no GUI change).
A Claude model whose Anthropic channel is briefly down is remembered off
Anthropic until magpie restarts.