-
Notifications
You must be signed in to change notification settings - Fork 5k
feat: reasoning effort as optional #3527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
codex/codex-rs/core/src/codex.rs
Lines 1217 to 1224 in 658eb6e
// Build a new client with per‑turn reasoning settings. | |
// Reuse the same provider and session id; auth defaults to env/API key. | |
let client = ModelClient::new( | |
Arc::new(per_turn_config), | |
auth_manager, | |
provider, | |
effort, | |
summary, |
[P1] Preserve existing reasoning effort when send_user_turn omits it
The new SendUserTurnParams
makes effort
optional, but the per‑turn handling now passes that value straight into ModelClient::new
. When a client leaves effort
out of the request (to rely on the session’s current setting), this code forwards None
to the model client, which disables reasoning for the whole turn even if the session was configured with a non‑empty effort. Prior to this commit the field was required, so the existing value was always supplied. This code should mirror the logic used in OverrideTurnContext
by falling back to turn_context.client.get_reasoning_effort()
when the parameter is absent, otherwise optional requests unintentionally drop reasoning output.
Reply with @codex fix comments
to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
Allow the reasoning effort to be optional