@depup/ai-sdk__openai 3.0.52-depup.0 → 4.0.18-depup.0

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.
Files changed (76) hide show
  1. package/CHANGELOG.md +952 -30
  2. package/README.md +2 -2
  3. package/changes.json +1 -1
  4. package/dist/index.d.ts +490 -85
  5. package/dist/index.js +4147 -1879
  6. package/dist/index.js.map +1 -1
  7. package/dist/internal/index.d.ts +581 -71
  8. package/dist/internal/index.js +3490 -1886
  9. package/dist/internal/index.js.map +1 -1
  10. package/docs/03-openai.mdx +528 -165
  11. package/package.json +16 -16
  12. package/src/chat/convert-openai-chat-usage.ts +7 -4
  13. package/src/chat/convert-to-openai-chat-messages.ts +212 -77
  14. package/src/chat/map-openai-finish-reason.ts +2 -2
  15. package/src/chat/openai-chat-api.ts +8 -2
  16. package/src/chat/{openai-chat-options.ts → openai-chat-language-model-options.ts} +27 -3
  17. package/src/chat/openai-chat-language-model.ts +106 -171
  18. package/src/chat/openai-chat-prepare-tools.ts +7 -7
  19. package/src/chat/openai-chat-prompt.ts +8 -4
  20. package/src/completion/convert-openai-completion-usage.ts +2 -2
  21. package/src/completion/convert-to-openai-completion-prompt.ts +2 -3
  22. package/src/completion/map-openai-finish-reason.ts +2 -2
  23. package/src/completion/openai-completion-api.ts +5 -2
  24. package/src/completion/{openai-completion-options.ts → openai-completion-language-model-options.ts} +5 -1
  25. package/src/completion/openai-completion-language-model.ts +73 -37
  26. package/src/embedding/{openai-embedding-options.ts → openai-embedding-model-options.ts} +5 -1
  27. package/src/embedding/openai-embedding-model.ts +26 -9
  28. package/src/files/openai-files-api.ts +17 -0
  29. package/src/files/openai-files-options.ts +22 -0
  30. package/src/files/openai-files.ts +100 -0
  31. package/src/image/openai-image-model-options.ts +123 -0
  32. package/src/image/openai-image-model.ts +71 -92
  33. package/src/index.ts +19 -6
  34. package/src/internal/index.ts +7 -6
  35. package/src/openai-config.ts +11 -7
  36. package/src/openai-language-model-capabilities.ts +4 -2
  37. package/src/openai-provider.ts +116 -34
  38. package/src/openai-stream-error.ts +181 -0
  39. package/src/openai-tools.ts +11 -1
  40. package/src/realtime/index.ts +2 -0
  41. package/src/realtime/openai-realtime-event-mapper.ts +436 -0
  42. package/src/realtime/openai-realtime-model-options.ts +3 -0
  43. package/src/realtime/openai-realtime-model.ts +111 -0
  44. package/src/responses/convert-openai-responses-usage.ts +10 -4
  45. package/src/responses/convert-to-openai-responses-input.ts +477 -112
  46. package/src/responses/map-openai-responses-finish-reason.ts +2 -2
  47. package/src/responses/openai-responses-api.ts +276 -54
  48. package/src/responses/{openai-responses-options.ts → openai-responses-language-model-options.ts} +89 -9
  49. package/src/responses/openai-responses-language-model.ts +469 -107
  50. package/src/responses/openai-responses-prepare-tools.ts +120 -26
  51. package/src/responses/openai-responses-provider-metadata.ts +13 -2
  52. package/src/skills/openai-skills-api.ts +31 -0
  53. package/src/skills/openai-skills.ts +83 -0
  54. package/src/speech/{openai-speech-options.ts → openai-speech-model-options.ts} +5 -1
  55. package/src/speech/openai-speech-model.ts +29 -13
  56. package/src/tool/apply-patch.ts +33 -32
  57. package/src/tool/code-interpreter.ts +40 -41
  58. package/src/tool/computer.ts +147 -0
  59. package/src/tool/custom.ts +2 -8
  60. package/src/tool/file-search.ts +3 -3
  61. package/src/tool/image-generation.ts +2 -2
  62. package/src/tool/local-shell.ts +2 -2
  63. package/src/tool/mcp.ts +3 -3
  64. package/src/tool/shell.ts +9 -4
  65. package/src/tool/tool-search.ts +4 -4
  66. package/src/tool/web-search-preview.ts +2 -2
  67. package/src/tool/web-search.ts +10 -2
  68. package/src/transcription/{openai-transcription-options.ts → openai-transcription-model-options.ts} +25 -1
  69. package/src/transcription/openai-transcription-model.ts +385 -20
  70. package/dist/index.d.mts +0 -1193
  71. package/dist/index.mjs +0 -6846
  72. package/dist/index.mjs.map +0 -1
  73. package/dist/internal/index.d.mts +0 -1187
  74. package/dist/internal/index.mjs +0 -6648
  75. package/dist/internal/index.mjs.map +0 -1
  76. package/src/image/openai-image-options.ts +0 -31
package/CHANGELOG.md CHANGED
@@ -1,78 +1,1002 @@
1
1
  # @ai-sdk/openai
2
2
 
3
- ## 3.0.52
3
+ ## 4.0.18
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - d42076d: Add AI Gateway hint to provider READMEs
7
+ - bc43dc2: Preserve stored tool search output item IDs from provider metadata.
8
8
 
9
- ## 3.0.51
9
+ ## 4.0.17
10
10
 
11
11
  ### Patch Changes
12
12
 
13
- - Updated dependencies [6247886]
14
- - @ai-sdk/provider-utils@4.0.23
13
+ - Updated dependencies [02ffdcb]
14
+ - Updated dependencies [76cb673]
15
+ - @ai-sdk/provider-utils@5.0.12
15
16
 
16
- ## 3.0.50
17
+ ## 4.0.16
17
18
 
18
19
  ### Patch Changes
19
20
 
20
- - Updated dependencies [0469aed]
21
- - @ai-sdk/provider-utils@4.0.22
21
+ - 75f86f4: fix(provider/openai, provider/open-responses): throw a descriptive error when the Responses API returns a 200 with no `output`
22
22
 
23
- ## 3.0.49
23
+ A successful (200) Responses body missing the `output` array previously threw an opaque `output is not iterable` TypeError from `doGenerate`. Both providers now surface a clear `APICallError` ("Responses API returned no output …"), including the incomplete-details reason (and status, for open-responses) when present. When the body includes a `response.error`, its message is surfaced first so upstream error details aren't masked by the generic fallback. This makes malformed/incomplete upstream responses actionable instead of a cryptic crash.
24
+
25
+ - Updated dependencies [cd06458]
26
+ - @ai-sdk/provider-utils@5.0.11
27
+
28
+ ## 4.0.15
29
+
30
+ ### Patch Changes
31
+
32
+ - 0063c2d: Add the client-executed OpenAI Responses API computer tool with batched actions and screenshot outputs.
33
+
34
+ ## 4.0.14
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [31c7be8]
39
+ - @ai-sdk/provider-utils@5.0.10
40
+
41
+ ## 4.0.13
42
+
43
+ ### Patch Changes
44
+
45
+ - 7805e4a: Fix realtime transcription auth header handling: per-call `authorization` headers now override configuration headers regardless of header-key casing (last case-variant wins), and the `Bearer` scheme is matched case-insensitively.
46
+ - cd12954: Reject empty OpenAI, Anthropic, and Replicate base URLs with a helpful AI SDK
47
+ invalid argument error.
48
+ - Updated dependencies [4be62c1]
49
+ - Updated dependencies [7805e4a]
50
+ - Updated dependencies [cd12954]
51
+ - @ai-sdk/provider-utils@5.0.9
52
+
53
+ ## 4.0.12
54
+
55
+ ### Patch Changes
56
+
57
+ - e193290: Add `connectToWebSocket` to `@ai-sdk/provider-utils`: a shared WebSocket connect layer (constructor resolution, header hygiene, abort wiring, message decoding) analogous to `postToApi` for HTTP. The openai and xai streaming transcription models now use it instead of hand-rolled connects. For openai and xai this also means WebSocket constructor failures now surface as stream errors instead of throwing synchronously from `doStream`, an already-aborted signal no longer constructs a socket, and the caller's audio stream is cancelled on pre-open failures. Messages are processed in order with close handling deferred behind pending frames, audio send loops apply backpressure via the socket's bufferedAmount, and failed sends cancel the caller's audio stream.
58
+ - e193290: Fix streaming transcription over header-capable WebSocket implementations: the realtime WebSocket handshake sent the api key in both the `openai-insecure-api-key` subprotocol and the `Authorization` header, which OpenAI rejects ("You must only send one of protocol api key and Authorization header"). The Authorization header is now stripped when the subprotocol carries the key.
59
+ - e193290: Strip undefined header values before the streaming transcription WebSocket constructor (header-capable implementations like `ws` throw on undefined values).
60
+ - Updated dependencies [e193290]
61
+ - @ai-sdk/provider-utils@5.0.8
62
+
63
+ ## 4.0.11
64
+
65
+ ### Patch Changes
66
+
67
+ - b2b1bb9: feat(provider/openai): add GPT-5.6 reasoning and prompt cache controls
68
+
69
+ ## 4.0.10
70
+
71
+ ### Patch Changes
72
+
73
+ - fdb6d5d: feat(provider/openai,provider/gateway): add gpt-5.6 model ids
74
+ - Updated dependencies [0f93c57]
75
+ - @ai-sdk/provider@4.0.3
76
+ - @ai-sdk/provider-utils@5.0.7
77
+
78
+ ## 4.0.9
79
+
80
+ ### Patch Changes
81
+
82
+ - ac306ed: Fix `StreamingToolCallTracker` finalizing streaming tool calls on parsable partial JSON. Tool calls now only finalize during stream flush, restoring the behavior of #13137: a parsable argument buffer can still be the prefix of a longer argument string, so finalizing early could act on truncated tool inputs.
83
+ - Updated dependencies [ac306ed]
84
+ - @ai-sdk/provider-utils@5.0.6
85
+
86
+ ## 4.0.8
87
+
88
+ ### Patch Changes
89
+
90
+ - b51ed36: Send inline image file parts in OpenAI chat requests as data URLs instead of bare base64 strings.
91
+
92
+ ## 4.0.7
93
+
94
+ ### Patch Changes
95
+
96
+ - 5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAI `gpt-realtime-whisper` and xAI WebSocket STT.
97
+ - Updated dependencies [5c5c0f5]
98
+ - @ai-sdk/provider@4.0.2
99
+ - @ai-sdk/provider-utils@5.0.5
100
+
101
+ ## 4.0.6
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies [c6f5e62]
106
+ - @ai-sdk/provider-utils@5.0.4
107
+
108
+ ## 4.0.5
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies [8c616f0]
113
+ - @ai-sdk/provider-utils@5.0.3
114
+
115
+ ## 4.0.4
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies [0274f34]
120
+ - @ai-sdk/provider@4.0.1
121
+ - @ai-sdk/provider-utils@5.0.2
122
+
123
+ ## 4.0.3
124
+
125
+ ### Patch Changes
126
+
127
+ - 1ead90c: Return a helpful error when the Responses stream parser receives Chat Completions chunks.
128
+
129
+ ## 4.0.2
24
130
 
25
131
  ### Patch Changes
26
132
 
27
- - bc01093: fix(openai): support file-url parts in tool output content
133
+ - Updated dependencies [6a436e3]
134
+ - @ai-sdk/provider-utils@5.0.1
28
135
 
29
- ## 3.0.48
136
+ ## 4.0.1
30
137
 
31
138
  ### Patch Changes
32
139
 
33
- - 9c548de: Add `gpt-5.4-mini`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano`, and `gpt-5.4-nano-2026-03-17` models.
34
- - bcb04df: fix(openai): preserve raw finish reason for failed responses stream events
140
+ - 9507724: feat(openai): add support for web_search_call.results include option
141
+
142
+ ## 4.0.0
143
+
144
+ ### Major Changes
145
+
146
+ - 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
147
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
148
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
149
+ - 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
150
+ - 61753c3: ### `@ai-sdk/openai`: remove redundant `name` argument from `openai.tools.customTool()`
151
+
152
+ `openai.tools.customTool()` no longer accepts a `name` field. the tool name is now derived from the sdk tool key (the object key in the `tools` object).
153
+
154
+ migration: remove the `name` property from `customTool()` calls. the object key is now used as the tool name sent to the openai api.
155
+
156
+ before:
157
+
158
+ ```ts
159
+ tools: {
160
+ write_sql: openai.tools.customTool({
161
+ name: 'write_sql',
162
+ description: '...',
163
+ }),
164
+ }
165
+ ```
166
+
167
+ after:
168
+
169
+ ```ts
170
+ tools: {
171
+ write_sql: openai.tools.customTool({
172
+ description: '...',
173
+ }),
174
+ }
175
+ ```
176
+
177
+ ### `@ai-sdk/provider-utils`: `createToolNameMapping()` no longer accepts the `resolveProviderToolName` parameter
178
+
179
+ before: tool name can be set dynamically
180
+
181
+ ```ts
182
+ const toolNameMapping = createToolNameMapping({
183
+ tools,
184
+ providerToolNames: {
185
+ "openai.code_interpreter": "code_interpreter",
186
+ "openai.file_search": "file_search",
187
+ "openai.image_generation": "image_generation",
188
+ "openai.local_shell": "local_shell",
189
+ "openai.shell": "shell",
190
+ "openai.web_search": "web_search",
191
+ "openai.web_search_preview": "web_search_preview",
192
+ "openai.mcp": "mcp",
193
+ "openai.apply_patch": "apply_patch",
194
+ },
195
+ resolveProviderToolName: (tool) =>
196
+ tool.id === "openai.custom"
197
+ ? (tool.args as { name?: string }).name
198
+ : undefined,
199
+ });
200
+ ```
201
+
202
+ after: tool name is static based on `tools` keys
203
+
204
+ ```
205
+ const toolNameMapping = createToolNameMapping({
206
+ tools,
207
+ providerToolNames: {
208
+ 'openai.code_interpreter': 'code_interpreter',
209
+ 'openai.file_search': 'file_search',
210
+ 'openai.image_generation': 'image_generation',
211
+ 'openai.local_shell': 'local_shell',
212
+ 'openai.shell': 'shell',
213
+ 'openai.web_search': 'web_search',
214
+ 'openai.web_search_preview': 'web_search_preview',
215
+ 'openai.mcp': 'mcp',
216
+ 'openai.apply_patch': 'apply_patch',
217
+ }
218
+ });
219
+ ```
220
+
221
+ - 8359612: Start v7 pre-release
222
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
223
+
224
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
225
+
226
+ ### Patch Changes
227
+
228
+ - 29e6ac6: feat: add allowedTools provider option for OpenAI Responses
229
+ - 38fc777: Add AI Gateway hint to provider READMEs
230
+ - a71d345: fix(provider/openai): drop reasoning parts without encrypted content when store: false
231
+ - 7afaece: feat(provider/openai): add GPT-5.4 model support
232
+ - 365da1a: Add `gpt-5.4-mini`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano`, and `gpt-5.4-nano-2026-03-17` models.
233
+ - 1772a63: Default OpenAI Responses reasoning summaries to detailed when reasoning effort is enabled.
234
+ - 83f9d04: feat(openai): upgrade v3 specs to v4
235
+ - 45b3d76: fix(security): prevent streaming tool calls from finalizing on parsable partial JSON
236
+
237
+ Streaming tool call arguments were finalized using `isParsableJson()` as a heuristic for completion. If partial accumulated JSON happened to be valid JSON before all chunks arrived, the tool call would be executed with incomplete arguments. Tool call finalization now only occurs in `flush()` after the stream is fully consumed.
238
+
239
+ - bf837fe: feat(provider/gateway): add speech and transcription model support
240
+ - d6c79e3: feat(openai): add GPT-5.5 chat model IDs
241
+ - e776fc7: feat(provider/azure):web search tool in the Azure OpenAI Responses API.
242
+ - 817a1a6: fix(openai): support file-url parts in tool output content
243
+ - 1f509d4: fix(ai): force template check on 'kind' param
244
+ - 0c4ac8a: fix(openai): default undefined tool-call input to empty object before serializing tool arguments
245
+ - 9f0e36c: trigger release for all packages after provenance setup
246
+ - 58a2ad7: fix: more precise default message for tool execution denial
247
+ - 6a5800e: feat(openai): add namespaces for tool definitions
248
+ - ae7f932: fix(openai): throw retryable errors for OpenAI stream failures before output starts
249
+ - 2c4767d: feat(openai): add orchestration token usage details to Responses API usage
250
+ - bada0f3: feat(openai): preserve `namespace` on function_call output items
251
+ - cd3de8b: feat(openai): forward `web_search_call.action.queries` from Responses API
252
+ - 94eba1b: fix(openai): round-trip `namespace` on function_call input items
253
+
254
+ When `tool_search` dispatches a deferred tool, the resulting `function_call` carries a `namespace` field identifying which deferred-tool group the model picked. `#14789` preserved this on the read side (`providerMetadata.openai.namespace`), but the write side still serialized `function_call` input items without `namespace`. Multi-step / multi-turn conversations then failed with `Missing namespace for function_call '<name>'. ... Round-trip the model's function_call item with its namespace field included.`
255
+
256
+ `convert-to-openai-responses-input.ts` now reads `namespace` from `providerOptions.openai.namespace` (or `providerMetadata.openai.namespace`) on `tool-call` parts and includes it on the serialized `function_call` item, mirroring how `itemId` is round-tripped.
257
+
258
+ - 7bbc194: feat(provider/openai): forward imageDetail providerOptions on tool-result image content
259
+ - 156cdf0: feat(openai): add new tool search tool
260
+ - f7295cb: revert incorrect fix https://github.com/vercel/ai/pull/13172
261
+ - 9ea40e0: chore(provider/openai): add type for image model options for type-safe processing
262
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
263
+ - f807e45: Extract shared `StreamingToolCallTracker` class into `@ai-sdk/provider-utils` to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing `generateId()` fallback for `toolCallId` in Alibaba's `doGenerate` path and ensures all providers finalize unfinished tool calls during stream flush.
264
+ - d9a1e9a: feat(openai): add server side compaction for openai
265
+ - 0c4c275: trigger initial canary release
266
+ - ac18f89: feat(provider/openai): add `gpt-5.3-chat-latest`
267
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
268
+ - cd9c311: fix(openai, openai-compatible): only send null content for assistant messages with tool calls
269
+ - e6376c2: fix(openai): preserve raw finish reason for failed responses stream events
35
270
 
36
271
  Handle `response.failed` chunks in Responses API streaming so `finishReason.raw` is preserved from `incomplete_details.reason` (e.g. `max_output_tokens`), and map failed-without-reason cases to unified `error` instead of `other`.
37
272
 
38
- ## 3.0.47
273
+ - ce769dd: feat(provider): add experimental Realtime API support for voice conversations
274
+
275
+ Adds first-class support for realtime (speech-to-speech) APIs:
276
+
277
+ - `Experimental_RealtimeModelV4` spec in `@ai-sdk/provider` with normalized event types and factory
278
+ - OpenAI, Google, and xAI realtime provider implementations
279
+ - `openai.experimental_realtime()` / `google.experimental_realtime()` / `xai.experimental_realtime()` work in both server and browser
280
+ - `.getToken()` static method on each provider for server-side ephemeral token creation
281
+ - `experimental_getRealtimeToolDefinitions` helper for provider session tool definitions
282
+ - `experimental_useRealtime` hook in `@ai-sdk/react` returning `UIMessage[]` (aligned with `useChat`), with `onToolCall` and `addToolOutput` for client-driven tool execution
283
+ - `inputAudioTranscription` session config for showing transcribed user audio messages when supported by the provider
284
+
285
+ - e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
286
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
287
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
288
+ - 685cec7: feat(openai): add opt-in pass-through for unsupported file media types
289
+ - 61bcdb5: fix(provider/openai): send client-executed tool calls as full function_call items in the Responses API so they pair with their function_call_output by call_id
290
+ - 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
291
+ - b8396f0: trigger initial beta release
292
+ - bfb756d: patch - send content: null instead of empty string for tool-only assistant messages
293
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
294
+ - 17b5597: fix(openai): skip passing reasoning items when using previous response id
295
+ - b3976a2: Add workflow serialization support to all provider models.
296
+
297
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
298
+
299
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
300
+
301
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
302
+
303
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
304
+ - f9acbc0: feat(provider/openai): add gpt-image-2 model support
305
+
306
+ ## 4.0.0-beta.77
307
+
308
+ ### Patch Changes
309
+
310
+ - Updated dependencies [0416e3e]
311
+ - @ai-sdk/provider@4.0.0-beta.20
312
+ - @ai-sdk/provider-utils@5.0.0-beta.50
313
+
314
+ ## 4.0.0-beta.76
315
+
316
+ ### Patch Changes
317
+
318
+ - 2c4767d: feat(openai): add orchestration token usage details to Responses API usage
319
+
320
+ ## 4.0.0-beta.75
321
+
322
+ ### Patch Changes
323
+
324
+ - 1772a63: Default OpenAI Responses reasoning summaries to detailed when reasoning effort is enabled.
325
+
326
+ ## 4.0.0-beta.74
327
+
328
+ ### Patch Changes
329
+
330
+ - b8396f0: trigger initial beta release
331
+ - Updated dependencies [b8396f0]
332
+ - @ai-sdk/provider-utils@5.0.0-beta.49
333
+ - @ai-sdk/provider@4.0.0-beta.19
334
+
335
+ ## 4.0.0-canary.73
336
+
337
+ ### Patch Changes
338
+
339
+ - Updated dependencies [aeda373]
340
+ - Updated dependencies [375fdd7]
341
+ - Updated dependencies [b4507d5]
342
+ - @ai-sdk/provider-utils@5.0.0-canary.48
343
+
344
+ ## 4.0.0-canary.72
345
+
346
+ ### Patch Changes
347
+
348
+ - Updated dependencies [bae5e2b]
349
+ - @ai-sdk/provider-utils@5.0.0-canary.47
350
+
351
+ ## 4.0.0-canary.71
352
+
353
+ ### Patch Changes
354
+
355
+ - ae7f932: fix(openai): throw retryable errors for OpenAI stream failures before output starts
356
+
357
+ ## 4.0.0-canary.70
358
+
359
+ ### Patch Changes
360
+
361
+ - 6a5800e: feat(openai): add namespaces for tool definitions
362
+
363
+ ## 4.0.0-canary.69
364
+
365
+ ### Patch Changes
366
+
367
+ - ce769dd: feat(provider): add experimental Realtime API support for voice conversations
368
+
369
+ Adds first-class support for realtime (speech-to-speech) APIs:
370
+
371
+ - `Experimental_RealtimeModelV4` spec in `@ai-sdk/provider` with normalized event types and factory
372
+ - OpenAI, Google, and xAI realtime provider implementations
373
+ - `openai.experimental_realtime()` / `google.experimental_realtime()` / `xai.experimental_realtime()` work in both server and browser
374
+ - `.getToken()` static method on each provider for server-side ephemeral token creation
375
+ - `experimental_getRealtimeToolDefinitions` helper for provider session tool definitions
376
+ - `experimental_useRealtime` hook in `@ai-sdk/react` returning `UIMessage[]` (aligned with `useChat`), with `onToolCall` and `addToolOutput` for client-driven tool execution
377
+ - `inputAudioTranscription` session config for showing transcribed user audio messages when supported by the provider
378
+
379
+ - Updated dependencies [ce769dd]
380
+ - @ai-sdk/provider@4.0.0-canary.18
381
+ - @ai-sdk/provider-utils@5.0.0-canary.46
382
+
383
+ ## 4.0.0-canary.68
384
+
385
+ ### Patch Changes
386
+
387
+ - 94eba1b: fix(openai): round-trip `namespace` on function_call input items
388
+
389
+ When `tool_search` dispatches a deferred tool, the resulting `function_call` carries a `namespace` field identifying which deferred-tool group the model picked. `#14789` preserved this on the read side (`providerMetadata.openai.namespace`), but the write side still serialized `function_call` input items without `namespace`. Multi-step / multi-turn conversations then failed with `Missing namespace for function_call '<name>'. ... Round-trip the model's function_call item with its namespace field included.`
390
+
391
+ `convert-to-openai-responses-input.ts` now reads `namespace` from `providerOptions.openai.namespace` (or `providerMetadata.openai.namespace`) on `tool-call` parts and includes it on the serialized `function_call` item, mirroring how `itemId` is round-tripped.
392
+
393
+ ## 4.0.0-canary.67
394
+
395
+ ### Patch Changes
396
+
397
+ - 61bcdb5: fix(provider/openai): send client-executed tool calls as full function_call items in the Responses API so they pair with their function_call_output by call_id
398
+ - Updated dependencies [ee798eb]
399
+ - Updated dependencies [daf6637]
400
+ - @ai-sdk/provider-utils@5.0.0-canary.45
401
+
402
+ ## 4.0.0-canary.66
403
+
404
+ ### Patch Changes
405
+
406
+ - e776fc7: feat(provider/azure):web search tool in the Azure OpenAI Responses API.
407
+
408
+ ## 4.0.0-canary.65
409
+
410
+ ### Patch Changes
411
+
412
+ - cd3de8b: feat(openai): forward `web_search_call.action.queries` from Responses API
413
+
414
+ ## 4.0.0-canary.64
415
+
416
+ ### Patch Changes
417
+
418
+ - Updated dependencies [6c93e36]
419
+ - Updated dependencies [f617ac2]
420
+ - @ai-sdk/provider-utils@5.0.0-canary.44
421
+
422
+ ## 4.0.0-canary.63
423
+
424
+ ### Patch Changes
425
+
426
+ - 17b5597: fix(openai): skip passing reasoning items when using previous response id
427
+
428
+ ## 4.0.0-canary.62
429
+
430
+ ### Patch Changes
431
+
432
+ - bf837fe: feat(provider/gateway): add speech and transcription model support
433
+
434
+ ## 4.0.0-canary.61
435
+
436
+ ### Patch Changes
437
+
438
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
439
+ - Updated dependencies [7fc6bd6]
440
+ - @ai-sdk/provider-utils@5.0.0-canary.43
441
+ - @ai-sdk/provider@4.0.0-canary.17
442
+
443
+ ## 4.0.0-canary.60
444
+
445
+ ### Patch Changes
446
+
447
+ - Updated dependencies [a6617c5]
448
+ - @ai-sdk/provider-utils@5.0.0-canary.42
449
+
450
+ ## 4.0.0-canary.59
451
+
452
+ ### Patch Changes
453
+
454
+ - 685cec7: feat(openai): add opt-in pass-through for unsupported file media types
455
+
456
+ ## 4.0.0-canary.58
457
+
458
+ ### Patch Changes
459
+
460
+ - Updated dependencies [28dfa06]
461
+ - Updated dependencies [e93fa91]
462
+ - @ai-sdk/provider-utils@5.0.0-canary.41
463
+
464
+ ## 4.0.0-canary.57
465
+
466
+ ### Patch Changes
467
+
468
+ - Updated dependencies [a7de9c9]
469
+ - @ai-sdk/provider-utils@5.0.0-canary.40
470
+
471
+ ## 4.0.0-canary.56
472
+
473
+ ### Patch Changes
474
+
475
+ - Updated dependencies [105f95b]
476
+ - @ai-sdk/provider-utils@5.0.0-canary.39
477
+
478
+ ## 4.0.0-canary.55
479
+
480
+ ### Patch Changes
481
+
482
+ - Updated dependencies [ca446f8]
483
+ - @ai-sdk/provider-utils@5.0.0-canary.38
484
+
485
+ ## 4.0.0-canary.54
486
+
487
+ ### Patch Changes
488
+
489
+ - Updated dependencies [d848405]
490
+ - @ai-sdk/provider-utils@5.0.0-canary.37
491
+
492
+ ## 4.0.0-canary.53
493
+
494
+ ### Patch Changes
495
+
496
+ - Updated dependencies [ca39020]
497
+ - @ai-sdk/provider-utils@5.0.0-canary.36
498
+
499
+ ## 4.0.0-canary.52
39
500
 
40
501
  ### Patch Changes
41
502
 
42
- - 055cd68: fix: publish v6 to latest npm dist tag
43
- - Updated dependencies [055cd68]
44
- - @ai-sdk/provider-utils@4.0.21
503
+ - Updated dependencies [f634bac]
504
+ - @ai-sdk/provider-utils@5.0.0-canary.35
45
505
 
46
- ## 3.0.46
506
+ ## 4.0.0-canary.51
47
507
 
48
508
  ### Patch Changes
49
509
 
50
- - 75fc0e7: feat(openai): add new tool search tool
510
+ - Updated dependencies [69254e0]
511
+ - Updated dependencies [3015fc3]
512
+ - @ai-sdk/provider-utils@5.0.0-canary.34
51
513
 
52
- ## 3.0.45
514
+ ## 4.0.0-canary.50
53
515
 
54
516
  ### Patch Changes
55
517
 
56
- - 023088c: feat(provider/openai): add `gpt-5.3-chat-latest`
518
+ - 29e6ac6: feat: add allowedTools provider option for OpenAI Responses
57
519
 
58
- ## 3.0.44
520
+ ## 4.0.0-canary.49
59
521
 
60
522
  ### Patch Changes
61
523
 
62
- - f4a734a: fix(provider/openai): drop reasoning parts without encrypted content when store: false
524
+ - 7bbc194: feat(provider/openai): forward imageDetail providerOptions on tool-result image content
525
+ - Updated dependencies [2427d88]
526
+ - @ai-sdk/provider-utils@5.0.0-canary.33
63
527
 
64
- ## 3.0.43
528
+ ## 4.0.0-canary.48
65
529
 
66
530
  ### Patch Changes
67
531
 
68
- - Updated dependencies [64ac0fd]
69
- - @ai-sdk/provider-utils@4.0.20
532
+ - d6c79e3: feat(openai): add GPT-5.5 chat model IDs
70
533
 
71
- ## 3.0.42
534
+ ## 4.0.0-canary.47
72
535
 
73
536
  ### Patch Changes
74
537
 
75
- - 2589004: feat(provider/openai): add GPT-5.4 model support
538
+ - 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
539
+ - Updated dependencies [5463d0d]
540
+ - @ai-sdk/provider-utils@5.0.0-canary.32
541
+ - @ai-sdk/provider@4.0.0-canary.16
542
+
543
+ ## 4.0.0-canary.46
544
+
545
+ ### Patch Changes
546
+
547
+ - cd9c311: fix(openai, openai-compatible): only send null content for assistant messages with tool calls
548
+
549
+ ## 4.0.0-canary.45
550
+
551
+ ### Patch Changes
552
+
553
+ - 0c4c275: trigger initial canary release
554
+ - Updated dependencies [0c4c275]
555
+ - @ai-sdk/provider-utils@5.0.0-canary.31
556
+ - @ai-sdk/provider@4.0.0-canary.15
557
+
558
+ ## 4.0.0-beta.44
559
+
560
+ ### Patch Changes
561
+
562
+ - bada0f3: feat(openai): preserve `namespace` on function_call output items
563
+
564
+ ## 4.0.0-beta.43
565
+
566
+ ### Patch Changes
567
+
568
+ - 9ea40e0: chore(provider/openai): add type for image model options for type-safe processing
569
+
570
+ ## 4.0.0-beta.42
571
+
572
+ ### Major Changes
573
+
574
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
575
+
576
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
577
+
578
+ ### Patch Changes
579
+
580
+ - Updated dependencies [08d2129]
581
+ - @ai-sdk/provider-utils@5.0.0-beta.30
582
+
583
+ ## 4.0.0-beta.41
584
+
585
+ ### Patch Changes
586
+
587
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
588
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
589
+ - Updated dependencies [9bd6512]
590
+ - Updated dependencies [258c093]
591
+ - Updated dependencies [b6783da]
592
+ - @ai-sdk/provider-utils@5.0.0-beta.29
593
+ - @ai-sdk/provider@4.0.0-beta.14
594
+
595
+ ## 4.0.0-beta.40
596
+
597
+ ### Patch Changes
598
+
599
+ - 9f0e36c: trigger release for all packages after provenance setup
600
+ - Updated dependencies [9f0e36c]
601
+ - @ai-sdk/provider@4.0.0-beta.13
602
+ - @ai-sdk/provider-utils@5.0.0-beta.28
603
+
604
+ ## 4.0.0-beta.39
605
+
606
+ ### Patch Changes
607
+
608
+ - 58a2ad7: fix: more precise default message for tool execution denial
609
+ - f9acbc0: feat(provider/openai): add gpt-image-2 model support
610
+ - Updated dependencies [785fe16]
611
+ - Updated dependencies [67df0a0]
612
+ - Updated dependencies [befb78c]
613
+ - Updated dependencies [0458559]
614
+ - Updated dependencies [5852c0a]
615
+ - Updated dependencies [fc92055]
616
+ - @ai-sdk/provider-utils@5.0.0-beta.27
617
+
618
+ ## 4.0.0-beta.38
619
+
620
+ ### Patch Changes
621
+
622
+ - bfb756d: patch - send content: null instead of empty string for tool-only assistant messages
623
+ - Updated dependencies [2e98477]
624
+ - @ai-sdk/provider-utils@5.0.0-beta.26
625
+
626
+ ## 4.0.0-beta.37
627
+
628
+ ### Patch Changes
629
+
630
+ - Updated dependencies [eea8d98]
631
+ - @ai-sdk/provider-utils@5.0.0-beta.25
632
+
633
+ ## 4.0.0-beta.36
634
+
635
+ ### Patch Changes
636
+
637
+ - f807e45: Extract shared `StreamingToolCallTracker` class into `@ai-sdk/provider-utils` to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing `generateId()` fallback for `toolCallId` in Alibaba's `doGenerate` path and ensures all providers finalize unfinished tool calls during stream flush.
638
+ - Updated dependencies [f807e45]
639
+ - @ai-sdk/provider-utils@5.0.0-beta.24
640
+
641
+ ## 4.0.0-beta.35
642
+
643
+ ### Patch Changes
644
+
645
+ - Updated dependencies [350ea38]
646
+ - @ai-sdk/provider-utils@5.0.0-beta.23
647
+
648
+ ## 4.0.0-beta.34
649
+
650
+ ### Patch Changes
651
+
652
+ - Updated dependencies [083947b]
653
+ - @ai-sdk/provider-utils@5.0.0-beta.22
654
+
655
+ ## 4.0.0-beta.33
656
+
657
+ ### Patch Changes
658
+
659
+ - Updated dependencies [add1126]
660
+ - @ai-sdk/provider-utils@5.0.0-beta.21
661
+
662
+ ## 4.0.0-beta.32
663
+
664
+ ### Patch Changes
665
+
666
+ - 0c4ac8a: fix(openai): default undefined tool-call input to empty object before serializing tool arguments
667
+
668
+ ## 4.0.0-beta.31
669
+
670
+ ### Patch Changes
671
+
672
+ - b3976a2: Add workflow serialization support to all provider models.
673
+
674
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
675
+
676
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
677
+
678
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
679
+
680
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
681
+ - Updated dependencies [b3976a2]
682
+ - Updated dependencies [ff5eba1]
683
+ - @ai-sdk/provider-utils@5.0.0-beta.20
684
+ - @ai-sdk/provider@4.0.0-beta.12
685
+
686
+ ## 4.0.0-beta.30
687
+
688
+ ### Major Changes
689
+
690
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
691
+
692
+ ### Patch Changes
693
+
694
+ - Updated dependencies [ef992f8]
695
+ - @ai-sdk/provider@4.0.0-beta.11
696
+ - @ai-sdk/provider-utils@5.0.0-beta.19
697
+
698
+ ## 4.0.0-beta.29
699
+
700
+ ### Patch Changes
701
+
702
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
703
+ - Updated dependencies [90e2d8a]
704
+ - @ai-sdk/provider-utils@5.0.0-beta.18
705
+
706
+ ## 4.0.0-beta.28
707
+
708
+ ### Patch Changes
709
+
710
+ - Updated dependencies [3ae1786]
711
+ - @ai-sdk/provider-utils@5.0.0-beta.17
712
+
713
+ ## 4.0.0-beta.27
714
+
715
+ ### Patch Changes
716
+
717
+ - Updated dependencies [176466a]
718
+ - @ai-sdk/provider@4.0.0-beta.10
719
+ - @ai-sdk/provider-utils@5.0.0-beta.16
720
+
721
+ ## 4.0.0-beta.26
722
+
723
+ ### Patch Changes
724
+
725
+ - e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
726
+ - Updated dependencies [e311194]
727
+ - @ai-sdk/provider@4.0.0-beta.9
728
+ - @ai-sdk/provider-utils@5.0.0-beta.15
729
+
730
+ ## 4.0.0-beta.25
731
+
732
+ ### Patch Changes
733
+
734
+ - 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
735
+ - Updated dependencies [34bd95d]
736
+ - Updated dependencies [008271d]
737
+ - @ai-sdk/provider@4.0.0-beta.8
738
+ - @ai-sdk/provider-utils@5.0.0-beta.14
739
+
740
+ ## 4.0.0-beta.24
741
+
742
+ ### Patch Changes
743
+
744
+ - Updated dependencies [b0c2869]
745
+ - Updated dependencies [7e26e81]
746
+ - @ai-sdk/provider-utils@5.0.0-beta.13
747
+
748
+ ## 4.0.0-beta.23
749
+
750
+ ### Patch Changes
751
+
752
+ - Updated dependencies [46d1149]
753
+ - @ai-sdk/provider-utils@5.0.0-beta.12
754
+
755
+ ## 4.0.0-beta.22
756
+
757
+ ### Patch Changes
758
+
759
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
760
+ - Updated dependencies [6fd51c0]
761
+ - @ai-sdk/provider-utils@5.0.0-beta.11
762
+ - @ai-sdk/provider@4.0.0-beta.7
763
+
764
+ ## 4.0.0-beta.21
765
+
766
+ ### Patch Changes
767
+
768
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
769
+ - Updated dependencies [c29a26f]
770
+ - @ai-sdk/provider-utils@5.0.0-beta.10
771
+ - @ai-sdk/provider@4.0.0-beta.6
772
+
773
+ ## 4.0.0-beta.20
774
+
775
+ ### Patch Changes
776
+
777
+ - 38fc777: Add AI Gateway hint to provider READMEs
778
+
779
+ ## 4.0.0-beta.19
780
+
781
+ ### Patch Changes
782
+
783
+ - Updated dependencies [2e17091]
784
+ - @ai-sdk/provider-utils@5.0.0-beta.9
785
+
786
+ ## 4.0.0-beta.18
787
+
788
+ ### Patch Changes
789
+
790
+ - Updated dependencies [986c6fd]
791
+ - Updated dependencies [493295c]
792
+ - @ai-sdk/provider-utils@5.0.0-beta.8
793
+
794
+ ## 4.0.0-beta.17
795
+
796
+ ### Patch Changes
797
+
798
+ - 817a1a6: fix(openai): support file-url parts in tool output content
799
+
800
+ ## 4.0.0-beta.16
801
+
802
+ ### Patch Changes
803
+
804
+ - 1f509d4: fix(ai): force template check on 'kind' param
805
+ - Updated dependencies [1f509d4]
806
+ - @ai-sdk/provider-utils@5.0.0-beta.7
807
+ - @ai-sdk/provider@4.0.0-beta.5
808
+
809
+ ## 4.0.0-beta.15
810
+
811
+ ### Patch Changes
812
+
813
+ - 365da1a: Add `gpt-5.4-mini`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano`, and `gpt-5.4-nano-2026-03-17` models.
814
+
815
+ ## 4.0.0-beta.14
816
+
817
+ ### Patch Changes
818
+
819
+ - e6376c2: fix(openai): preserve raw finish reason for failed responses stream events
820
+
821
+ Handle `response.failed` chunks in Responses API streaming so `finishReason.raw` is preserved from `incomplete_details.reason` (e.g. `max_output_tokens`), and map failed-without-reason cases to unified `error` instead of `other`.
822
+
823
+ ## 4.0.0-beta.13
824
+
825
+ ### Patch Changes
826
+
827
+ - 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
828
+ - Updated dependencies [3887c70]
829
+ - @ai-sdk/provider-utils@5.0.0-beta.6
830
+ - @ai-sdk/provider@4.0.0-beta.4
831
+
832
+ ## 4.0.0-beta.12
833
+
834
+ ### Patch Changes
835
+
836
+ - d9a1e9a: feat(openai): add server side compaction for openai
837
+
838
+ ## 4.0.0-beta.11
839
+
840
+ ### Patch Changes
841
+
842
+ - Updated dependencies [776b617]
843
+ - @ai-sdk/provider-utils@5.0.0-beta.5
844
+ - @ai-sdk/provider@4.0.0-beta.3
845
+
846
+ ## 4.0.0-beta.10
847
+
848
+ ### Major Changes
849
+
850
+ - 61753c3: ### `@ai-sdk/openai`: remove redundant `name` argument from `openai.tools.customTool()`
851
+
852
+ `openai.tools.customTool()` no longer accepts a `name` field. the tool name is now derived from the sdk tool key (the object key in the `tools` object).
853
+
854
+ migration: remove the `name` property from `customTool()` calls. the object key is now used as the tool name sent to the openai api.
855
+
856
+ before:
857
+
858
+ ```ts
859
+ tools: {
860
+ write_sql: openai.tools.customTool({
861
+ name: 'write_sql',
862
+ description: '...',
863
+ }),
864
+ }
865
+ ```
866
+
867
+ after:
868
+
869
+ ```ts
870
+ tools: {
871
+ write_sql: openai.tools.customTool({
872
+ description: '...',
873
+ }),
874
+ }
875
+ ```
876
+
877
+ ### `@ai-sdk/provider-utils`: `createToolNameMapping()` no longer accepts the `resolveProviderToolName` parameter
878
+
879
+ before: tool name can be set dynamically
880
+
881
+ ```ts
882
+ const toolNameMapping = createToolNameMapping({
883
+ tools,
884
+ providerToolNames: {
885
+ "openai.code_interpreter": "code_interpreter",
886
+ "openai.file_search": "file_search",
887
+ "openai.image_generation": "image_generation",
888
+ "openai.local_shell": "local_shell",
889
+ "openai.shell": "shell",
890
+ "openai.web_search": "web_search",
891
+ "openai.web_search_preview": "web_search_preview",
892
+ "openai.mcp": "mcp",
893
+ "openai.apply_patch": "apply_patch",
894
+ },
895
+ resolveProviderToolName: (tool) =>
896
+ tool.id === "openai.custom"
897
+ ? (tool.args as { name?: string }).name
898
+ : undefined,
899
+ });
900
+ ```
901
+
902
+ after: tool name is static based on `tools` keys
903
+
904
+ ```
905
+ const toolNameMapping = createToolNameMapping({
906
+ tools,
907
+ providerToolNames: {
908
+ 'openai.code_interpreter': 'code_interpreter',
909
+ 'openai.file_search': 'file_search',
910
+ 'openai.image_generation': 'image_generation',
911
+ 'openai.local_shell': 'local_shell',
912
+ 'openai.shell': 'shell',
913
+ 'openai.web_search': 'web_search',
914
+ 'openai.web_search_preview': 'web_search_preview',
915
+ 'openai.mcp': 'mcp',
916
+ 'openai.apply_patch': 'apply_patch',
917
+ }
918
+ });
919
+ ```
920
+
921
+ ### Patch Changes
922
+
923
+ - Updated dependencies [61753c3]
924
+ - @ai-sdk/provider-utils@5.0.0-beta.4
925
+
926
+ ## 4.0.0-beta.9
927
+
928
+ ### Patch Changes
929
+
930
+ - 156cdf0: feat(openai): add new tool search tool
931
+
932
+ ## 4.0.0-beta.8
933
+
934
+ ### Patch Changes
935
+
936
+ - Updated dependencies [f7d4f01]
937
+ - @ai-sdk/provider-utils@5.0.0-beta.3
938
+ - @ai-sdk/provider@4.0.0-beta.2
939
+
940
+ ## 4.0.0-beta.7
941
+
942
+ ### Patch Changes
943
+
944
+ - Updated dependencies [5c2a5a2]
945
+ - @ai-sdk/provider@4.0.0-beta.1
946
+ - @ai-sdk/provider-utils@5.0.0-beta.2
947
+
948
+ ## 4.0.0-beta.6
949
+
950
+ ### Patch Changes
951
+
952
+ - 83f9d04: feat(openai): upgrade v3 specs to v4
953
+
954
+ ## 4.0.0-beta.5
955
+
956
+ ### Patch Changes
957
+
958
+ - ac18f89: feat(provider/openai): add `gpt-5.3-chat-latest`
959
+
960
+ ## 4.0.0-beta.4
961
+
962
+ ### Patch Changes
963
+
964
+ - a71d345: fix(provider/openai): drop reasoning parts without encrypted content when store: false
965
+
966
+ ## 4.0.0-beta.3
967
+
968
+ ### Patch Changes
969
+
970
+ - 45b3d76: fix(security): prevent streaming tool calls from finalizing on parsable partial JSON
971
+
972
+ Streaming tool call arguments were finalized using `isParsableJson()` as a heuristic for completion. If partial accumulated JSON happened to be valid JSON before all chunks arrived, the tool call would be executed with incomplete arguments. Tool call finalization now only occurs in `flush()` after the stream is fully consumed.
973
+
974
+ - f7295cb: revert incorrect fix https://github.com/vercel/ai/pull/13172
975
+
976
+ ## 4.0.0-beta.2
977
+
978
+ ### Patch Changes
979
+
980
+ - Updated dependencies [531251e]
981
+ - @ai-sdk/provider-utils@5.0.0-beta.1
982
+
983
+ ## 4.0.0-beta.1
984
+
985
+ ### Patch Changes
986
+
987
+ - 7afaece: feat(provider/openai): add GPT-5.4 model support
988
+
989
+ ## 4.0.0-beta.0
990
+
991
+ ### Major Changes
992
+
993
+ - 8359612: Start v7 pre-release
994
+
995
+ ### Patch Changes
996
+
997
+ - Updated dependencies [8359612]
998
+ - @ai-sdk/provider@4.0.0-beta.0
999
+ - @ai-sdk/provider-utils@5.0.0-beta.0
76
1000
 
77
1001
  ## 3.0.41
78
1002
 
@@ -243,7 +1167,6 @@
243
1167
  ### Patch Changes
244
1168
 
245
1169
  - 04c89b1: Provide Responses API providerMetadata types at the message / reasoning level.
246
-
247
1170
  - Export the following types for use in client code:
248
1171
  - `OpenaiResponsesProviderMetadata`
249
1172
  - `OpenaiResponsesReasoningProviderMetadata`
@@ -324,7 +1247,6 @@
324
1247
  ### Patch Changes
325
1248
 
326
1249
  - 330bd92: Fix Responses `code_interpreter` annotations and add typed providerMetadata
327
-
328
1250
  - Align Responses API `code_interpreter` annotation types with the official spec.
329
1251
  - Add tests to ensure the overlapping parts of the Zod schemas used by `doGenerate` and `doStream` stay in sync.
330
1252
  - Export the following types for use in client code: