yetone
af3334533d
catalog: a Gemini models.dev doesn't list yet takes its generation's window (stockAAAAA on X)
...
gemini-4-carbon read no context window while gemini-4-argon had 1M:
models.dev lists a new Gemini a day after Google's lists name it, and
magpie's bundled copy (11-10) and a fresh cache lacked it. ContextOf now
ends on geminiKinWindow: the window every listed gemini-<N>-* agrees on,
none when they differ or for a point release (gemini-3.8-flash). Google's
model page (aistudio.google.com/docs/models) gives both 4 Argon and 4
Carbon 1M. Reaches every route that asks ContextOf: Antigravity and
Gemini API lists with no limit, Code Assist, Vertex, Copilot, relays.
Run (mote): go test ./internal/catalog ok; go vet darwin/linux/windows
ok; gofmt clean. Broken by hand: with the fallback returning 0 the new
test is red (carbon and nova read 0). Full ./internal/provider has 3 reds
(TestAddSameKeyOtherFormat, TestQuotaSpanCarriesEveryWindowField,
TestKeptQuotaReportAsksNobody) that fail identically with my change
stashed, on origin/main c43314792; not mine. Not tried: a real
Antigravity account listing carbon.
2026-11-12 00:01:06 +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-11 19:42:17 +08:00
2026-11-12 00:01:06 +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-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