ccdcn on X: in the Codex app, the models of a provider they added
(XJAI's model-code, model-work, model-test) had no reasoning effort to
pick, though the chip said 中. Nothing magpie reads knows those ids, so
their entries in magpie-models.json (and /v1/codex/models) had
supported_reasoning_levels [] and default_reasoning_level null. Codex
then hides the choice but still sends an effort (medium, or
model_reasoning_effort), and the gateway's fitEffort passes an effort on
as asked when a model's levels are unknown, so the effort went out and
couldn't be changed.
provider.CodexEfforts offers low, medium and high for a model whose
levels are wholly unknown. It is used by codexListed (GET
/v1/codex/models, the backend list, spawn models) and by
agent.magpieModels("codex") (the file Codex reads, and magpie's own
Codex effort control). A model known to have no levels keeps none: one
the vendor's catalog or models.dev lists (any provider, any spelling),
one the user marked as taking no reasoning ask, a vendor entry in
Codex's shape, and a routing group.
TestCodexDesktopEfforts' "user's own" now expects medium added to the
user's enabled-reasoning-efforts: its fixture's fake/m1 is such a model.
Run (on mote):
- go test -timeout 45m -count=1 ./internal/provider ./internal/agent
./internal/codexcat: ok
- go test -timeout 45m -count=1 ./internal/gateway ./internal/gui:
gateway ok (615s); gui red only in 10 real-window AppKit tests
(dock, panel, tray, main window), each killed at its deadline. Four of
them run alone on origin/main 024393fbb fail the same way on mote:
#4125 (mote's AppKit/launchd hang). Not run on another Mac.
- GOOS=linux / GOOS=windows go vet ./internal/provider ./internal/agent
./internal/gateway: ok; gofmt -l clean
The runs above were at base d99e213f5. Rebased on 024393fbb, which
changed internal/gateway only; at this head the new tests and every
TestCodex.*Effort test in provider, agent and gateway pass again.
Broken by hand: with codex_models.go and route.go stashed, the new
TestCodexOffersLevelsForUnknownModels and
TestCodexCatalogOffersUnknownModelsLevels fail (offered []).
TestCodexPickedEffortReachesUnknownModel checks each offered level
reaches the vendor as reasoning_effort.
Real Codex: codex-cli 0.165.0 app-server (sandbox CODEX_HOME), model/list
on the catalog codexcat writes for xjai/model-test: before,
supportedReasoningEfforts [] / default none; after, low, medium, high /
default medium.
Not tried: the Codex desktop app with a real XJAI vendor. Not changed:
other agents (OpenCode variants etc.), which send no effort for such a
model today, and groups whose members are all unknown.