Skip to content

[codex] Treat max as a first-class reasoning effort#30467

Merged
shijie-oai merged 3 commits into
mainfrom
shijie/first-class-max-reasoning-effort
Jun 29, 2026
Merged

[codex] Treat max as a first-class reasoning effort#30467
shijie-oai merged 3 commits into
mainfrom
shijie/first-class-max-reasoning-effort

Conversation

@shijie-oai

@shijie-oai shijie-oai commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Why

The Bedrock GPT-5.6 catalog advertises max, but Codex treated it as an opaque custom effort. That made the reasoning picker render it as lowercase max while known efforts use productized labels.

Making max a known effort aligns catalog data, parsing, and UI presentation without changing the max wire value or persisted representation.

What changed

  • Add first-class ReasoningEffort::Max parsing and serialization.
  • Use the typed effort in the Bedrock catalog and render it as Max in the TUI.
  • Preserve forward-compatible custom-effort coverage with a genuinely unknown future value.

Before

Screenshot 2026-06-28 at 12 08 47 PM

After

Screenshot 2026-06-28 at 12 09 10 PM

@shijie-oai shijie-oai changed the title [codex] Add first-class max reasoning effort [codex] Treat max as a first-class reasoning effort Jun 28, 2026
@shijie-oai shijie-oai marked this pull request as ready for review June 28, 2026 18:43
@shijie-oai shijie-oai requested a review from a team as a code owner June 28, 2026 18:43
Self::Medium => "medium",
Self::High => "high",
Self::XHigh => "xhigh",
Self::Max => "max",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark Max as official reasoning effort instead of treating it as a string value from the backend.

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My OCD welcomes this PR. Code looks great, very straightforward.

Codex found one nit that's completely optional.

Approved! 👍

Medium,
High,
XHigh,
Max,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick found by Codex:

Now that max has a first-class variant, could we also change reasoning_effort_for_request() in core/src/client.rs to map Ultra to ReasoningEffort::Max instead of Custom("max") (and update its test)? Leaving it unchanged conflicts with Custom’s “unknown effort” contract and means internal request objects still classify a known effort as custom, even though the wire value is the same.

Comment by me: apparently this happens in core/src/client.rs lines 170-175:

fn reasoning_effort_for_request(effort: ReasoningEffortConfig) -> ReasoningEffortConfig {
    match effort {
        ReasoningEffortConfig::Ultra => ReasoningEffortConfig::Custom("max".to_string()),
        effort => effort,
    }
}

This suggestion is a non-blocker of course.

@shijie-oai shijie-oai merged commit 80f54d1 into main Jun 29, 2026
64 of 66 checks passed
@shijie-oai shijie-oai deleted the shijie/first-class-max-reasoning-effort branch June 29, 2026 16:38
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants