Skip to content

Python: Add max reasoning effort option - #8857

Open
Brian Caswell (demoray) wants to merge 1 commit into
microsoft:mainfrom
demoray:bcaswell/fix-openai-max-reasoning-effort
Open

Brian Caswell (demoray) wants to merge 1 commit into
microsoft:mainfrom
demoray:bcaswell/fix-openai-max-reasoning-effort

Conversation

@demoray

Copy link
Copy Markdown

Motivation & Context

Current OpenAI reasoning models support max as a distinct reasoning-effort value, but ReasoningOptions rejects it during static type checking. This prevents callers from using the provider-supported value without weakening or duplicating the options type.

Description & Review Guide

  • What are the major changes? Added max to the ReasoningOptions.effort literal.
  • What is the impact of these changes? Callers can type-check OpenAI Responses requests that use reasoning.effort="max". Request forwarding is unchanged and already preserves the value.
  • What do you want reviewers to focus on? Confirm that the provider-specific type accepts the documented value without adding model-specific runtime validation.

Related Issue

Fixes #8856

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings September 29, 2026 16:54
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Sep 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The linked issue also requires publicly exporting ReasoningOptions, which remains unavailable from the package API.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds OpenAI’s max reasoning-effort value to Python type checking.

Changes:

  • Extends ReasoningOptions.effort with "max".
File Description
python/​packages/​openai/​agent_framework_openai/​_chat_client.py Adds the max effort literal.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

"""

effort: Literal["none", "low", "medium", "high", "xhigh"]
effort: Literal["none", "low", "medium", "high", "xhigh", "max"]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the issue creator, I decided that I would not implement that change as this is a larger change to the AI than what is specifically needed.

This branch was successfully deployed

1 active deployment
github-app-auth — 40b17391 Deployed Sep 29, 2026 by demoray via team_check #5559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: ReasoningOptions omits max reasoning effort

2 participants