Skip to content

Commit fdb6d5d

Browse files
gr2mclaude
andauthored
feat(provider/openai,provider/gateway): add gpt-5.6 model id (#17021)
## Background OpenAI released GPT-5.6. ## Summary Add the `gpt-5.6` model ID: - `@ai-sdk/openai`: added `gpt-5.6` and the `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna` snapshot IDs to the chat and responses model ID types, the responses reasoning model IDs, and the language model capabilities (GPT-5.6 supports temperature/topP/logProbs when `reasoningEffort` is `none`, like GPT-5.1+). - `@ai-sdk/gateway`: added `openai/gpt-5.6` to the gateway model IDs. - Docs: added `gpt-5.6` to the model capability tables (foundations, OpenAI provider page, providers index). - Examples: updated examples that used a prior flagship GPT model (`gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.4`, `gpt-5.5`) as a generic default to use `gpt-5.6`. Examples that are deliberately model-specific (codex/mini/nano/pro/chat-latest/dated variants, Azure deployment names, files named after a model) were left unchanged. Added `gpt-5.6` to the e2e chat model list. Restored `generate-text/openai/basic.ts` to its pre-debugging state (keeping `gpt-5.6`) and added `reasoning-max.ts` examples (generate-text + stream-text) demonstrating `reasoningEffort: 'max'`. ## Manual Verification Ran the new `examples/ai-functions/src/generate-text/openai/reasoning-max.ts` and `examples/ai-functions/src/stream-text/openai/reasoning-max.ts` against the live OpenAI API: `reasoningEffort: 'max'` is accepted and returns reasoning summaries. Ran the updated `examples/ai-functions/src/stream-text/openai/reasoning.ts` against the live OpenAI API with `gpt-5.6`: streaming works, including reasoning summary deltas and reasoning provider metadata (the API resolves the ID to the `gpt-5.6-sol` snapshot). Note: `openai/gpt-5.6` is not yet served by the AI Gateway (`model_not_found` as of this PR); the gateway model ID addition is launch preparation. ## Checklist - [ ] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 17d66c5 commit fdb6d5d

88 files changed

Lines changed: 236 additions & 82 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/spicy-pandas-repeat.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@ai-sdk/openai': patch
3+
'@ai-sdk/gateway': patch
4+
---
5+
6+
feat(provider/openai,provider/gateway): add gpt-5.6 model ids

‎content/docs/02-foundations/02-providers-and-models.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ Here are the capabilities of popular models:
116116
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3` | <Cross /> | <Check /> | <Check /> | <Check /> |
117117
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3-mini` | <Cross /> | <Check /> | <Check /> | <Check /> |
118118
| [Vercel](/providers/ai-sdk-providers/vercel) | `v0-1.0-md` | <Check /> | <Check /> | <Check /> | <Check /> |
119+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6` | <Check /> | <Check /> | <Check /> | <Check /> |
120+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-luna` | <Check /> | <Check /> | <Check /> | <Check /> |
121+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-sol` | <Check /> | <Check /> | <Check /> | <Check /> |
122+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-terra` | <Check /> | <Check /> | <Check /> | <Check /> |
119123
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.5` | <Check /> | <Check /> | <Check /> | <Check /> |
120124
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.4-pro` | <Check /> | <Check /> | <Check /> | <Check /> |
121125
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.4` | <Check /> | <Check /> | <Check /> | <Check /> |

‎content/providers/01-ai-sdk-providers/03-openai.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,10 @@ The following optional provider options are available for OpenAI completion mode
23492349

23502350
| Model | Image Input | Audio Input | Object Generation | Tool Usage |
23512351
| --------------------- | ----------- | ----------- | ----------------- | ---------- |
2352+
| `gpt-5.6` | <Check /> | <Cross /> | <Check /> | <Check /> |
2353+
| `gpt-5.6-luna` | <Check /> | <Cross /> | <Check /> | <Check /> |
2354+
| `gpt-5.6-sol` | <Check /> | <Cross /> | <Check /> | <Check /> |
2355+
| `gpt-5.6-terra` | <Check /> | <Cross /> | <Check /> | <Check /> |
23522356
| `gpt-5.5` | <Check /> | <Cross /> | <Check /> | <Check /> |
23532357
| `gpt-5.4-pro` | <Check /> | <Cross /> | <Check /> | <Check /> |
23542358
| `gpt-5.4` | <Check /> | <Cross /> | <Check /> | <Check /> |

‎content/providers/01-ai-sdk-providers/index.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Not all providers support all AI SDK features. Here's a quick comparison of the
2525
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3` | <Cross /> | <Check /> | <Check /> | <Check /> |
2626
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3-mini` | <Cross /> | <Check /> | <Check /> | <Check /> |
2727
| [Vercel](/providers/ai-sdk-providers/vercel) | `v0-1.0-md` | <Check /> | <Check /> | <Check /> | <Check /> |
28+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6` | <Check /> | <Check /> | <Check /> | <Check /> |
29+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-luna` | <Check /> | <Check /> | <Check /> | <Check /> |
30+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-sol` | <Check /> | <Check /> | <Check /> | <Check /> |
31+
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-terra` | <Check /> | <Check /> | <Check /> | <Check /> |
2832
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.5` | <Check /> | <Check /> | <Check /> | <Check /> |
2933
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.4-mini` | <Check /> | <Check /> | <Check /> | <Check /> |
3034
| [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.4-nano` | <Check /> | <Check /> | <Check /> | <Check /> |

‎examples/ai-e2e-next/agent/openai/apply-patch-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async function ensureWorkspaceExists() {
2020
ensureWorkspaceExists();
2121

2222
export const openaiApplyPatchAgent = new ToolLoopAgent({
23-
model: openai.responses('gpt-5.1'),
23+
model: openai.responses('gpt-5.6'),
2424
tools: {
2525
apply_patch: openai.tools.applyPatch({
2626
execute: createApplyPatchExecutor(workspaceRoot),

‎examples/ai-e2e-next/agent/openai/compaction-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const preloadedMessages: ModelMessage[] = [
227227
];
228228

229229
export const openaiCompactionAgent = new ToolLoopAgent({
230-
model: openai.responses('gpt-5.2'),
230+
model: openai.responses('gpt-5.6'),
231231
providerOptions: {
232232
openai: {
233233
store: false,

‎examples/ai-e2e-next/agent/openai/mcp-approval-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { openai } from '@ai-sdk/openai';
22
import { ToolLoopAgent, type InferAgentUIMessage } from 'ai';
33
export const openaiMCPApprovalAgent = new ToolLoopAgent({
4-
model: openai.responses('gpt-5'),
4+
model: openai.responses('gpt-5.6'),
55
instructions:
66
'You are a helpful assistant that can shorten links. ' +
77
'Use the MCP tools available to you to shorten links when needed. ' +

‎examples/ai-e2e-next/agent/openai/sandbox-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { openai } from '@ai-sdk/openai';
33
import { ToolLoopAgent, type InferAgentUIMessage } from 'ai';
44

55
export const sandboxAgent = new ToolLoopAgent({
6-
model: openai('gpt-5.5'),
6+
model: openai('gpt-5.6'),
77

88
tools: {
99
shell: sandboxShellTool(),

‎examples/ai-e2e-next/agent/openai/shell-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function executeShellCommand(
6161
}
6262

6363
export const openaiShellAgent = new ToolLoopAgent({
64-
model: openai.responses('gpt-5.1'),
64+
model: openai.responses('gpt-5.6'),
6565
instructions:
6666
'You have access to a shell tool that can execute commands on the local filesystem. ' +
6767
'Use the shell tool when you need to perform file operations or run commands. ' +

‎examples/ai-e2e-next/agent/openai/shell-container-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { openai } from '@ai-sdk/openai';
22
import { ToolLoopAgent, type InferAgentUIMessage } from 'ai';
33
export const openaiShellContainerAgent = new ToolLoopAgent({
4-
model: openai.responses('gpt-5.4'),
4+
model: openai.responses('gpt-5.6'),
55
instructions:
66
'You have access to a shell tool running in a hosted container. ' +
77
'Commands are executed server-side by OpenAI.',

0 commit comments

Comments
 (0)