Cause: the owner's codex provider keeps picks (providers.json "models")
made while ChatGPT listed gpt-5.5. ChatGPT has since stopped listing it:
the backend's /codex/models for the Pro account (client_version 0.165.0,
asked 11-01) and the saved Plus account's list both have gpt-6.1-sol,
gpt-6-astra, gpt-6.1-terra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol/terra/luna
and no gpt-5.5, and Codex CLI 0.165.0's models_cache.json has none
either. ExposedOf offers a pick the vendor's list lacks as typed in by
hand, and an account's refetch never drops gone picks (dropGonePicks is
for key providers), so codex/gpt-5.5 stayed first in /v1/models. The
backend refuses any model its list leaves out: a real request for
gpt-5.5 on the Pro account answered 400 model_not_found "The 'gpt-5.5'
model is not supported when using Codex with a ChatGPT account", while
gpt-5.6-luna answered 200. Not plan-specific: Plus and Pro alike.
Fix: a ChatGPT account (listedOnly) is treated as Copilot's already is:
with its list fetched, a pick the list doesn't have is left out of what
agents are offered. The pick itself stays saved and comes back when the
list has it again. The list is the pool's (codexPoolModels), so a model
only a saved account has is still offered and routed to it
(Account.Lists).
Run (mote, at this tree on origin/main 1fac66c06):
- gofmt -l internal: clean; go vet ./internal/provider, GOOS=linux
-tags nogui and GOOS=windows: ok
- go test ./internal/provider (full): ok 131s
- go test ./internal/tui ./internal/codexcat ./internal/usageapi
./internal/cli ./internal/catalog ./internal/agent: all ok
- go test -run 'Codex|Pick|Expos|Listed|Models' ./internal/gateway
./internal/gui: ok
- Real accounts, sandbox HOME (copy of ~/.codex/auth.json and the live
providers.json and codex model lists): `magpie models` built from
origin/main lists codex/gpt-5.5 first; built from this tree it lists
only the six models the account serves.
Broken by hand: with ExposedOf's condition put back to unusable != nil,
TestCodexPickTheListDroppedNotOffered fails ("offered [gpt-5.5
gpt-6-astra gpt-6-sol]").
Not tried: the full ./... suite and the whole gateway package (mote was
at load ~290 with another session's suite running); the GUI suite; the
ChatGPT API provider (siwc), which keeps a fetched list too but was not
checked for refusing unlisted models, so it is left as it was.