fix(#84): support xhigh reasoning_effort for GPT-5.x models#104
Closed
AI-Context-Engineer wants to merge 1 commit into
Closed
fix(#84): support xhigh reasoning_effort for GPT-5.x models#104AI-Context-Engineer wants to merge 1 commit into
AI-Context-Engineer wants to merge 1 commit into
Conversation
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
Author
|
Cerrando: duplica el trabajo de #84 que ya esta abierto y es mas completo. Disculpas por el ruido. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #84
The previous mapping in
packages/cli/src/adapters/openai-api-format.tscappedreasoning_effortathigheven whenbudget_tokens >= 32000. Per the openai-python SDK (shared/reasoning_effort.py), valid values includexhigh, which is supported by the newer GPT-5.x reasoning models documented in the issue:Change
New mapping:
Both
prepareRequest()and the secondary mapping in the Codex Responses payload builder are updated for consistency.Test
When the user runs
claudish --model cx@gpt-5.4 --effort max:budget_tokens >= 32000-> mapped tohigh(loses one tier)xhigh(uses the model's full reasoning capacity)Notes
This is a minimal fix focused only on extending the upper bound. A more comprehensive fix would include per-model effort tables (issue #84 has the matrix), but that's out of scope for this PR.