Files
magpie/internal/catalog
yetone 25ac5a6f65 catalog: a relay's 404 "不支持当前入口协议" is a wrong endpoint, so the model goes to the next API (equinox0253 on X)
WandAPI answered Claude Code's /v1/messages for gpt-6.1-sol with 404 "模型
gpt-6.1-sol 不支持当前入口协议". f94ece2ff took a 404 only when New API's
model_not_found code came with a channel or group named, which this doesn't,
so the 404 went to the client and the relay's Chat/Responses URL was never
asked. catalog.WrongEndpoint now takes "不支持当前入口协议" (and 该/此):
the model is marked off that API and asked on the provider's next one; with
no other API the refusal carries wrongAPINote, and a 404 is retryable, so a
group or fallback goes to its next member as before. It names the protocol,
which a wrong base URL ("404 page not found") or a missing model ("模型 X
不存在", OpenAI's "does not exist") never does; those stay plain 404s.

Run (mote, -tags nogui, at origin/main 11ab58c58 + the previous commit):
go test catalog; go test gateway -run WrongEndpoint|NoChannel: ok.
Broken by hand: without the phrases, TestWrongEndpoint and
TestNoChannelAs404FromAFork/entry_protocol (both shapes) are red.
Not tried: a real WandAPI account.
2026-11-13 14:55:15 +08:00
..