feat(provider/openai): support GPT-5.6 reasoning and prompt caching controls#17028
Merged
Conversation
n1ckoates
reviewed
Jul 9, 2026
| - **reasoningMode** _'standard' | 'pro'_ | ||
| Controls how much model work GPT-5.6 performs before returning a final answer. `'standard'` is the default. Use `'pro'` for difficult tasks where quality matters more than latency and token usage. | ||
|
|
||
| - **reasoningContext** _'auto' | 'current_turn' | 'all_turns'_ |
Member
There was a problem hiding this comment.
should be camelCase and then normalize to snake_case for api request, if that's what the openai api accepts
n1ckoates
reviewed
Jul 9, 2026
n1ckoates
approved these changes
Jul 9, 2026
This was referenced Jul 9, 2026
gr2m
added a commit
that referenced
this pull request
Jul 9, 2026
…ching controls (#17039) ## Summary V5-native backport of #17028 to `release-v5.0`. - add GPT-5.6 `max` reasoning effort support for Chat Completions - add Responses API `reasoningMode` and `reasoningContext`, including the effective context in provider metadata - support GPT-5.6 implicit and explicit prompt caching, 30-minute TTL, and explicit content breakpoints - expose cache-write tokens for Chat and Responses - backport the GPT-5.6 docs and examples to the v5 layout The GPT-5.6 model prerequisite is already present through #17023. ### V5 adaptations `LanguageModelV2Usage` has no cache-write or uncached-input bucket. This backport leaves that core v5 contract unchanged and exposes writes consistently as `providerMetadata.openai.usage.cacheWriteTokens`; cache reads remain at `usage.cachedInputTokens`. Consequently, the upstream no-cache subtraction is not applicable on v5. V2 also has no provider options on nested tool-output items. A breakpoint on a v5 tool-result part therefore applies to the whole result; for multipart results, the provider places the OpenAI API breakpoint on the final nested output part. ## Test plan - `pnpm test:node` in `packages/openai` — 15 files, 569 tests - `pnpm test:edge` in `packages/openai` — 15 files, 569 tests - targeted OpenAI suites — 4 files, 385 tests - targeted Azure provider suite — 1 file, 48 tests - `pnpm type-check` in `packages/openai` - `pnpm type-check:full` - `pnpm build` in `packages/openai` - `pnpm check` The release branch does not contain `tools/validate-properties-tables.mjs`; this change does not modify a PropertiesTable. Live GPT-5.6 examples were not run because no `OPENAI_API_KEY` was configured. ## Checklist - [x] All commits are signed - [x] Tests have been added / updated - [x] Documentation has been added / updated - [x] A patch changeset has been added - [x] I have reviewed this pull request
gr2m
added a commit
that referenced
this pull request
Jul 9, 2026
…ching controls (#17038) ## Summary Backport of #17028 to `release-v6.0`. - add GPT-5.6 `max` reasoning effort support for Chat Completions - add Responses API `reasoningMode` and `reasoningContext`, including the effective context in provider metadata - support GPT-5.6 implicit and explicit prompt caching, 30-minute TTL, and explicit content breakpoints - report cache-write tokens without double-counting uncached input tokens - backport the GPT-5.6 docs and examples The upstream LanguageModelV4 implementation was adapted to the v6 LanguageModelV3 prompt and file shapes. The GPT-5.6 model prerequisite is already present through #17022. ## Test plan - `pnpm test:node` in `packages/openai` — 15 files, 712 tests - `pnpm test:edge` in `packages/openai` — 15 files, 712 tests - `pnpm test:node` in `packages/azure` — 1 file, 62 tests - `pnpm test:edge` in `packages/azure` — 1 file, 62 tests - `pnpm type-check` in `packages/openai` - `pnpm type-check:full` - dependency-closure builds for OpenAI and Azure - `pnpm check` The release branch does not contain `tools/validate-properties-tables.mjs`; this change does not modify a PropertiesTable. Live GPT-5.6 examples were not run because no `OPENAI_API_KEY` was configured. ## Checklist - [x] All commits are signed - [x] Tests have been added / updated - [x] Documentation has been added / updated - [x] A patch changeset has been added - [x] I have reviewed this pull request
Contributor
|
🚀 Published in:
|
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
maxreasoning effort support for Chat CompletionsreasoningModeandreasoningContextoptions, including the effective reasoning context in provider metadatagenerateTextandstreamTextexamples for pro mode, persisted reasoning context, and explicit prompt cachingFollow-up to #17021.
Test plan
pnpm test:nodeinpackages/openai— 19 files, 772 testspnpm test:edgeinpackages/openai— 19 files, 772 testspnpm type-checkinpackages/openaipnpm type-check:fullpnpm checknode tools/validate-properties-tables.mjsLive GPT-5.6 examples were not run locally because no
OPENAI_API_KEYwas configured.