Commit Graph
2 Commits
Author SHA1 Message Date
yetone 6c063ac1b2 agent: a model Codex hides joins Codex's own group in the picker
v0.1.1737 offered a model the user ticked but Codex's bundled catalog
hides (GPT-6.1 Terra) under a "Codex" section of its own, beside the
provider's group. ysm119 asked on Discord why one provider's ticked
models showed up as two groups. codexViaMagpieFor now gives such a
model the group and icon of the provider's own entries and lists it
first among them.

Run: go test -run 'Codex|WSL|Wsl|Via|Magpie' ./internal/agent ok;
go vet ./internal/agent for darwin, windows and linux (nogui) ok;
gofmt clean.
Broken by hand: with the group assignment removed,
TestCodexHiddenTickedModelOffered fails ("gpt-h in \"Codex\", gpt-a in
\"OpenAI\"").
Not tried: the GUI picker with a real Codex account.
2026-10-27 23:30:37 +08:00
yetone c80b32c936 agent: a model Codex hides but the user ticked is offered in Codex's picker
ysm119 (Discord) ticked four models on the Codex subscription and Codex's
picker offered three. GPT-6.1 Terra is "visibility": "hide" in Codex's
models_cache.json, so catalog.Codex() leaves it out of Codex's own list,
and viaMagpieFor dropped every codex/… entry as only a hop, so it was
offered nowhere. codexViaMagpieFor now drops a codex/… entry only when
Codex's own list already has its model; the rest stay, via magpie. Both
pickers (live Codex and Codex in WSL) take it; viaMagpieFor had no other
caller and is gone.

Run: TestCodexHiddenTickedModelOffered is red with the codex/… entries
dropped as before ([OpenAI:gpt-a]) and green with the fix;
go test ./internal/agent -run 'Codex|WSL|Wsl|Via|Magpie' ok; go vet
darwin and GOOS=windows; gofmt clean.
Not tried: picking gpt-6.1-terra with a real ChatGPT account.
2026-10-27 22:56:58 +08:00