Commit Graph
2 Commits
Author SHA1 Message Date
yetone 76d82528e6 agents, gui: every agent's model list has Order, not only Codex's (cjyrainbow, #1052)
The model list under an agent (Pick on its row) had a third view, Order,
for Codex alone (#855): the API said only Codex's list was orderable and
refused an order for any other. The order itself was never Codex's only:
provider.CatalogFor puts every agent's catalog in its order (InOrder), and
the gateway's /models, the files magpie writes for each agent and Claude
Code's modelPicker are all built from it. So the view is now on every
agent's list, the API takes any agent's order, and one agent's order
leaves the others' alone. Codex's note still says it is the order Codex
lists them in; another agent's says it is the order magpie hands them to
it, since an agent that sorts its own menu may sort them again. zh, ja, de.

Verified: TestAgentModelOrderAPI fails on the old code (opencode: 400, the
order refused); codex-model-order.test.cjs's new Claude Code case (en, zh,
440px wide: three views uncut and inside the box, Order lists the shown,
Alt+Down posts the order, Default order posts none, nothing scrolls) fails
on the old app.js (no Order). TestModelOrderReachesEveryAgent checks Claude
Code's picker and opencode's written models follow their own order.
Chromium and WebKit: codex-model-order, agent-models, agent-models-all-
hidden, agent-models-loading, agent-model-groups, agent-models-picker,
gui-ja, gui-de, i18n-keys pass. click-scroll's "Live and a day" and "room
kept for a click" (Requests page) fail the same on origin/main, untouched
here. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and
go test -tags nogui -count=1 ./... under a temp HOME pass.
2026-10-07 03:34:05 +08:00
yetone 273be22cac agents: Codex's /model lists its models in the order dragged on the Agents page (M3chD09, #855) — Codex lists the models by the priority magpie gives them: a ChatGPT account's own first, as the backend has them, then magpie's in the catalog's order, with no way to change it. Codex's model list (Pick on its row) now has a third view, Order: the models shown as Codex lists them, numbered, each dragged elsewhere (its grip shows on hover) or moved with Alt+↑/↓; it is saved at once (settings orderedModels, by agent and entry id), and the account's own models and magpie's go in one order. A model not in the order (one added later) goes after those that are, as it stood; the hidden stay hidden and out of the order view, hiding keeps the order, and a provider renamed renames its ids in the order too. Default order puts magpie's back. Codex gets it at once: signed in to ChatGPT, the gateway's /models gives the backend's and magpie's models priorities 1..n in that order and the list's ETag carries the order so Codex asks again; not signed in, the catalog file magpie writes for Codex (ListedFor → InOrder) is rewritten in it. Only Codex's list can be ordered; base_instructions are untouched. zh, ja, de strings. TestCodexModelListInUsersOrder (gateway: default order, an order across the account's and magpie's, the ETag changing, CatalogFor, opencode's untouched, none restoring it) and TestAgentModelOrderAPI (gui: orderable, an order read back, a new model last, hidden kept, hiding keeping it, reset, opencode refused) fail on the old code (no SetModelOrder/ModelOrder); codex-model-order.test.cjs (WebKit, en and zh: Order lists the own first and leaves the hidden out, Alt+↓ and a drag post the order, Default order posts none, nothing scrolls; a list that can't be ordered has no Order) fails on the old code (no Order). agent-models, agent-models-all-hidden, agent-models-loading, agent-model-groups, click-scroll, gui-ja and gui-de pass on WebKit. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-05 11:52:34 +08:00