cybercaius on Discord: Codex's side calls are meant to go at low effort,
but some went with none or no effort, and the upstream answered 400 as
the model needs one.
Cause, from Codex's source: a title asks low only on Codex's own title
model (gpt-5.6-luna, thread_title.rs `(model == THREAD_TITLE_MODEL)
.then_some(Low)`); on any other model, a magpie one included, it sends no
effort. The auto-review (guardian select_review_model) asks low only when
the model's preset lists low, else the preset's default, and codexcat
writes no levels and no default for a magpie model whose levels aren't
known, so it too goes with none. magpie fitted an effort asked to the
model's levels but never added one that was absent, and its off-effort
retry fired only for none/minimal refusals that list levels.
Fix:
- codexSideEffort: a title, description, summary, prediction, auto-review
or memory call on one of magpie's models whose levels are known, asking
no effort or an off one the model hasn't, is asked at its lowest on
level (onEffort: low where it has it). Groups, other efforts and models
with unknown levels go as asked.
- serve, forwarded and translated (Chat and Responses, not Anthropic):
a 400 whose body says an effort is required (effortRequired: "reasoning
effort is required", "missing required parameter: reasoning.effort",
"requires a reasoning effort", "reasoning cannot be disabled") to a
request that asked no effort or none is asked again once at onEffort.
Any other 400 goes back as it came, asked once; a none that was refused
is remembered (offRefused) as before. A no-effort refusal isn't
remembered, so a model with unknown levels pays the 400 each time.
Ran (at this head, rebased on origin/main):
- go test -count=1 -timeout 45m ./internal/gateway/... ./internal/agent/...: ok (gateway 521s, agent 316s), at the pushed tree (2ca0da8e5 before this body was written), base 51202cd43
- go test -race -count=5 on the new tests: ok
- gofmt -l internal/gateway: clean; GOOS=linux and GOOS=windows go vet
-tags nogui ./internal/gateway: clean
Broken by hand:
- codexSideEffort returning the body as it came:
TestCodexSideCallAskedAtAnEffortTheModelTakes red (asked at ["" "low"])
- the backend's guardian/memory normalisation off: the same test red at
the auto-review (["low" "" "low"])
- the forwarded retry off: TestEffortRequiredRefusalAskedAgainAtLow red
(chat false: 400 "Reasoning effort is required")
- the translated retry off: the same test red (chat true)
Not tried: cybercaius's own upstream; its exact 400 text wasn't in the
report, so effortRequired is built from the wordings above, and
TestEffortRequiredWords holds that a level or field refusal isn't read
as one.