fix: propagate Codex reasoning effort - #2919
Merged
nicoloboschi merged 1 commit intoJul 24, 2026
Merged
Conversation
nicoloboschi
approved these changes
Jul 24, 2026
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.
Summary
reasoning_effortasreasoning.effortWhy
The Codex provider currently maps
reasoning_efforttoreasoning.summary, but it never sends the effort itself. As a result, settings such ashighandxhighonly change summary detail while the backend continues to use its default reasoning effort.This change passes the configured effort through and preserves the existing summary mapping, including the special detailed-summary behavior for GPT-5.2 models.
Validation
uv run python -m pytest tests/test_codex_reasoning_effort.py -q(2 passed)uv run python -m pytest tests/test_codex_*.py -q(50 passed)uv run ruff check .uv run ruff format --check .uv run ty check hindsight_api/engine/providers/codex_llm.pyuv run ty check tests/test_codex_reasoning_effort.pyRisk / impact
The request shape changes only for the
openai-codexprovider. Supported configured effort values now reach the backend as intended. An unsupported value may now be rejected by the backend instead of being silently ignored.Scope boundaries
Known out-of-scope CI failure
verify-generated-filescurrently fails becausemaincontainsskills/hindsight-docs/references/openapi.jsonat version0.8.4, while./scripts/generate-docs-skill.shregenerates it as0.8.5. This reproduces on the unchanged base commit4dc8348348f3e0b50da9071357955a2995c4f0e0and is unrelated to this provider change.PRs #2913 and #2916 already include that same generated one-line sync, so this PR deliberately does not duplicate it.
Rollout / operator notes
No migration is required. Existing installations keep their configured/default effort; the Codex backend will now receive it explicitly.
Reviewer focus
Please check the Codex request shape in both
call()andcall_with_tools(), and confirm that effort propagation stays independent from summary selection.