bigfisheatsmall on X: Codex was kept signed in to ChatGPT account A, on
the Free plan. Account B (Team) was the only account on in magpie. dsh
listed B's models and Codex didn't. codexMerged added CodexListed(),
which leaves out every ChatGPT account's own models because it assumes
the backend lists them. But the backend list is fetched with Codex's own
sign-in (A, Free), so B's plan-only models were listed nowhere. Routing
already sent codex/<model> to B (codexAccounts).
- provider.CodexListedBeside(backend) lists an account's own model by
magpie's id (codex/<slug>) when the sign-in's backend list lacks it.
codexMerged uses it, and FitOwn keeps those entries.
- spawnChoices (spawn_agent's models) had the same gap. It now uses the
same rule with the slugs in Codex's models cache.
- buildCodexListTag covers the accounts' own models, so another account
gaining or losing one has Codex ask for the list again. Every Codex
asks once after the update.
- TestSyncCatalogAgesCodexCache built its "current" tag by hand from
CodexListed(). It now uses provider.CodexListTag(), the tag SyncCatalog
compares against.
Tests (sandbox HOME, fake backend with per-plan lists):
TestCodexListHasAnotherAccountsModels covers the list, routing of
codex/gpt-6.1-sol to the Pro account, and spawn_agent's choices.
TestCodexListOneAccountNoneTwice checks that a single account gets no
codex/ duplicates.
Run on mote at this tree: go vet (darwin, windows, linux) on gateway,
provider and agent: ok. go test -count=1 on provider, agent and
codexcat: ok. go test -run 'Codex|Spawn' on gateway and gui: ok. Run at
the tree before the sync_test change and the buildCodexListTag tidy: the
full gateway package was ok (1224s). Agent was red only in
TestSyncCatalogAgesCodexCache, fixed above.
Broken by hand: on the old codexMerged, the new test fails with "Codex's
list lacks codex/gpt-6.1-sol: [gpt-6-luna gpt-5.6-terra gpt-5.6-luna]".
With only codex_spawn_models.go reverted, it fails with "spawn_agent's
models lack codex/gpt-6.1-sol".
Not tried: real accounts or a real Codex. Not a full go test ./... run.
Not tried: models the backend marks hidden. A Codex here for failover
alone (codexOwnOnly) is unchanged.
codexAccount fetched the provider's list with ~/.codex/auth.json's sign-in;
the saved accounts' own lists only lent it their reasoning levels (#520).
codexPoolModels now also adds a model only another account on lists, right
after its predecessor in that list (as mergeAntigravityModels does). The
gateway already sends each account only what its own list has.
TestCodexProviderListsEveryAccountsModels fails on the old code with
'the codex provider lists gpt-6-luna,gpt-5.6-terra,gpt-5.6-luna'.