Repository navigation
Add ExtraHigh and Max values to response reasoning effort level - #1289
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Responses reasoning configuration surface by adding two new effort levels (ExtraHigh and Max) to ResponseReasoningEffortLevel, ensuring the SDK and generated/public API listings reflect the updated service contract. It also updates the TypeSpec source-of-truth and refreshes the recorded test artifacts to validate and lock in the new wire values (e.g., "xhigh").
Changes:
- Added
ResponseReasoningEffortLevel.ExtraHigh("xhigh") andResponseReasoningEffortLevel.Max("max") to the generated model and API exports for all supported TFMs. - Updated the Responses TypeSpec (
models.tsp) to include"xhigh"and"max"in the allowed reasoning effort values. - Updated
ResponsesWithReasoningtest + session recordings to useExtraHighand a newer model version, and asserted the echoed effort level.
Reviewed changes
Copilot reviewed 7 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SessionRecords/ResponsesTests/ResponsesWithReasoningAsync.json | Updated async recording to use "xhigh" reasoning effort and refreshed request/response payload shape/metadata. |
| tests/SessionRecords/ResponsesTests/ResponsesWithReasoning.json | Updated sync recording to use "xhigh" reasoning effort and refreshed request/response payload shape/metadata. |
| tests/Responses/ResponsesTests.cs | Switched test to ResponseReasoningEffortLevel.ExtraHigh, updated model id, and added an assertion for the returned effort level. |
| specification/base/typespec/responses/models.tsp | Extended ResponsesReasoningEffort union with ExtraHigh: "xhigh" and "max". |
| OpenAI.Responses/src/Generated/Models/ResponseReasoningEffortLevel.cs | Added constants + static members for ExtraHigh and Max in the generated effort level wrapper. |
| api/netstandard2.0/OpenAI.Responses.netstandard2.0.cs | Updated public API listing to include ExtraHigh and Max. |
| api/net8.0/OpenAI.Responses.net8.0.cs | Updated public API listing to include ExtraHigh and Max. |
| api/net10.0/OpenAI.Responses.net10.0.cs | Updated public API listing to include ExtraHigh and Max. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ae705ce to
ffcb44b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (1)
specification/base/typespec/responses/models.tsp:18
- The
ResponsesReasoningEffortdocstring still lists supported values up throughhigh, but the union now also includesxhighandmax. This makes the TypeSpec documentation (and any generated docs derived from it) misleading.
Currently supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
reasoning effort can result in faster responses and fewer tokens used
on reasoning in a response.
""")
union ResponsesReasoningEffort {
ffcb44b to
958a8e1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 958a8e112f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
958a8e1 to
60df1a8
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This pull request introduces two new reasoning effort levels—
ExtraHighandMax—to theResponseReasoningEffortLeveltype across all supported .NET versions and updates the corresponding type specification. It also updates the test suite and session records to use the newExtraHigheffort level, reflecting changes in API model versions, test data, and output formats.Enhancements to Reasoning Effort Levels:
ExtraHighandMaxto theResponseReasoningEffortLevelstruct inOpenAI.Responsesfor .NET 8.0, .NET 10.0, and .NET Standard 2.0, enabling higher granularity in specifying reasoning effort. [1] [2]models.tspto includeExtraHigh("xhigh") andmaxas valid values for reasoning effort.Test and Session Record Updates:
ResponsesWithReasoningtest to use the newExtraHigheffort level and the updated model version (gpt-5.6). Also added an assertion to verify the correct effort level is used in the response. [1] [2]ResponsesWithReasoning.jsonandResponsesWithReasoningAsync.json) to reflect the new effort level (xhigh), model version, and various changes in API request/response structure and metadata, including more detailed tool usage and token usage statistics. [1] [2] [3] [4] [5] [6]