What changed
- CodexNativePicked built its keep-set from p.Models, the account list
frozen at the moment the user last picked - so a model the vendor
began listing afterwards (gpt-6.1-terra, the reporter's case) was
excluded from the desktop catalog the gateway writes for Codex
Desktop's model_catalog_json, and the picker could not see it even
though the gateway's own /v1/models served it. The keep-set now comes
from p.Picks(): the picked ids stay picked, and anything the vendor
lists since is kept beside them.
Run
- TestCodexDesktopCatalogKeepsNewlyListedBesidePicks on a3768cdd1-era
product (reverted, tests kept): FAIL - the newly listed model was
dropped from the catalog; with the fix: ok. gofmt clean; vet -tags
nogui (provider+gateway) clean.
Reviewed and ported: every line read against origin/main 1b0340fdb.
Picks is what magpie's own catalog (/v1/models) serves for the codex
provider, so the desktop catalog and /v1/models now agree; a model the
user left out of a full list stays out (withNewlyListed). On mote
(mote-run): with codex_models.go put back to origin/main,
TestCodexDesktopCatalogKeepsNewlyListedBesidePicks FAILs with "the
account's own models beside the picks: [gpt-6-sol]"; with the change,
ok. The test's backend is httptest; no network. go vet (darwin, linux,
windows, -tags nogui) of the touched packages: ok; gofmt -l clean.
The three packages (provider, agent, gateway) with all three ports: ok.
Not tried: a real ChatGPT account and the Codex app's picker.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
Generated-by: GLM-5.3-Flash (ZCode)