Skip to content

Map Claude 4.6 effort properly onto OpenAI reasoning effort#84

Open
GrahamCampbell wants to merge 2 commits into
MadAppGang:mainfrom
GrahamCampbell:fix-openai-reasoning
Open

Map Claude 4.6 effort properly onto OpenAI reasoning effort#84
GrahamCampbell wants to merge 2 commits into
MadAppGang:mainfrom
GrahamCampbell:fix-openai-reasoning

Conversation

@GrahamCampbell

Copy link
Copy Markdown

4.6 models don't use reasoning tokens, and the mapping to none/low/high buckets was incorrect as different models have different supported reasoning efforts.

Model Released none minimal low medium high xhigh Default
gpt-5 Aug 7, 2025 medium
gpt-5-mini Aug 7, 2025 medium
gpt-5-nano Aug 7, 2025 N/A (limited)
gpt-5-pro Aug 2025 high
gpt-5-codex Aug 2025 medium
gpt-5.1 Nov 12, 2025 none
gpt-5.1-codex Nov 2025
gpt-5.1-codex-mini Nov 2025
gpt-5.1-codex-max Nov 19, 2025
gpt-5.2 Dec 11, 2025 none
gpt-5.2-pro Dec 11, 2025
gpt-5.2-codex Dec 2025
gpt-5.3-codex Feb 5, 2026
gpt-5.4 Mar 5, 2026 none
gpt-5.4-pro Mar 5, 2026 high
gpt-5.4-mini Mar 17, 2026 none
gpt-5.4-nano Mar 17, 2026 N/A (limited)

AI-Context-Engineer pushed a commit to AI-Context-Engineer/claudish that referenced this pull request Apr 12, 2026
The previous mapping capped at 'high' even when budget_tokens >= 32000,
but per the openai-python SDK (shared/reasoning_effort.py), valid
reasoning_effort values include 'xhigh' which is supported by:
- gpt-5.4, gpt-5.4-pro, gpt-5.4-mini
- gpt-5.3-codex
- gpt-5.2, gpt-5.2-pro, gpt-5.2-codex
- gpt-5.1-codex-max

New mapping:
  budget_tokens < 4000   -> minimal
  budget_tokens < 16000  -> low
  budget_tokens < 32000  -> high
  budget_tokens >= 32000 -> xhigh

Both prepareRequest() and the secondary mapping in the Codex Responses
payload builder are updated for consistency.

Closes MadAppGang#84
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.

1 participant