Skip to content

Conversation

@ThomasK33
Copy link
Member

@ThomasK33 ThomasK33 commented Dec 5, 2025

Add support for OpenAI's gpt-5.1-codex-max model with the new xhigh (Extra High) thinking level.

Changes

  • Allow xhigh thinking level end-to-end (types, schemas, UI policy, enforcement)
  • Normalize model detection so gpt-5.1-codex-max works with/without the openai: prefix or codex-max alias
  • Update thinking slider visuals to clamp extra levels to the strongest glow
  • Refresh LiteLLM model data (models.json) to include codex-max
  • Document codex-max/XHIGH support in docs/models.md
  • Add tests covering bare/alias codex-max and policy enforcement fallbacks

Behavior

  • xhigh only surfaces for codex-max; other models fall back to their allowed max (e.g., medium or high)
  • Command palette may show all levels, but backend/UI enforce policy via enforceThinkingPolicy

Validation

  • make typecheck
  • bun test src/browser/utils/thinking/policy.test.ts
  • bun run scripts/update_models.ts (models.json refreshed)

Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

getOptions: () =>
THINKING_LEVELS.map((level) => ({
id: level,

P1 Badge xhigh palette option saved as off

The command palette now exposes an xhigh thinking level (mapped over THINKING_LEVELS here), but App.tsx still normalizes palette submissions against a four-value THINKING_LEVELS = ["off","low","medium","high"] when persisting (setThinkingLevelFromPalette around lines 44/300). Selecting xhigh for any model therefore gets coerced to "off" before it reaches the thinking provider, so the newly added level can’t actually be used.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammario ammario self-assigned this Dec 6, 2025
@ammario
Copy link
Member

ammario commented Dec 6, 2025

Gonna finish this off as I assume you're out for the weekend

Add support for OpenAI's gpt-5.1-codex-max model which introduces a new
'xhigh' (Extra High) reasoning effort level for extended deep thinking.

Changes:
- Extended ThinkingLevel type to include 'xhigh' as 5th option
- Added GPT_CODEX_MAX to known models with codex-max alias
- Updated thinking policy to return 5 levels for codex-max only
- Added xhigh to UI level descriptions and command palette
- Added model pricing/capability data to models-extra
- Updated SendMessageOptionsSchema to accept xhigh
- Added comprehensive tests for codex-max policy

The xhigh level is exclusive to gpt-5.1-codex-max. Other models
gracefully fall back to their maximum supported level when xhigh
is requested.

Change-Id: Iab7ba7187703e275c4c0aa76779381dff4006316
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Same pricing as gpt-5.1-codex: $1.25/M input, $10/M output
Also aligned max token limits with the codex model.

Change-Id: I030014df05a5ccae62f5c93d7435ec2363d23317
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ammar-agent ammar-agent force-pushed the add-gpt-5-1-codex-max-model branch from 20c0858 to bc841f9 Compare December 6, 2025 19:54
@ammario ammario merged commit d64ed5d into main Dec 6, 2025
19 checks passed
@ammario ammario deleted the add-gpt-5-1-codex-max-model branch December 6, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants