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
..
2026-11-10 19:26:13 +08:00
2026-11-04 18:38:32 +08:00
2026-10-12 20:18:31 +08:00
2026-11-10 19:26:13 +08:00
2026-11-11 05:58:14 +08:00
2026-10-11 00:35:29 +08:00
2026-11-13 14:06:17 +08:00
2026-11-13 14:06:17 +08:00
2026-11-12 17:00:39 +08:00
2026-11-13 14:55:15 +08:00
codex: a cached entry keeps the cache's own max when magpie's list has none, and Codex's models_cache.json is read under CODEX_HOME everywhere (follow-up to #674 , from reviewing #679 ) — restoring a cached native entry (backend away) set max_context_window to max(MaxContext, Context) from magpie's live list, so a list saved without the max (before magpie kept it) wrote the window over the cache's own (872000 became 272000); now a list with no max leaves the cache's, and codexcat.Window still raises it to a window past it. codexcat.CacheEntries and catalog.Codex read ~/.codex/models_cache.json even with CODEX_HOME set, while codexVersion and codexInstructions followed it; all four now take catalog.CodexModelsCache() (CODEX_HOME, else ~/.codex), and provider's codexCLIHome and the copy in codexInstructions are gone. TestCodexReadsCacheUnderCodexHome, TestCodexCachedListUnderCodexHomeKeepsItsMax and TestCodexCatalogEntryFromCodexHome fail on the old code (the ~/.codex cache read, none listed from CODEX_HOME); TestCodexNativeModelsTakeSetWindows now wants a cached gpt-5.5 with no live max to keep the cache's 400000 (old code: 272000). go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass but TestProvidersAnswerWhileListsComeIn, a timing test that passes alone.
2026-10-03 21:39:13 +08:00
agents: Codex's OpenAI models are its own, not magpie's routing groups read back (group/semantic, group/test … listed under OPENAI in Codex's model picker) — Codex keeps the list it was last handed in models_cache.json, and handed through the gateway it has magpie's models in it too; magpie read the file back as Codex's own models, so its groups (one since removed among them) were listed under OpenAI, and stayed after Codex was routed elsewhere. An entry magpie added (a magpie id — provider/model, group/<id>, codex/<slug> — in a list whose ETag magpie tagged, or described "… via magpie") is left out of Codex's own models and of the entries the gateway falls back to. TestCodexCacheLeavesMagpieOut fails without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass.
2026-09-30 17:19:39 +08:00
2026-10-28 04:34:45 +08:00
2026-10-30 04:48:17 +08:00
2026-11-10 12:54:39 +08:00
catalog: fetched again each day magpie stays open, and sooner when a call's model has no price, so a model models.dev lists after magpie started is priced ( #224 Koohoko: gpt-6.1-sol shows no cost) — the models.dev catalog, where list prices come from, was fetched only at the app's start (when older than a week), so a magpie left open, or magpie serve, never learned a new model's price. KeepFresh (internal/catalog/fresh.go), run by the app's backend and by magpie serve, looks every hour and fetches when the cache is older than a day; a call whose model has no price asks for a fetch (catalog.Missing, from usage's pricer) when the cache is older than six hours and none was tried in that time, only in a process keeping it fresh, so CLI commands and tests never fetch on their own. Loading and Reset now share a mutex instead of a sync.Once reassigned under a running Do, which a background Sync could hit while a call was being priced. Tested with fresh_test.go against a fake models.dev in a temp XDG_CACHE_HOME: stale after 25h and not before, Missing fetching nothing when not keeping, fetching once when keeping and gpt-6.1-sol then priced, and not again; passes under -race (failed under -race with the Once). go vet, go build -tags nogui (and GOOS=linux, GOOS=windows) and go test -tags nogui ./... pass.
2026-09-30 04:28:01 +08:00
2026-11-10 19:26:13 +08:00
2026-11-12 00:01:06 +08:00
2026-10-10 18:31:32 +08:00
2026-10-31 03:27:34 +08:00
2026-10-27 12:16:33 +08:00
2026-11-10 19:26:13 +08:00
2026-11-01 03:24:38 +08:00
2026-11-05 16:22:31 +08:00
2026-11-10 00:36:16 +08:00
2026-10-13 13:42:56 +08:00
2026-11-09 22:26:48 +08:00
2026-10-13 13:42:56 +08:00
2026-10-14 13:01:07 +08:00
2026-11-10 22:20:17 +08:00
2026-11-01 03:52:46 +08:00
2026-11-11 05:58:14 +08:00
2026-11-11 05:58:14 +08:00
2026-11-11 14:50:03 +08:00
2026-11-11 14:50:03 +08:00
2026-10-04 23:30:56 +08:00
2026-10-31 14:51:11 +08:00
2026-11-12 22:27:39 +08:00
2026-10-13 11:43:54 +08:00
2026-10-12 23:18:32 +08:00
2026-10-25 03:39:50 +08:00
2026-11-01 19:02:59 +08:00
2026-11-01 19:02:59 +08:00
2026-10-05 22:55:30 +08:00
2026-11-10 02:03:51 +08:00
2026-11-10 02:10:10 +08:00
2026-11-06 11:58:35 +08:00
2026-11-09 07:32:58 +08:00
2026-11-01 07:41:23 +08:00
2026-11-10 12:54:39 +08:00
2026-11-06 10:17:08 +08:00
2026-10-29 15:47:18 +08:00
2026-10-14 23:52:15 +08:00
2026-10-10 18:31:32 +08:00
2026-10-29 20:36:04 +08:00
2026-10-12 22:33:07 +08:00