@ai-sdk/openai 4.0.81 → 4.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -192,9 +192,9 @@ The following provider options are available:
192
192
  Reasoning effort for reasoning models. Defaults to `medium`. If you use `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
193
193
 
194
194
  <Note>
195
- Supported reasoning efforts vary by model. GPT-5.6 and GPT-6 support `'none'`,
196
- `'low'`, `'medium'`, `'high'`, `'xhigh'`, and `'max'`. GPT-6 Astra does not
197
- support `'none'`.
195
+ Supported reasoning efforts vary by model. GPT-5.6, GPT-6 Sol, and GPT-6 Luna
196
+ support `'none'`, `'low'`, `'medium'`, `'high'`, `'xhigh'`, and `'max'`. GPT-6
197
+ Astra and GPT-6.1 Sol do not support `'none'`.
198
198
  </Note>
199
199
 
200
200
  <Note type="warning">
@@ -220,8 +220,8 @@ The following provider options are available:
220
220
  - **reasoningContext** _'auto' | 'current_turn' | 'all_turns'_
221
221
  Controls which available reasoning items GPT-5.6 can reuse. `'auto'` uses the model default, `'current_turn'` excludes reasoning from earlier turns, and `'all_turns'` makes compatible earlier reasoning available. The effective context is returned as `providerMetadata.openai.reasoningContext`.
222
222
 
223
- - **reasoningSummary** _'auto' | 'detailed'_
224
- Controls whether the model returns its reasoning process. Set to `'auto'` for a condensed summary, `'detailed'` for more comprehensive reasoning. Defaults to `undefined` (no reasoning summaries). When enabled, reasoning summaries appear in the stream as events with type `'reasoning'` and in non-streaming responses within the `reasoning` field.
223
+ - **reasoningSummary** _'auto' | 'detailed' | null_
224
+ Controls whether the model returns its reasoning process. Set to `'auto'` for a condensed summary, `'detailed'` for more comprehensive reasoning, or `null` to omit reasoning summaries. Defaults to `'detailed'` when `reasoningEffort` is set to a value other than `'none'`, and to no reasoning summaries otherwise. When enabled, reasoning summaries appear in the stream as events with type `'reasoning'` and in non-streaming responses within the `reasoning` field.
225
225
 
226
226
  - **strictJsonSchema** _boolean_
227
227
  Whether to use strict JSON schema validation. Defaults to `true`.
@@ -1323,6 +1323,7 @@ const result = await generateText({
1323
1323
  apply_patch: openai.tools.applyPatch({
1324
1324
  execute: async ({ callId, operation }) => {
1325
1325
  // ... your implementation for applying the diffs.
1326
+ return { status: 'completed' };
1326
1327
  },
1327
1328
  }),
1328
1329
  },
@@ -1657,7 +1658,7 @@ name those tools as you declared them instead.
1657
1658
  #### Image Inputs
1658
1659
 
1659
1660
  The OpenAI Responses API supports Image inputs for appropriate models.
1660
- You can pass Image files as part of the message content using the 'image' type:
1661
+ You can pass Image files as part of the message content using the `file` type with an `image` media type:
1661
1662
 
1662
1663
  ```ts
1663
1664
  const result = await generateText({
@@ -1682,7 +1683,7 @@ const result = await generateText({
1682
1683
  ```
1683
1684
 
1684
1685
  The model will have access to the image and will respond to questions about it.
1685
- The image should be passed using the `image` field.
1686
+ The image should be passed using the `data` field.
1686
1687
 
1687
1688
  You can also pass a file-id from the OpenAI Files API.
1688
1689
 
@@ -2457,7 +2458,7 @@ const logprobs = openaiMetadata?.logprobs;
2457
2458
  #### Image Support
2458
2459
 
2459
2460
  The OpenAI Chat API supports Image inputs for appropriate models.
2460
- You can pass Image files as part of the message content using the 'image' type:
2461
+ You can pass Image files as part of the message content using the `file` type with an `image` media type:
2461
2462
 
2462
2463
  ```ts
2463
2464
  const result = await generateText({
@@ -2482,7 +2483,7 @@ const result = await generateText({
2482
2483
  ```
2483
2484
 
2484
2485
  The model will have access to the image and will respond to questions about it.
2485
- The image should be passed using the `image` field.
2486
+ The image should be passed using the `data` field.
2486
2487
 
2487
2488
  You can also pass the URL of an image.
2488
2489
 
@@ -2878,6 +2879,7 @@ The following optional provider options are available for OpenAI completion mode
2878
2879
  | Model | Image Input | Audio Input | Object Generation | Tool Usage |
2879
2880
  | --------------------- | ----------- | ----------- | ----------------- | ---------- |
2880
2881
  | `gpt-6-astra` | <Check /> | <Cross /> | <Check /> | <Check /> |
2882
+ | `gpt-6.1-sol` | <Check /> | <Cross /> | <Check /> | <Check /> |
2881
2883
  | `gpt-6-luna` | <Check /> | <Cross /> | <Check /> | <Check /> |
2882
2884
  | `gpt-6-sol` | <Check /> | <Cross /> | <Check /> | <Check /> |
2883
2885
  | `gpt-5.6` | <Check /> | <Cross /> | <Check /> | <Check /> |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.81",
3
+ "version": "4.0.82",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -35,14 +35,14 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@ai-sdk/provider": "4.0.19",
39
- "@ai-sdk/provider-utils": "5.0.51"
38
+ "@ai-sdk/provider": "4.0.20",
39
+ "@ai-sdk/provider-utils": "5.0.52"
40
40
  },
41
41
  "devDependencies": {
42
- "@ai-sdk/test-server": "2.0.2",
42
+ "@ai-sdk/test-server": "2.0.3",
43
43
  "@types/node": "22.19.19",
44
44
  "@vercel/ai-tsconfig": "0.0.0",
45
- "tsup": "^8.5.1",
45
+ "tsdown": "^0.23.0",
46
46
  "typescript": "5.8.3",
47
47
  "zod": "3.25.76"
48
48
  },
@@ -69,9 +69,9 @@
69
69
  "ai"
70
70
  ],
71
71
  "scripts": {
72
- "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
73
- "build:watch": "pnpm clean && tsup --watch",
74
- "clean": "del-cli dist docs *.tsbuildinfo",
72
+ "build": "pnpm clean && tsdown",
73
+ "build:watch": "pnpm clean && tsdown --watch",
74
+ "clean": "del-cli docs *.tsbuildinfo",
75
75
  "type-check": "tsc --build",
76
76
  "test": "pnpm test:node && pnpm test:edge",
77
77
  "test:update": "pnpm test:node -u",
@@ -71,6 +71,7 @@ export type OpenAIChatModelId =
71
71
  | 'gpt-5.6-sol'
72
72
  | 'gpt-5.6-terra'
73
73
  | 'gpt-6-astra'
74
+ | 'gpt-6.1-sol'
74
75
  | 'gpt-6-luna'
75
76
  | 'gpt-6-sol'
76
77
  | (string & {});
@@ -58,6 +58,7 @@ export const openaiResponsesReasoningModelIds = [
58
58
  'gpt-5.6-sol',
59
59
  'gpt-5.6-terra',
60
60
  'gpt-6-astra',
61
+ 'gpt-6.1-sol',
61
62
  'gpt-6-luna',
62
63
  'gpt-6-sol',
63
64
  ] as const;
@@ -133,6 +134,7 @@ export type OpenAIResponsesModelId =
133
134
  | 'gpt-5.6-sol'
134
135
  | 'gpt-5.6-terra'
135
136
  | 'gpt-6-astra'
137
+ | 'gpt-6.1-sol'
136
138
  | 'gpt-6-luna'
137
139
  | 'gpt-6-sol'
138
140
  | 'gpt-5-2025-08-07'