fix(core): use runtime config for review reasoning effort - #12630
Closed
hdcodedev wants to merge 1 commit into
Closed
fix(core): use runtime config for review reasoning effort#12630hdcodedev wants to merge 1 commit into
hdcodedev wants to merge 1 commit into
Conversation
Use parent turn context config in /review instead of startup config, so review model resolution and reasoning effort come from current runtime state. Recompute review reasoning effort against the selected review model and fallback when the current effort is unsupported. Add review tests for: - using current runtime effort after model switch - falling back to supported effort when runtime effort is unsupported
Contributor
|
We've updated our contribution guidelines to indicate that we're no longer accepting unsolicited code contributions. All code contributions are by invitation only. To read more about why we've taken this step, please refer to this announcement. |
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.
What
Fix
/reviewso it uses the active runtime turn context when selecting model config, especially reasoning effort, instead of relying on potentially stale startup config.Why
Fixes #12495. After switching model/effort in-session (for example to
gpt-5.1-codex-mini+high),/reviewcould still use startup effort (for examplexhigh) and fail with unsupported-effort errors.How
Updated review flow in
core/src/codex.rs:parent_turn_context.configinstead of startup config.select_reasoning_effort_for_model(...), and reused it in both model switching and review.per_turn_config.model_reasoning_effortfrom that helper, preserving current runtime effort when supported and falling back when not.Testing
Added/updated coverage in
core/tests/suite/review.rs:review_uses_current_reasoning_effort_after_model_switchreview_falls_back_reasoning_effort_when_current_effort_is_unsupportedValidation run:
cargo clippy -p codex-core --testscargo test -p codex-coreBefore fix
issue.mp4
After fix
TODO