Commit Graph
2 Commits
Author SHA1 Message Date
yetone 8eb2193540 agent: Codex's own models are drawn by their names in its picker, as every other list's are (nb5p on Discord)
nb5p's screenshot of the Agents page: Codex's model picker drew each of
Codex's own models by its slug (gpt-6-astra · 经 magpie · GPT-6-Astra in
grey). Every other list in magpie, magpie's catalog included, draws the
model's name. options() gives a model its name only as the grey note;
Codex's own were the one list built straight from it, and on magpie API or
with magpie Codex's provider the label was set to the slug outright.

codexNamed gives each of Codex's own models its name (the display_name
Codex lists it by) as the label, for the picker of this machine's Codex
and of a WSL distro's (wsl.go, both of its lists), and the magpie-API
branch no longer writes the slug over it. The value is the slug, as
before: what Codex is set to and sends is unchanged (codex/gpt-… on
magpie API, gpt-… otherwise). The Codex app's own picker was not the
cause: magpie's catalog file already gives it the names.

Test: TestCodexOwnModelsNamedInPicker (beside the ChatGPT sign-in, and
magpie the provider) checks each own model is labelled by its name and
valued by its slug. TestCodexAPIKeepsMagpieOnOwnModel and
TestCodexProviderOwnModelSaysItsPath now check the name too.

Run on mote at this tree: go test ./internal/agent ok (176s); go vet for
darwin, linux -tags nogui and windows on internal/agent; go build ./...;
gofmt -l clean.
Broken by hand: codexNamed left without the label, all three tests red
("gpt-6-astra is offered as "" ... want it named "GPT-6-Astra"").
Not tried: the GUI suite (no GUI file changed; the picker already draws
a label when there is one), a real Codex in WSL.
2026-11-05 08:14:57 +08:00
yetone d7bdb0765f agent: with magpie Codex's provider, Codex's own models on the Agents page say what picking them does: one magpie serves on a ChatGPT account is picked as magpie serves it and Codex stays on magpie; any other reads "direct, not via magpie" and asks before taking Codex off magpie (#1269, shenghsi)
Picking Codex's own gpt-5.5 tagged "via magpie" while magpie was Codex's
provider took Codex off magpie at once, with no question: the tag came
from routed(), but set() unroutes for a model of Codex's own unless it is
joined beside a ChatGPT sign-in or on magpie API.

Verified: TestCodexProviderOwnModelSaysItsPath fails without the change
(gpt-a reads Via:true with no ChatGPT account; Value gpt-a, not
codex/gpt-a, with one), passes with it. Reproduced and checked in a
sandbox HOME with Playwright against `magpie web`, on macOS and on Linux
(WSL2 Ubuntu 24.04, codex-cli 0.161.0): before, picking gpt-5.5 left
Codex "Not connected"; after, it reads direct and opens "Take Codex off
magpie?". go test -tags nogui ./... green; go vet for darwin, linux,
windows on internal/agent.
2026-10-08 17:06:48 +08:00