ai 5.0.0-canary.9 → 5.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,1317 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d0c108: fix(ai/ui): convert provider metadata for system messages to model messages
8
+
9
+ ## 5.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - e1cbf8a: chore(@ai-sdk/rsc): extract to separate package
14
+ - a847c3e: chore: rename reasoning to reasoningText etc
15
+ - 13fef90: chore (ai): remove automatic conversion of UI messages to model messages
16
+ - d964901: - remove setting temperature to `0` by default
17
+ - remove `null` option from `DefaultSettingsMiddleware`
18
+ - remove setting defaults for `temperature` and `stopSequences` in `ai` to enable middleware changes
19
+ - 0a710d8: feat (ui): typed tool parts in ui messages
20
+ - 9ad0484: feat (ai): automatic tool execution error handling
21
+ - 63f9e9b: chore (provider,ai): tools have input/output instead of args,result
22
+ - ab7ccef: chore (ai): change source ui message parts to source-url
23
+ - d5f588f: AI SDK 5
24
+ - ec78cdc: chore (ai): remove "data" UIMessage role
25
+ - 6a83f7d: refactoring (ai): restructure message metadata transfer
26
+ - db345da: chore (ai): remove exports of internal ui functions
27
+ - 496bbc1: chore (ui): inline/remove ChatRequest type
28
+ - 72d7d72: chore (ai): stable activeTools
29
+ - 40acf9b: feat (ui): introduce ChatStore and ChatTransport
30
+ - 98f25e5: chore (ui): remove managed chat inputs
31
+ - 2d03e19: chore (ai): remove StreamCallbacks.onCompletion
32
+ - da70d79: chore (ai): remove getUIText helper
33
+ - c60f895: chore (ai): remove useChat keepLastMessageOnError
34
+ - 0560977: chore (ai): improve consistency of generate text result, stream text result, and step result
35
+ - 9477ebb: chore (ui): remove useAssistant hook (**breaking change**)
36
+ - 1f55c21: chore (ai): send reasoning to the client by default
37
+ - e7dc6c7: chore (ai): remove onResponse callback
38
+ - 8b86e99: chore (ai): replace `Message` with `UIMessage`
39
+ - 04d5063: chore (ai): rename default provider global to AI_SDK_DEFAULT_PROVIDER
40
+ - 319b989: chore (ai): remove content from ui messages
41
+ - 14c9410: chore: refactor file towards source pattern (spec)
42
+ - a34eb39: chore (ai): remove `data` and `allowEmptySubmit` from `ChatRequestOptions`
43
+ - f04fb4a: chore (ai): replace useChat attachments with file ui parts
44
+ - f7e8bf4: chore (ai): flatten ui message stream parts
45
+ - 257224b: chore (ai): separate TextStreamChatTransport
46
+ - fd1924b: chore (ai): remove redundant `mimeType` property
47
+ - 2524fc7: chore (ai): remove ui message toolInvocations property
48
+ - 6fba4c7: chore (ai): remove deprecated experimental_providerMetadata
49
+ - b4b4bb2: chore (ui): rename experimental_resume to resumeStream
50
+ - 441d042: chore (ui): data stream protocol v2 with SSEs
51
+ - ef256ed: chore (ai): refactor and use chatstore in svelte
52
+ - 516be5b: ### Move Image Model Settings into generate options
53
+
54
+ Image Models no longer have settings. Instead, `maxImagesPerCall` can be passed directly to `generateImage()`. All other image settings can be passed to `providerOptions[provider]`.
55
+
56
+ Before
57
+
58
+ ```js
59
+ await generateImage({
60
+ model: luma.image('photon-flash-1', {
61
+ maxImagesPerCall: 5,
62
+ pollIntervalMillis: 500,
63
+ }),
64
+ prompt,
65
+ n: 10,
66
+ });
67
+ ```
68
+
69
+ After
70
+
71
+ ```js
72
+ await generateImage({
73
+ model: luma.image('photon-flash-1'),
74
+ prompt,
75
+ n: 10,
76
+ maxImagesPerCall: 5,
77
+ providerOptions: {
78
+ luma: { pollIntervalMillis: 5 },
79
+ },
80
+ });
81
+ ```
82
+
83
+ Pull Request: https://github.com/vercel/ai/pull/6180
84
+
85
+ - a662dea: chore (ai): remove sendExtraMessageFields
86
+ - d884051: feat (ai): simplify default provider setup
87
+ - e8324c5: feat (ai): add args callbacks to tools
88
+ - fafc3f2: chore (ai): change file to parts to use urls instead of data
89
+ - 1ed0287: chore (ai): stable sendStart/sendFinish options
90
+ - c7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStream
91
+ - bfbfc4c: feat (ai): streamText/generateText: totalUsage contains usage for all steps. usage is for a single step.
92
+ - 9ae327d: chore (ui): replace chat store concept with chat instances
93
+ - 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to stepCountIs.
94
+ - 247ee0c: chore (ai): remove steps from tool invocation ui parts
95
+ - 109c0ac: chore (ai): rename id to chatId (in post request, resume request, and useChat)
96
+ - 954aa73: feat (ui): extended regenerate support
97
+ - 33eb499: feat (ai): inject message id in createUIMessageStream
98
+ - 901df02: feat (ui): use UI_MESSAGE generic
99
+ - 4892798: chore (ai): always stream tool calls
100
+ - c25cbce: feat (ai): use console.error as default error handler for streamText and streamObject
101
+ - b33ed7a: chore (ai): rename DataStream* to UIMessage*
102
+ - ed675de: feat (ai): add ui data parts
103
+ - 7bb58d4: chore (ai): restructure prepareRequest
104
+ - ea7a7c9: feat (ui): UI message metadata
105
+ - 0463011: fix (ai): update source url stream part
106
+ - dcc549b: remove StreamTextResult.mergeIntoDataStream method
107
+ rename DataStreamOptions.getErrorMessage to onError
108
+ add pipeTextStreamToResponse function
109
+ add createTextStreamResponse function
110
+ change createDataStreamResponse function to accept a DataStream and not a DataStreamWriter
111
+ change pipeDataStreamToResponse function to accept a DataStream and not a DataStreamWriter
112
+ change pipeDataStreamToResponse function to have a single parameter
113
+ - 35fc02c: chore (ui): rename RequestOptions to CompletionRequestOptions
114
+ - 64f6d64: feat (ai): replace maxSteps with continueUntil (generateText)
115
+ - 175b868: chore (ai): rename reasoning UI parts 'reasoning' property to 'text'
116
+ - 60e2c56: feat (ai): restructure chat transports
117
+ - 765f1cd: chore (ai): remove deprecated useChat isLoading helper
118
+ - cb2b53a: chore (ai): refactor header preparation
119
+ - e244a78: chore (ai): remove StreamData and mergeStreams
120
+ - d306260: feat (ai): replace maxSteps with continueUntil (streamText)
121
+ - 4bfe9ec: chore (ai): remove ui message reasoning property
122
+ - 1766ede: chore: rename maxTokens to maxOutputTokens
123
+ - 2877a74: chore (ai): remove ui message data property
124
+ - 1409e13: chore (ai): remove experimental continueSteps
125
+ - b32e192: chore (ai): rename reasoning to reasoningText, rename reasoningDetails to reasoning (streamText, generateText)
126
+ - 92cb0a2: chore (ai): rename CoreMessage to ModelMessage
127
+ - 2b637d6: chore (ai): rename UIMessageStreamPart to UIMessageChunk
128
+
129
+ ### Minor Changes
130
+
131
+ - b7eae2d: feat (core): Add finishReason field to NoObjectGeneratedError
132
+ - bcea599: feat (ai): add content to generateText result
133
+ - 48d675a: feat (ai): add content to streamText result
134
+ - c9ad635: feat (ai): add filename to file ui parts
135
+
136
+ ### Patch Changes
137
+
138
+ - a571d6e: chore(provider-utils): move ToolResultContent to provider-utils
139
+ - de2d2ab: feat(ai): add provider and provider registry middleware functionality
140
+ - c22ad54: feat(smooth-stream): chunking callbacks
141
+ - d88455d: feat (ai): expose http chat transport type
142
+ - e7fcc86: feat (ai): introduce dynamic tools
143
+ - da1e6f0: feat (ui): add generics to ui message stream parts
144
+ - 48378b9: fix (ai): send null as tool output when tools return undefined
145
+ - 5d1e3ba: chore (ai): remove provider re-exports
146
+ - 93d53a1: chore (ai): remove cli
147
+ - e90d45d: chore (rsc): move HANGING_STREAM_WARNING_TIME constant into @ai-sdk/rsc package
148
+ - b32c141: feat (ai): add array support to stopWhen
149
+ - bc3109f: chore (ai): push stream-callbacks into langchain/llamaindex adapters
150
+ - 0d9583c: fix (ai): use user-provided media type when available
151
+ - 38ae5cc: feat (ai): export InferUIMessageChunk type
152
+ - 10b21eb: feat(cli): add ai command line interface
153
+ - 9e40cbe: Allow destructuring output and errorText on `ToolUIPart` type
154
+ - 6909543: feat (ai): support system parameter in Agent constructor
155
+ - 86cfc72: feat (ai): add ignoreIncompleteToolCalls option to convertToModelMessages
156
+ - 377bbcf: fix (ui): tool input can be undefined during input-streaming
157
+ - d8aeaef: feat(providers/fal): add transcribe
158
+ - ae77a99: chore (ai): rename text and reasoning chunks in streamText fullstream
159
+ - 4fef487: feat: support for zod v4 for schema validation
160
+
161
+ All these methods now accept both a zod v4 and zod v3 schemas for validation:
162
+
163
+ - `generateObject()`
164
+ - `streamObject()`
165
+ - `generateText()`
166
+ - `experimental_useObject()` from `@ai-sdk/react`
167
+ - `streamUI()` from `@ai-sdk/rsc`
168
+
169
+ - b1e3abd: feat (ai): expose ui message stream headers
170
+ - 4f3e637: fix (ui): avoid caching globalThis.fetch in case it is patched by other libraries
171
+ - 14cb3be: chore(providers/llamaindex): extract to separate package
172
+ - 1f6ce57: feat (ai): infer tool call types in the `onToolCall` callback
173
+ - 16ccfb2: feat (ai): add readUIMessageStream helper
174
+ - 225f087: fix (ai/mcp): prevent mutation of customEnv
175
+ - ce1d1f3: feat (ai): export mock image, speech, and transcription models
176
+ - fc0380b: feat (ui): resolvable header, body, credentials in http chat transport
177
+ - 6622441: feat (ai): add static/dynamic toolCalls/toolResults helpers
178
+ - 4048ce3: fix (ai): add tests and examples for openai responses
179
+ - 6c42e56: feat (ai): validate ui stream data chunks
180
+ - bedb239: chore (ai): make ui stream parts value optional when it's not required
181
+ - 9b4d074: feat(streamObject): add enum support
182
+ - c8fce91: feat (ai): add experimental Agent abstraction
183
+ - 655cf3c: feat (ui): add onFinish to createUIMessageStream
184
+ - 3e10408: fix(utils/detect-mimetype): add support for detecting id3 tags
185
+ - d5ae088: feat (ui): add sendAutomaticallyWhen to Chat
186
+ - ced8eee: feat(ai): re-export zodSchema from main package
187
+ - c040e2f: fix (ui): inject generated response message id
188
+ - d3960e3: selectTelemetryAttributes more robustness
189
+ - faea29f: fix (provider/openai): multi-step reasoning with text
190
+ - 66af894: fix (ai): respect content order in toResponseMessages
191
+ - 332167b: chore (ai): move maxSteps into UseChatOptions
192
+ - 6b1c55c: feat (ai): introduce GLOBAL_DEFAULT_PROVIDER
193
+ - 5a975a4: feat (ui): update Chat tool result submission
194
+ - 507ac1d: fix (ui/react): update messages immediately with the submitted user message
195
+ - a166433: feat: add transcription with experimental_transcribe
196
+ - 26735b5: chore(embedding-model): add v2 interface
197
+ - c93a8bc: chore(ai): export AsyncIterableStream type from async-iterable-stream module
198
+ - 0d2c085: feat (ai): support string model ids through gateway
199
+ - 2b9bbcd: feat (ai): improve prompt validation error message
200
+ - a8c8bd5: feat(embed-many): respect supportsParallelCalls & concurrency
201
+ - 75c3396: fix (ai): handle errors in 2nd streamText doStream call
202
+ - cb9c9e4: remove deprecated `experimental_wrapLanguageModel`
203
+ - 9bf7291: chore(providers/openai): enable structuredOutputs by default & switch to provider option
204
+ - 9b0da33: fix (ai): do not send id with start unless specified
205
+ - 28ad69e: fix(react-native): support experimental_attachments without FileList global
206
+ - 0b78e17: chore(ai/generateObject): simplify function signature
207
+ - 20398f2: feat: ai sdk cli documentation + adjusted default model
208
+ - 66962ed: fix(packages): export node10 compatible types
209
+ - b71fe8d: fix(ai): remove jsondiffpatch dependency
210
+ - 7827a49: fix (ai/core): refactor `toResponseMessages` to filter out empty string/content
211
+ - bd8a36c: feat(embedding-model-v2/embedMany): add response body field
212
+ - d9209ca: fix (image-model): `specificationVersion: v1` -> `v2`
213
+ - b346545: feat (ai): add data ui part schemas
214
+ - 05d2819: feat: allow zod 4.x as peer dependency
215
+ - f2b041e: Fix custom `fetch` in HttpChatTransport
216
+ - 2a62513: Fix error thrown when emptying messages in onError or onFinish
217
+ - 143c55b: feat (ai): export Chat callback types
218
+ - 9301f86: refactor (image-model): rename `ImageModelV1` to `ImageModelV2`
219
+ - 904fa5e: feat (ai/core): add terminateOnError option to readUIMessageStream
220
+ - 0a87932: core (ai): change transcription model mimeType to mediaType
221
+ - 1675396: fix: avoid job executor deadlock when adding tool result
222
+ - 51f497d: feat (ai): step input message modification in prepareStep
223
+ - cee64b2: fix(otel): change back toolCall attributes of input/output back to args/result for compatibility
224
+ - f04ffe4: feat (ui): add onData callback to Chat
225
+ - bc24722: feat (ai): Add finishReason as a promise on StreamObjectResult to match StreamTextResult
226
+ - b6f9f3c: remove deprecated `CoreTool*` types
227
+ - 8aa9e20: feat: add speech with experimental_generateSpeech
228
+ - 4617fab: chore(embedding-models): remove remaining settings
229
+ - 8255639: ### Fix use with Google APIs + zod v4's `.literal()` schema
230
+
231
+ Before [zod@3.25.49](https://github.com/colinhacks/zod/releases/tag/v3.25.49), requests to Google's APIs failed due to a missing `type` in the provided schema. The problem has been resolved for the `ai` SDK by bumping our `zod` peer dependencies to `^3.25.49`.
232
+
233
+ pull request: https://github.com/vercel/ai/pull/6609
234
+
235
+ - f81c720: chore(ai): bundle dependencies in CLI binary
236
+ - cf9af6e: feat (ai): allow sync prepareStep
237
+ - ee38081: Add support for audio/webm to detect-media-type
238
+ - 2e4f9e4: feat (ai): improved error messages when using gateway
239
+ - 3e3b9df: fix (ai/mcp): better support for zero-argument MCP tools
240
+ - cda32ba: fix (ai): send `start` part in correct position in stream (streamText)
241
+ - 48a7606: feat (ai): support changing the system prompt in prepareSteps
242
+ - cb68df0: feat: add transcription and speech model support to provider registry
243
+ - db64cbe: fix (provider/openai): multi-step reasoning with tool calls
244
+ - 97c35c0: feat (ui): transient data parts
245
+ - 26695a3: feat (ui): add state for text and reasoning ui message parts
246
+ - 90ac328: fix (ui): tool part metadata support in ui messages
247
+ - 60132dd: fixed date formatting for updated mcp protocol version
248
+ - 4a1e0c8: fix(ai-cli): fix bundling and improve authentication error handling
249
+ - c6b64a7: feat (ai): allow async prepareRequest on HttpChatTransport
250
+ - fccf75c: update mcp protocol version
251
+ - 9121250: Expose provider metadata as an attribute on exported OTEL spans
252
+ - ea27cc6: chore (ai): use JSONValue definition from provider
253
+ - 90ca2b9: feat(ai): Record tool call errors on tool call spans recorded in `generateText` and `streamText`.
254
+ - 50f0362: fix (ai): fix experimental sendStart/sendFinish options in streamText
255
+ - 825e8d7: release alpha.5
256
+ - 7d97ab6: release alpha.4
257
+ - 0ff02bb: chore(provider-utils): move over jsonSchema
258
+ - 4f3776c: feat (ai): add InferUITools helper
259
+ - 9338f3e: fix (ai): throw error for v1 models
260
+ - 92c8e66: fix(ai/core): properly handle custom separator in provider registry
261
+ - 53569b8: feat (ai): add experimental repairText function to streamObject
262
+ - 82aa95d: fix (ai): merge data ui stream parts correctly
263
+ - e7d2ce3: feat: provider-executed tools
264
+ - add5ac1: feat (ai): make streamText toUIMessageStream async iterable
265
+ - 37a916d: feat (ai): add prepareSteps to streamText
266
+ - 30ac566: fix (ui): text message metadata support in ui messages
267
+ - 8026705: fix (core): send buffered text in smooth stream when stream parts change
268
+ - 9bd5ab5: feat (provider): add providerMetadata to ImageModelV2 interface (#5977)
269
+
270
+ The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
271
+
272
+ ```js
273
+ const prompt = 'Santa Claus driving a Cadillac';
274
+
275
+ const { providerMetadata } = await experimental_generateImage({
276
+ model: openai.image('dall-e-3'),
277
+ prompt,
278
+ });
279
+
280
+ const revisedPrompt = providerMetadata.openai.images[0]?.revisedPrompt;
281
+
282
+ console.log({
283
+ prompt,
284
+ revisedPrompt,
285
+ });
286
+ ```
287
+
288
+ - ec5933d: chore (ai/mcp): add `assertCapability` method to experimental MCP client
289
+ - 09f41ac: fix (ui): add message metadata in Chat.sendMessage
290
+ - ff1c81a: feat (ai): add streamText onAbort callback
291
+ - af1d5a5: fix(ai): Unexpected reasoning-start event in extract reasoning middleware
292
+ - cb3b9c9: fix (ai): catch errors in ui message stream
293
+ - 86293e5: fix (ai): use correct generateMessageId in streamText toUIMessageStream
294
+ - d1a034f: feature: using Zod 4 for internal stuff
295
+ - fd65bc6: chore(embedding-model-v2): rename rawResponse to response
296
+ - d92b9a8: fix(ai): add support for MCP protocol version 2025-06-18
297
+ - 102b066: fix (ai): fix invalid fetch call
298
+ - 142576e: feat (ui): support message replacement in chat via messageId param on sendMessage
299
+ - 84343eb: fix (ui): call sendAutomaticallyWhen with updated messages
300
+ - a76a62b: feat (ai): add experimental prepareStep callback to generateText
301
+ - 89ba235: fix (ui): support tool names with dash
302
+ - 8e31d46: feat (ai): export SourceDocumentUIPart
303
+ - bd398e4: fix (core): improve error handling in streamText's consumeStream method
304
+ - 88a8ee5: fix (ai): support abort during retry waits
305
+ - 205077b: fix: improve Zod compatibility
306
+ - d91b50d: chore(ui-utils): merge into ai package
307
+ - e4c8647: feat (ui): allow asynchronous onFinish in createUIMessageStream
308
+ - c808e4d: fix (ui): do not send changing assistant message ids when onFinish is provided
309
+ - e862b5b: feat (ai): allow sync tool.execute
310
+ - 395c85e: feat (ai): add consumeSseStream option to UI message stream responses
311
+ - 5bdff05: Removed deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()`. Since `throwErrorForEmptyVectors` was the only option the entire `options` argument was removed.
312
+
313
+ ```diff
314
+ - cosineSimilarity(vector1, vector2, options)
315
+ +cosineSimilarity(vector1, vector2)
316
+ ```
317
+
318
+ - 13b4f46: feat (ai): export experimental MCPClient and MCPClientConfig interfaces
319
+ - a4f3007: chore: remove ai/react
320
+ - 8e64e9c: feat (ai): allow using provider default temperature by specifying null
321
+ - b983b51: feat (ai): support model message array in prompt
322
+ - 56c232b: fix (ai): remove outdated sendStart jsdoc
323
+ - 7324c21: fix (ai/telemetry): Avoid JSON.stringify on Uint8Arrays for telemetry
324
+ - f10304b: feat(tool-calling): don't require the user to have to pass parameters
325
+ - dd5fd43: feat (ai): support dynamic tools in Chat onToolCall
326
+ - a753b3a: feat (provider/anthropic): cache control for tools
327
+ - 383cbfa: feat (ai): add isAborted to onFinish callback for ui message streams
328
+ - 27deb4d: feat (provider/gateway): Add providerMetadata to embeddings response
329
+ - 5f2b3d4: chore (ai): stable prepareStep
330
+ - 4c8f834: feat: automatically respect rate limit headers in retry logic
331
+
332
+ Added automatic support for respecting rate limit headers (`retry-after-ms` and `retry-after`) in the SDK's retry logic. When these headers are present and contain reasonable values (0-60 seconds), the retry mechanism will use the server-specified delay instead of exponential backoff. This matches the behavior of Anthropic and OpenAI client SDKs and improves rate limit handling without requiring any API changes.
333
+
334
+ - f2c7f19: feat (ui): add Chat.clearError()
335
+ - 7bd025b: fix (ai): fix sync tool execute with streamText
336
+ - Updated dependencies [a571d6e]
337
+ - Updated dependencies [742b7be]
338
+ - Updated dependencies [9e16bfd]
339
+ - Updated dependencies [e7fcc86]
340
+ - Updated dependencies [0477a13]
341
+ - Updated dependencies [7cddb72]
342
+ - Updated dependencies [ccce59b]
343
+ - Updated dependencies [e2b9e4b]
344
+ - Updated dependencies [95857aa]
345
+ - Updated dependencies [45c1ea2]
346
+ - Updated dependencies [6f6bb89]
347
+ - Updated dependencies [26b6dd0]
348
+ - Updated dependencies [060370c]
349
+ - Updated dependencies [dc714f3]
350
+ - Updated dependencies [b5da06a]
351
+ - Updated dependencies [d1a1aa1]
352
+ - Updated dependencies [63f9e9b]
353
+ - Updated dependencies [5d142ab]
354
+ - Updated dependencies [d5f588f]
355
+ - Updated dependencies [30ab1de]
356
+ - Updated dependencies [e025824]
357
+ - Updated dependencies [0571b98]
358
+ - Updated dependencies [b6b43c7]
359
+ - Updated dependencies [4fef487]
360
+ - Updated dependencies [48d257a]
361
+ - Updated dependencies [0c0c0b3]
362
+ - Updated dependencies [0d2c085]
363
+ - Updated dependencies [40acf9b]
364
+ - Updated dependencies [9222aeb]
365
+ - Updated dependencies [e2aceaf]
366
+ - Updated dependencies [411e483]
367
+ - Updated dependencies [97fedf9]
368
+ - Updated dependencies [8ba77a7]
369
+ - Updated dependencies [c91586a]
370
+ - Updated dependencies [7b3ae3f]
371
+ - Updated dependencies [a166433]
372
+ - Updated dependencies [3cbcbb7]
373
+ - Updated dependencies [26735b5]
374
+ - Updated dependencies [443d8ec]
375
+ - Updated dependencies [a8c8bd5]
376
+ - Updated dependencies [abf9a79]
377
+ - Updated dependencies [14c9410]
378
+ - Updated dependencies [e86be6f]
379
+ - Updated dependencies [9bf7291]
380
+ - Updated dependencies [2e13791]
381
+ - Updated dependencies [9f95b35]
382
+ - Updated dependencies [66962ed]
383
+ - Updated dependencies [fedb55e]
384
+ - Updated dependencies [0d06df6]
385
+ - Updated dependencies [472524a]
386
+ - Updated dependencies [dd3ff01]
387
+ - Updated dependencies [6c2c708]
388
+ - Updated dependencies [d9c98f4]
389
+ - Updated dependencies [05d2819]
390
+ - Updated dependencies [9301f86]
391
+ - Updated dependencies [0a87932]
392
+ - Updated dependencies [c4a2fec]
393
+ - Updated dependencies [957b739]
394
+ - Updated dependencies [721775e]
395
+ - Updated dependencies [70ebead]
396
+ - Updated dependencies [79457bd]
397
+ - Updated dependencies [a3f768e]
398
+ - Updated dependencies [f3639fa]
399
+ - Updated dependencies [7435eb5]
400
+ - Updated dependencies [8aa9e20]
401
+ - Updated dependencies [4617fab]
402
+ - Updated dependencies [ac34802]
403
+ - Updated dependencies [0054544]
404
+ - Updated dependencies [cb68df0]
405
+ - Updated dependencies [ad80501]
406
+ - Updated dependencies [8bd3624]
407
+ - Updated dependencies [68ecf2f]
408
+ - Updated dependencies [9e9c809]
409
+ - Updated dependencies [32831c6]
410
+ - Updated dependencies [6dc848c]
411
+ - Updated dependencies [6b98118]
412
+ - Updated dependencies [d0f9495]
413
+ - Updated dependencies [c145d62]
414
+ - Updated dependencies [63d791d]
415
+ - Updated dependencies [87b828f]
416
+ - Updated dependencies [3f2f00c]
417
+ - Updated dependencies [bfdca8d]
418
+ - Updated dependencies [0ff02bb]
419
+ - Updated dependencies [7979f7f]
420
+ - Updated dependencies [f77bc38]
421
+ - Updated dependencies [989ac75]
422
+ - Updated dependencies [39a4fab]
423
+ - Updated dependencies [44f4aba]
424
+ - Updated dependencies [7742ba3]
425
+ - Updated dependencies [9bd5ab5]
426
+ - Updated dependencies [57edfcb]
427
+ - Updated dependencies [faf8446]
428
+ - Updated dependencies [c190907]
429
+ - Updated dependencies [7ea4132]
430
+ - Updated dependencies [d1a034f]
431
+ - Updated dependencies [d454e4b]
432
+ - Updated dependencies [5c56081]
433
+ - Updated dependencies [fd65bc6]
434
+ - Updated dependencies [cf1e00e]
435
+ - Updated dependencies [023ba40]
436
+ - Updated dependencies [cc21603]
437
+ - Updated dependencies [ea7a7c9]
438
+ - Updated dependencies [26535e0]
439
+ - Updated dependencies [e030615]
440
+ - Updated dependencies [5e57fae]
441
+ - Updated dependencies [393138b]
442
+ - Updated dependencies [c57e248]
443
+ - Updated dependencies [88a8ee5]
444
+ - Updated dependencies [41fa418]
445
+ - Updated dependencies [205077b]
446
+ - Updated dependencies [71f938d]
447
+ - Updated dependencies [e001ea1]
448
+ - Updated dependencies [3795467]
449
+ - Updated dependencies [28a5ed5]
450
+ - Updated dependencies [7182d14]
451
+ - Updated dependencies [c1e6647]
452
+ - Updated dependencies [1766ede]
453
+ - Updated dependencies [811dff3]
454
+ - Updated dependencies [f10304b]
455
+ - Updated dependencies [dd5fd43]
456
+ - Updated dependencies [33f4a6a]
457
+ - Updated dependencies [383cbfa]
458
+ - Updated dependencies [27deb4d]
459
+ - Updated dependencies [c4df419]
460
+ - @ai-sdk/provider-utils@3.0.0
461
+ - @ai-sdk/provider@2.0.0
462
+ - @ai-sdk/gateway@1.0.0
463
+
464
+ ## 5.0.0-beta.34
465
+
466
+ ### Patch Changes
467
+
468
+ - 53569b8: feat (ai): add experimental repairText function to streamObject
469
+ - 88a8ee5: fix (ai): support abort during retry waits
470
+ - f2c7f19: feat (ui): add Chat.clearError()
471
+ - Updated dependencies [721775e]
472
+ - Updated dependencies [88a8ee5]
473
+ - @ai-sdk/gateway@1.0.0-beta.19
474
+ - @ai-sdk/provider-utils@3.0.0-beta.10
475
+
476
+ ## 5.0.0-beta.33
477
+
478
+ ### Patch Changes
479
+
480
+ - 48378b9: fix (ai): send null as tool output when tools return undefined
481
+ - 93d53a1: chore (ai): remove cli
482
+ - 27deb4d: feat (provider/gateway): Add providerMetadata to embeddings response
483
+ - Updated dependencies [27deb4d]
484
+ - @ai-sdk/gateway@1.0.0-beta.18
485
+ - @ai-sdk/provider@2.0.0-beta.2
486
+ - @ai-sdk/provider-utils@3.0.0-beta.9
487
+
488
+ ## 5.0.0-beta.32
489
+
490
+ ### Patch Changes
491
+
492
+ - bc24722: feat (ai): Add finishReason as a promise on StreamObjectResult to match StreamTextResult
493
+ - 13b4f46: feat (ai): export experimental MCPClient and MCPClientConfig interfaces
494
+ - 56c232b: fix (ai): remove outdated sendStart jsdoc
495
+
496
+ ## 5.0.0-beta.31
497
+
498
+ ### Patch Changes
499
+
500
+ - 6622441: feat (ai): add static/dynamic toolCalls/toolResults helpers
501
+ - ced8eee: feat(ai): re-export zodSchema from main package
502
+ - cee64b2: fix(otel): change back toolCall attributes of input/output back to args/result for compatibility
503
+ - ee38081: Add support for audio/webm to detect-media-type
504
+ - dd5fd43: feat (ai): support dynamic tools in Chat onToolCall
505
+ - Updated dependencies [dd5fd43]
506
+ - @ai-sdk/provider-utils@3.0.0-beta.8
507
+ - @ai-sdk/gateway@1.0.0-beta.17
508
+
509
+ ## 5.0.0-beta.30
510
+
511
+ ### Patch Changes
512
+
513
+ - Updated dependencies [fedb55e]
514
+ - @ai-sdk/gateway@1.0.0-beta.16
515
+
516
+ ## 5.0.0-beta.29
517
+
518
+ ### Patch Changes
519
+
520
+ - e7fcc86: feat (ai): introduce dynamic tools
521
+ - d92b9a8: fix(ai): add support for MCP protocol version 2025-06-18
522
+ - Updated dependencies [e7fcc86]
523
+ - @ai-sdk/provider-utils@3.0.0-beta.7
524
+ - @ai-sdk/gateway@1.0.0-beta.15
525
+
526
+ ## 5.0.0-beta.28
527
+
528
+ ### Patch Changes
529
+
530
+ - 84343eb: fix (ui): call sendAutomaticallyWhen with updated messages
531
+ - a753b3a: feat (provider/anthropic): cache control for tools
532
+ - Updated dependencies [ac34802]
533
+ - @ai-sdk/provider-utils@3.0.0-beta.6
534
+ - @ai-sdk/gateway@1.0.0-beta.14
535
+
536
+ ## 5.0.0-beta.27
537
+
538
+ ### Patch Changes
539
+
540
+ - d5ae088: feat (ui): add sendAutomaticallyWhen to Chat
541
+ - Updated dependencies [0477a13]
542
+ - Updated dependencies [cf1e00e]
543
+ - Updated dependencies [cc21603]
544
+ - @ai-sdk/gateway@1.0.0-beta.13
545
+
546
+ ## 5.0.0-beta.26
547
+
548
+ ### Patch Changes
549
+
550
+ - ae77a99: chore (ai): rename text and reasoning chunks in streamText fullstream
551
+ - 1f6ce57: feat (ai): infer tool call types in the `onToolCall` callback
552
+ - 5a975a4: feat (ui): update Chat tool result submission
553
+ - 2a62513: Fix error thrown when emptying messages in onError or onFinish
554
+ - 904fa5e: feat (ai/core): add terminateOnError option to readUIMessageStream
555
+ - f81c720: chore(ai): bundle dependencies in CLI binary
556
+ - Updated dependencies [70ebead]
557
+ - @ai-sdk/gateway@1.0.0-beta.12
558
+
559
+ ## 5.0.0-beta.25
560
+
561
+ ### Patch Changes
562
+
563
+ - Updated dependencies [8bd3624]
564
+ - Updated dependencies [e001ea1]
565
+ - @ai-sdk/gateway@1.0.0-beta.11
566
+
567
+ ## 5.0.0-beta.24
568
+
569
+ ### Patch Changes
570
+
571
+ - add5ac1: feat (ai): make streamText toUIMessageStream async iterable
572
+ - ff1c81a: feat (ai): add streamText onAbort callback
573
+ - e4c8647: feat (ui): allow asynchronous onFinish in createUIMessageStream
574
+ - 383cbfa: feat (ai): add isAborted to onFinish callback for ui message streams
575
+ - Updated dependencies [57edfcb]
576
+ - Updated dependencies [383cbfa]
577
+ - @ai-sdk/provider-utils@3.0.0-beta.5
578
+ - @ai-sdk/gateway@1.0.0-beta.10
579
+
580
+ ## 5.0.0-beta.23
581
+
582
+ ### Patch Changes
583
+
584
+ - 89ba235: fix (ui): support tool names with dash
585
+
586
+ ## 5.0.0-beta.22
587
+
588
+ ### Patch Changes
589
+
590
+ - de2d2ab: feat(ai): add provider and provider registry middleware functionality
591
+ - 6c42e56: feat (ai): validate ui stream data chunks
592
+ - c93a8bc: chore(ai): export AsyncIterableStream type from async-iterable-stream module
593
+ - 20398f2: feat: ai sdk cli documentation + adjusted default model
594
+ - 86293e5: fix (ai): use correct generateMessageId in streamText toUIMessageStream
595
+ - 205077b: fix: improve Zod compatibility
596
+ - Updated dependencies [205077b]
597
+ - @ai-sdk/provider-utils@3.0.0-beta.4
598
+ - @ai-sdk/gateway@1.0.0-beta.9
599
+
600
+ ## 5.0.0-beta.21
601
+
602
+ ### Patch Changes
603
+
604
+ - 38ae5cc: feat (ai): export InferUIMessageChunk type
605
+ - faea29f: fix (provider/openai): multi-step reasoning with text
606
+ - 90ac328: fix (ui): tool part metadata support in ui messages
607
+ - 4a1e0c8: fix(ai-cli): fix bundling and improve authentication error handling
608
+ - 30ac566: fix (ui): text message metadata support in ui messages
609
+
610
+ ## 5.0.0-beta.20
611
+
612
+ ### Patch Changes
613
+
614
+ - 4c8f834: feat: automatically respect rate limit headers in retry logic
615
+
616
+ Added automatic support for respecting rate limit headers (`retry-after-ms` and `retry-after`) in the SDK's retry logic. When these headers are present and contain reasonable values (0-60 seconds), the retry mechanism will use the server-specified delay instead of exponential backoff. This matches the behavior of Anthropic and OpenAI client SDKs and improves rate limit handling without requiring any API changes.
617
+
618
+ ## 5.0.0-beta.19
619
+
620
+ ### Patch Changes
621
+
622
+ - 10b21eb: feat(cli): add ai command line interface
623
+ - 75c3396: fix (ai): handle errors in 2nd streamText doStream call
624
+ - 05d2819: feat: allow zod 4.x as peer dependency
625
+ - db64cbe: fix (provider/openai): multi-step reasoning with tool calls
626
+ - Updated dependencies [05d2819]
627
+ - @ai-sdk/provider-utils@3.0.0-beta.3
628
+ - @ai-sdk/gateway@1.0.0-beta.8
629
+
630
+ ## 5.0.0-beta.18
631
+
632
+ ### Patch Changes
633
+
634
+ - d3960e3: selectTelemetryAttributes more robustness
635
+ - 9338f3e: fix (ai): throw error for v1 models
636
+
637
+ ## 5.0.0-beta.17
638
+
639
+ ### Patch Changes
640
+
641
+ - Updated dependencies [c190907]
642
+ - @ai-sdk/gateway@1.0.0-beta.7
643
+
644
+ ## 5.0.0-beta.16
645
+
646
+ ### Patch Changes
647
+
648
+ - Updated dependencies [9e16bfd]
649
+ - @ai-sdk/gateway@1.0.0-beta.6
650
+
651
+ ## 5.0.0-beta.15
652
+
653
+ ### Patch Changes
654
+
655
+ - 8e31d46: feat (ai): export SourceDocumentUIPart
656
+
657
+ ## 5.0.0-beta.14
658
+
659
+ ### Patch Changes
660
+
661
+ - Updated dependencies [30ab1de]
662
+ - @ai-sdk/gateway@1.0.0-beta.5
663
+
664
+ ## 5.0.0-beta.13
665
+
666
+ ### Patch Changes
667
+
668
+ - 377bbcf: fix (ui): tool input can be undefined during input-streaming
669
+ - ce1d1f3: feat (ai): export mock image, speech, and transcription models
670
+ - c040e2f: fix (ui): inject generated response message id
671
+ - c808e4d: fix (ui): do not send changing assistant message ids when onFinish is provided
672
+
673
+ ## 5.0.0-beta.12
674
+
675
+ ### Patch Changes
676
+
677
+ - fc0380b: feat (ui): resolvable header, body, credentials in http chat transport
678
+ - 51f497d: feat (ai): step input message modification in prepareStep
679
+ - 4f3776c: feat (ai): add InferUITools helper
680
+
681
+ ## 5.0.0-beta.11
682
+
683
+ ### Patch Changes
684
+
685
+ - 9e40cbe: Allow destructuring output and errorText on `ToolUIPart` type
686
+
687
+ ## 5.0.0-beta.10
688
+
689
+ ### Major Changes
690
+
691
+ - 2b637d6: chore (ai): rename UIMessageStreamPart to UIMessageChunk
692
+
693
+ ### Patch Changes
694
+
695
+ - 16ccfb2: feat (ai): add readUIMessageStream helper
696
+ - 90ca2b9: feat(ai): Record tool call errors on tool call spans recorded in `generateText` and `streamText`.
697
+ - af1d5a5: fix(ai): Unexpected reasoning-start event in extract reasoning middleware
698
+
699
+ ## 5.0.0-beta.9
700
+
701
+ ### Patch Changes
702
+
703
+ - 86cfc72: feat (ai): add ignoreIncompleteToolCalls option to convertToModelMessages
704
+
705
+ ## 5.0.0-beta.8
706
+
707
+ ### Patch Changes
708
+
709
+ - 6909543: feat (ai): support system parameter in Agent constructor
710
+ - c8fce91: feat (ai): add experimental Agent abstraction
711
+ - 9121250: Expose provider metadata as an attribute on exported OTEL spans
712
+ - Updated dependencies [97fedf9]
713
+ - @ai-sdk/gateway@1.0.0-beta.4
714
+
715
+ ## 5.0.0-beta.7
716
+
717
+ ### Patch Changes
718
+
719
+ - 60132dd: fixed date formatting for updated mcp protocol version
720
+
721
+ ## 5.0.0-beta.6
722
+
723
+ ### Patch Changes
724
+
725
+ - 143c55b: feat (ai): export Chat callback types
726
+ - f04ffe4: feat (ui): add onData callback to Chat
727
+ - 97c35c0: feat (ui): transient data parts
728
+ - fccf75c: update mcp protocol version
729
+
730
+ ## 5.0.0-beta.5
731
+
732
+ ### Patch Changes
733
+
734
+ - 4f3e637: fix (ui): avoid caching globalThis.fetch in case it is patched by other libraries
735
+
736
+ ## 5.0.0-beta.4
737
+
738
+ ### Patch Changes
739
+
740
+ - 09f41ac: fix (ui): add message metadata in Chat.sendMessage
741
+
742
+ ## 5.0.0-beta.3
743
+
744
+ ### Patch Changes
745
+
746
+ - Updated dependencies [f3639fa]
747
+ - Updated dependencies [d454e4b]
748
+ - @ai-sdk/gateway@1.0.0-beta.3
749
+
750
+ ## 5.0.0-beta.2
751
+
752
+ ### Patch Changes
753
+
754
+ - 0d9583c: fix (ai): use user-provided media type when available
755
+ - c6b64a7: feat (ai): allow async prepareRequest on HttpChatTransport
756
+ - cb3b9c9: fix (ai): catch errors in ui message stream
757
+ - d1a034f: feature: using Zod 4 for internal stuff
758
+ - Updated dependencies [0571b98]
759
+ - Updated dependencies [c91586a]
760
+ - Updated dependencies [39a4fab]
761
+ - Updated dependencies [d1a034f]
762
+ - @ai-sdk/provider-utils@3.0.0-beta.2
763
+ - @ai-sdk/gateway@1.0.0-beta.2
764
+
765
+ ## 5.0.0-beta.1
766
+
767
+ ### Major Changes
768
+
769
+ - 9ad0484: feat (ai): automatic tool execution error handling
770
+
771
+ ### Patch Changes
772
+
773
+ - d88455d: feat (ai): expose http chat transport type
774
+ - 4048ce3: fix (ai): add tests and examples for openai responses
775
+ - f2b041e: Fix custom `fetch` in HttpChatTransport
776
+ - cb68df0: feat: add transcription and speech model support to provider registry
777
+ - 26695a3: feat (ui): add state for text and reasoning ui message parts
778
+ - e7d2ce3: feat: provider-executed tools
779
+ - 102b066: fix (ai): fix invalid fetch call
780
+ - e862b5b: feat (ai): allow sync tool.execute
781
+ - 7bd025b: fix (ai): fix sync tool execute with streamText
782
+ - Updated dependencies [742b7be]
783
+ - Updated dependencies [7cddb72]
784
+ - Updated dependencies [ccce59b]
785
+ - Updated dependencies [e2b9e4b]
786
+ - Updated dependencies [45c1ea2]
787
+ - Updated dependencies [e025824]
788
+ - Updated dependencies [0d06df6]
789
+ - Updated dependencies [472524a]
790
+ - Updated dependencies [dd3ff01]
791
+ - Updated dependencies [7435eb5]
792
+ - Updated dependencies [cb68df0]
793
+ - Updated dependencies [bfdca8d]
794
+ - Updated dependencies [f77bc38]
795
+ - Updated dependencies [44f4aba]
796
+ - Updated dependencies [023ba40]
797
+ - Updated dependencies [5e57fae]
798
+ - Updated dependencies [71f938d]
799
+ - Updated dependencies [28a5ed5]
800
+ - @ai-sdk/provider@2.0.0-beta.1
801
+ - @ai-sdk/provider-utils@3.0.0-beta.1
802
+ - @ai-sdk/gateway@1.0.0-beta.1
803
+
804
+ ## 5.0.0-alpha.15
805
+
806
+ ### Major Changes
807
+
808
+ - 04d5063: chore (ai): rename default provider global to AI_SDK_DEFAULT_PROVIDER
809
+ - b4b4bb2: chore (ui): rename experimental_resume to resumeStream
810
+ - d884051: feat (ai): simplify default provider setup
811
+ - 954aa73: feat (ui): extended regenerate support
812
+ - 60e2c56: feat (ai): restructure chat transports
813
+
814
+ ### Patch Changes
815
+
816
+ - b1e3abd: feat (ai): expose ui message stream headers
817
+ - 142576e: feat (ui): support message replacement in chat via messageId param on sendMessage
818
+ - 395c85e: feat (ai): add consumeSseStream option to UI message stream responses
819
+ - Updated dependencies [48d257a]
820
+ - Updated dependencies [8ba77a7]
821
+ - Updated dependencies [c145d62]
822
+ - @ai-sdk/provider@2.0.0-alpha.15
823
+ - @ai-sdk/provider-utils@3.0.0-alpha.15
824
+ - @ai-sdk/gateway@1.0.0-alpha.15
825
+
826
+ ## 5.0.0-alpha.14
827
+
828
+ ### Major Changes
829
+
830
+ - 63f9e9b: chore (provider,ai): tools have input/output instead of args,result
831
+
832
+ ### Patch Changes
833
+
834
+ - Updated dependencies [b5da06a]
835
+ - Updated dependencies [63f9e9b]
836
+ - Updated dependencies [2e13791]
837
+ - @ai-sdk/provider@2.0.0-alpha.14
838
+ - @ai-sdk/gateway@1.0.0-alpha.14
839
+ - @ai-sdk/provider-utils@3.0.0-alpha.14
840
+
841
+ ## 5.0.0-alpha.13
842
+
843
+ ### Major Changes
844
+
845
+ - 0a710d8: feat (ui): typed tool parts in ui messages
846
+ - 6a83f7d: refactoring (ai): restructure message metadata transfer
847
+ - 1f55c21: chore (ai): send reasoning to the client by default
848
+ - 33eb499: feat (ai): inject message id in createUIMessageStream
849
+ - 901df02: feat (ui): use UI_MESSAGE generic
850
+
851
+ ### Patch Changes
852
+
853
+ - Updated dependencies [68ecf2f]
854
+ - @ai-sdk/provider@2.0.0-alpha.13
855
+ - @ai-sdk/gateway@1.0.0-alpha.13
856
+ - @ai-sdk/provider-utils@3.0.0-alpha.13
857
+
858
+ ## 5.0.0-alpha.12
859
+
860
+ ### Major Changes
861
+
862
+ - 4892798: chore (ai): always stream tool calls
863
+
864
+ ### Patch Changes
865
+
866
+ - da1e6f0: feat (ui): add generics to ui message stream parts
867
+ - Updated dependencies [e2aceaf]
868
+ - @ai-sdk/gateway@1.0.0-alpha.12
869
+ - @ai-sdk/provider@2.0.0-alpha.12
870
+ - @ai-sdk/provider-utils@3.0.0-alpha.12
871
+
872
+ ## 5.0.0-alpha.11
873
+
874
+ ### Major Changes
875
+
876
+ - e8324c5: feat (ai): add args callbacks to tools
877
+
878
+ ### Patch Changes
879
+
880
+ - Updated dependencies [c1e6647]
881
+ - @ai-sdk/provider@2.0.0-alpha.11
882
+ - @ai-sdk/gateway@1.0.0-alpha.11
883
+ - @ai-sdk/provider-utils@3.0.0-alpha.11
884
+
885
+ ## 5.0.0-alpha.10
886
+
887
+ ### Major Changes
888
+
889
+ - 98f25e5: chore (ui): remove managed chat inputs
890
+ - 7bb58d4: chore (ai): restructure prepareRequest
891
+
892
+ ### Patch Changes
893
+
894
+ - Updated dependencies [c4df419]
895
+ - @ai-sdk/provider@2.0.0-alpha.10
896
+ - @ai-sdk/gateway@1.0.0-alpha.10
897
+ - @ai-sdk/provider-utils@3.0.0-alpha.10
898
+
899
+ ## 5.0.0-alpha.9
900
+
901
+ ### Major Changes
902
+
903
+ - 9ae327d: chore (ui): replace chat store concept with chat instances
904
+
905
+ ### Patch Changes
906
+
907
+ - 8255639: ### Fix use with Google APIs + zod v4's `.literal()` schema
908
+
909
+ Before [zod@3.25.49](https://github.com/colinhacks/zod/releases/tag/v3.25.49), requests to Google's APIs failed due to a missing `type` in the provided schema. The problem has been resolved for the `ai` SDK by bumping our `zod` peer dependencies to `^3.25.49`.
910
+
911
+ pull request: https://github.com/vercel/ai/pull/6609
912
+
913
+ - Updated dependencies [26b6dd0]
914
+ - Updated dependencies [811dff3]
915
+ - @ai-sdk/gateway@1.0.0-alpha.9
916
+ - @ai-sdk/provider@2.0.0-alpha.9
917
+ - @ai-sdk/provider-utils@3.0.0-alpha.9
918
+
919
+ ## 5.0.0-alpha.8
920
+
921
+ ### Major Changes
922
+
923
+ - c25cbce: feat (ai): use console.error as default error handler for streamText and streamObject
924
+
925
+ ### Patch Changes
926
+
927
+ - 4fef487: feat: support for zod v4 for schema validation
928
+
929
+ All these methods now accept both a zod v4 and zod v3 schemas for validation:
930
+
931
+ - `generateObject()`
932
+ - `streamObject()`
933
+ - `generateText()`
934
+ - `experimental_useObject()` from `@ai-sdk/react`
935
+ - `streamUI()` from `@ai-sdk/rsc`
936
+
937
+ - 6b1c55c: feat (ai): introduce GLOBAL_DEFAULT_PROVIDER
938
+ - 2e4f9e4: feat (ai): improved error messages when using gateway
939
+ - Updated dependencies [4fef487]
940
+ - Updated dependencies [9222aeb]
941
+ - Updated dependencies [3cbcbb7]
942
+ - Updated dependencies [989ac75]
943
+ - Updated dependencies [7742ba3]
944
+ - @ai-sdk/provider-utils@3.0.0-alpha.8
945
+ - @ai-sdk/provider@2.0.0-alpha.8
946
+ - @ai-sdk/gateway@1.0.0-alpha.8
947
+
948
+ ## 5.0.0-alpha.7
949
+
950
+ ### Major Changes
951
+
952
+ - db345da: chore (ai): remove exports of internal ui functions
953
+ - 247ee0c: chore (ai): remove steps from tool invocation ui parts
954
+
955
+ ### Patch Changes
956
+
957
+ - 9b0da33: fix (ai): do not send id with start unless specified
958
+ - Updated dependencies [5c56081]
959
+ - @ai-sdk/provider@2.0.0-alpha.7
960
+ - @ai-sdk/gateway@1.0.0-alpha.7
961
+ - @ai-sdk/provider-utils@3.0.0-alpha.7
962
+
963
+ ## 5.0.0-alpha.6
964
+
965
+ ### Patch Changes
966
+
967
+ - 0d2c085: feat (ai): support string model ids through gateway
968
+ - 48a7606: feat (ai): support changing the system prompt in prepareSteps
969
+ - Updated dependencies [0d2c085]
970
+ - Updated dependencies [6c2c708]
971
+ - @ai-sdk/provider@2.0.0-alpha.6
972
+ - @ai-sdk/gateway@1.0.0-alpha.6
973
+ - @ai-sdk/provider-utils@3.0.0-alpha.6
974
+
975
+ ## 5.0.0-alpha.5
976
+
977
+ ### Major Changes
978
+
979
+ - ef256ed: chore (ai): refactor and use chatstore in svelte
980
+ - 1ed0287: chore (ai): stable sendStart/sendFinish options
981
+
982
+ ### Patch Changes
983
+
984
+ - 655cf3c: feat (ui): add onFinish to createUIMessageStream
985
+ - 1675396: fix: avoid job executor deadlock when adding tool result
986
+ - cf9af6e: feat (ai): allow sync prepareStep
987
+ - 825e8d7: release alpha.5
988
+ - 7324c21: fix (ai/telemetry): Avoid JSON.stringify on Uint8Arrays for telemetry
989
+
990
+ ## 5.0.0-alpha.4
991
+
992
+ ### Major Changes
993
+
994
+ - 72d7d72: chore (ai): stable activeTools
995
+ - 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to stepCountIs.
996
+
997
+ ### Patch Changes
998
+
999
+ - b32c141: feat (ai): add array support to stopWhen
1000
+ - 7d97ab6: release alpha.4
1001
+ - 37a916d: feat (ai): add prepareSteps to streamText
1002
+ - 5f2b3d4: chore (ai): stable prepareStep
1003
+ - Updated dependencies [dc714f3]
1004
+ - @ai-sdk/provider@2.0.0-alpha.4
1005
+ - @ai-sdk/provider-utils@3.0.0-alpha.4
1006
+
1007
+ ## 5.0.0-alpha.3
1008
+
1009
+ ### Major Changes
1010
+
1011
+ - ab7ccef: chore (ai): change source ui message parts to source-url
1012
+ - 257224b: chore (ai): separate TextStreamChatTransport
1013
+ - 0463011: fix (ai): update source url stream part
1014
+ - d306260: feat (ai): replace maxSteps with continueUntil (streamText)
1015
+
1016
+ ### Patch Changes
1017
+
1018
+ - Updated dependencies [6b98118]
1019
+ - @ai-sdk/provider@2.0.0-alpha.3
1020
+ - @ai-sdk/provider-utils@3.0.0-alpha.3
1021
+
1022
+ ## 5.0.0-alpha.2
1023
+
1024
+ ### Patch Changes
1025
+
1026
+ - 82aa95d: fix (ai): merge data ui stream parts correctly
1027
+ - Updated dependencies [26535e0]
1028
+ - @ai-sdk/provider@2.0.0-alpha.2
1029
+ - @ai-sdk/provider-utils@3.0.0-alpha.2
1030
+
1031
+ ## 5.0.0-alpha.1
1032
+
1033
+ ### Major Changes
1034
+
1035
+ - 109c0ac: chore (ai): rename id to chatId (in post request, resume request, and useChat)
1036
+
1037
+ ### Patch Changes
1038
+
1039
+ - b346545: feat (ai): add data ui part schemas
1040
+ - Updated dependencies [3f2f00c]
1041
+ - @ai-sdk/provider@2.0.0-alpha.1
1042
+ - @ai-sdk/provider-utils@3.0.0-alpha.1
1043
+
1044
+ ## 5.0.0-canary.24
1045
+
1046
+ ### Major Changes
1047
+
1048
+ - f7e8bf4: chore (ai): flatten ui message stream parts
1049
+ - ed675de: feat (ai): add ui data parts
1050
+ - 64f6d64: feat (ai): replace maxSteps with continueUntil (generateText)
1051
+
1052
+ ### Patch Changes
1053
+
1054
+ - bedb239: chore (ai): make ui stream parts value optional when it's not required
1055
+ - 507ac1d: fix (ui/react): update messages immediately with the submitted user message
1056
+ - 2b9bbcd: feat (ai): improve prompt validation error message
1057
+ - cda32ba: fix (ai): send `start` part in correct position in stream (streamText)
1058
+ - 50f0362: fix (ai): fix experimental sendStart/sendFinish options in streamText
1059
+ - Updated dependencies [faf8446]
1060
+ - @ai-sdk/provider-utils@3.0.0-canary.19
1061
+
1062
+ ## 5.0.0-canary.23
1063
+
1064
+ ### Major Changes
1065
+
1066
+ - 40acf9b: feat (ui): introduce ChatStore and ChatTransport
1067
+
1068
+ ### Patch Changes
1069
+
1070
+ - Updated dependencies [40acf9b]
1071
+ - @ai-sdk/provider-utils@3.0.0-canary.18
1072
+
1073
+ ## 5.0.0-canary.22
1074
+
1075
+ ### Major Changes
1076
+
1077
+ - e7dc6c7: chore (ai): remove onResponse callback
1078
+ - a34eb39: chore (ai): remove `data` and `allowEmptySubmit` from `ChatRequestOptions`
1079
+ - b33ed7a: chore (ai): rename DataStream* to UIMessage*
1080
+ - 765f1cd: chore (ai): remove deprecated useChat isLoading helper
1081
+
1082
+ ## 5.0.0-canary.21
1083
+
1084
+ ### Major Changes
1085
+
1086
+ - d964901: - remove setting temperature to `0` by default
1087
+ - remove `null` option from `DefaultSettingsMiddleware`
1088
+ - remove setting defaults for `temperature` and `stopSequences` in `ai` to enable middleware changes
1089
+ - 0560977: chore (ai): improve consistency of generate text result, stream text result, and step result
1090
+ - 516be5b: ### Move Image Model Settings into generate options
1091
+
1092
+ Image Models no longer have settings. Instead, `maxImagesPerCall` can be passed directly to `generateImage()`. All other image settings can be passed to `providerOptions[provider]`.
1093
+
1094
+ Before
1095
+
1096
+ ```js
1097
+ await generateImage({
1098
+ model: luma.image('photon-flash-1', {
1099
+ maxImagesPerCall: 5,
1100
+ pollIntervalMillis: 500,
1101
+ }),
1102
+ prompt,
1103
+ n: 10,
1104
+ });
1105
+ ```
1106
+
1107
+ After
1108
+
1109
+ ```js
1110
+ await generateImage({
1111
+ model: luma.image('photon-flash-1'),
1112
+ prompt,
1113
+ n: 10,
1114
+ maxImagesPerCall: 5,
1115
+ providerOptions: {
1116
+ luma: { pollIntervalMillis: 5 },
1117
+ },
1118
+ });
1119
+ ```
1120
+
1121
+ Pull Request: https://github.com/vercel/ai/pull/6180
1122
+
1123
+ - bfbfc4c: feat (ai): streamText/generateText: totalUsage contains usage for all steps. usage is for a single step.
1124
+ - ea7a7c9: feat (ui): UI message metadata
1125
+ - 1409e13: chore (ai): remove experimental continueSteps
1126
+
1127
+ ### Patch Changes
1128
+
1129
+ - 66af894: fix (ai): respect content order in toResponseMessages
1130
+ - Updated dependencies [ea7a7c9]
1131
+ - @ai-sdk/provider-utils@3.0.0-canary.17
1132
+
1133
+ ## 5.0.0-canary.20
1134
+
1135
+ ### Major Changes
1136
+
1137
+ - 13fef90: chore (ai): remove automatic conversion of UI messages to model messages
1138
+ - 496bbc1: chore (ui): inline/remove ChatRequest type
1139
+ - da70d79: chore (ai): remove getUIText helper
1140
+ - c7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStream
1141
+ - 35fc02c: chore (ui): rename RequestOptions to CompletionRequestOptions
1142
+ - b983b51: feat (ai): support model message array in prompt
1143
+
1144
+ ### Minor Changes
1145
+
1146
+ - bcea599: feat (ai): add content to generateText result
1147
+ - 48d675a: feat (ai): add content to streamText result
1148
+
1149
+ ### Patch Changes
1150
+
1151
+ - e90d45d: chore (rsc): move HANGING_STREAM_WARNING_TIME constant into @ai-sdk/rsc package
1152
+ - bc3109f: chore (ai): push stream-callbacks into langchain/llamaindex adapters
1153
+ - Updated dependencies [87b828f]
1154
+ - @ai-sdk/provider-utils@3.0.0-canary.16
1155
+
1156
+ ## 5.0.0-canary.19
1157
+
1158
+ ### Major Changes
1159
+
1160
+ - 2d03e19: chore (ai): remove StreamCallbacks.onCompletion
1161
+ - 319b989: chore (ai): remove content from ui messages
1162
+ - 441d042: chore (ui): data stream protocol v2 with SSEs
1163
+ - dcc549b: remove StreamTextResult.mergeIntoDataStream method
1164
+ rename DataStreamOptions.getErrorMessage to onError
1165
+ add pipeTextStreamToResponse function
1166
+ add createTextStreamResponse function
1167
+ change createDataStreamResponse function to accept a DataStream and not a DataStreamWriter
1168
+ change pipeDataStreamToResponse function to accept a DataStream and not a DataStreamWriter
1169
+ change pipeDataStreamToResponse function to have a single parameter
1170
+ - cb2b53a: chore (ai): refactor header preparation
1171
+ - e244a78: chore (ai): remove StreamData and mergeStreams
1172
+
1173
+ ## 5.0.0-canary.18
1174
+
1175
+ ### Major Changes
1176
+
1177
+ - c60f895: chore (ai): remove useChat keepLastMessageOnError
1178
+ - a662dea: chore (ai): remove sendExtraMessageFields
1179
+
1180
+ ### Patch Changes
1181
+
1182
+ - a571d6e: chore(provider-utils): move ToolResultContent to provider-utils
1183
+ - 332167b: chore (ai): move maxSteps into UseChatOptions
1184
+ - a8c8bd5: feat(embed-many): respect supportsParallelCalls & concurrency
1185
+ - Updated dependencies [a571d6e]
1186
+ - Updated dependencies [a8c8bd5]
1187
+ - Updated dependencies [7979f7f]
1188
+ - Updated dependencies [41fa418]
1189
+ - @ai-sdk/provider-utils@3.0.0-canary.15
1190
+ - @ai-sdk/provider@2.0.0-canary.14
1191
+
1192
+ ## 5.0.0-canary.17
1193
+
1194
+ ### Major Changes
1195
+
1196
+ - f04fb4a: chore (ai): replace useChat attachments with file ui parts
1197
+ - fd1924b: chore (ai): remove redundant `mimeType` property
1198
+ - fafc3f2: chore (ai): change file to parts to use urls instead of data
1199
+ - 92cb0a2: chore (ai): rename CoreMessage to ModelMessage
1200
+
1201
+ ### Minor Changes
1202
+
1203
+ - c9ad635: feat (ai): add filename to file ui parts
1204
+
1205
+ ### Patch Changes
1206
+
1207
+ - 9bd5ab5: feat (provider): add providerMetadata to ImageModelV2 interface (#5977)
1208
+
1209
+ The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
1210
+
1211
+ ```js
1212
+ const prompt = 'Santa Claus driving a Cadillac';
1213
+
1214
+ const { providerMetadata } = await experimental_generateImage({
1215
+ model: openai.image('dall-e-3'),
1216
+ prompt,
1217
+ });
1218
+
1219
+ const revisedPrompt = providerMetadata.openai.images[0]?.revisedPrompt;
1220
+
1221
+ console.log({
1222
+ prompt,
1223
+ revisedPrompt,
1224
+ });
1225
+ ```
1226
+
1227
+ - Updated dependencies [957b739]
1228
+ - Updated dependencies [9bd5ab5]
1229
+ - @ai-sdk/provider-utils@3.0.0-canary.14
1230
+ - @ai-sdk/provider@2.0.0-canary.13
1231
+
1232
+ ## 5.0.0-canary.16
1233
+
1234
+ ### Major Changes
1235
+
1236
+ - ec78cdc: chore (ai): remove "data" UIMessage role
1237
+ - 8b86e99: chore (ai): replace `Message` with `UIMessage`
1238
+ - 2524fc7: chore (ai): remove ui message toolInvocations property
1239
+ - 175b868: chore (ai): rename reasoning UI parts 'reasoning' property to 'text'
1240
+
1241
+ ### Patch Changes
1242
+
1243
+ - 9b4d074: feat(streamObject): add enum support
1244
+ - 28ad69e: fix(react-native): support experimental_attachments without FileList global
1245
+ - ec5933d: chore (ai/mcp): add `assertCapability` method to experimental MCP client
1246
+
1247
+ ## 5.0.0-canary.15
1248
+
1249
+ ### Major Changes
1250
+
1251
+ - 4bfe9ec: chore (ai): remove ui message reasoning property
1252
+ - 2877a74: chore (ai): remove ui message data property
1253
+
1254
+ ### Patch Changes
1255
+
1256
+ - d9209ca: fix (image-model): `specificationVersion: v1` -> `v2`
1257
+ - ea27cc6: chore (ai): use JSONValue definition from provider
1258
+ - 0ff02bb: chore(provider-utils): move over jsonSchema
1259
+ - Updated dependencies [7b3ae3f]
1260
+ - Updated dependencies [0ff02bb]
1261
+ - @ai-sdk/provider@2.0.0-canary.12
1262
+ - @ai-sdk/provider-utils@3.0.0-canary.13
1263
+
1264
+ ## 5.0.0-canary.14
1265
+
1266
+ ### Patch Changes
1267
+
1268
+ - 9bf7291: chore(providers/openai): enable structuredOutputs by default & switch to provider option
1269
+ - 4617fab: chore(embedding-models): remove remaining settings
1270
+ - a76a62b: feat (ai): add experimental prepareStep callback to generateText
1271
+ - Updated dependencies [9bf7291]
1272
+ - Updated dependencies [4617fab]
1273
+ - Updated dependencies [e030615]
1274
+ - @ai-sdk/provider@2.0.0-canary.11
1275
+ - @ai-sdk/provider-utils@3.0.0-canary.12
1276
+
1277
+ ## 5.0.0-canary.13
1278
+
1279
+ ### Patch Changes
1280
+
1281
+ - 14cb3be: chore(providers/llamaindex): extract to separate package
1282
+ - 66962ed: fix(packages): export node10 compatible types
1283
+ - 9301f86: refactor (image-model): rename `ImageModelV1` to `ImageModelV2`
1284
+ - Updated dependencies [66962ed]
1285
+ - Updated dependencies [9301f86]
1286
+ - Updated dependencies [a3f768e]
1287
+ - @ai-sdk/provider-utils@3.0.0-canary.11
1288
+ - @ai-sdk/provider@2.0.0-canary.10
1289
+
1290
+ ## 5.0.0-canary.12
1291
+
1292
+ ### Patch Changes
1293
+
1294
+ - Updated dependencies [e86be6f]
1295
+ - @ai-sdk/provider@2.0.0-canary.9
1296
+ - @ai-sdk/provider-utils@3.0.0-canary.10
1297
+
1298
+ ## 5.0.0-canary.11
1299
+
1300
+ ### Patch Changes
1301
+
1302
+ - 8e64e9c: feat (ai): allow using provider default temperature by specifying null
1303
+ - Updated dependencies [95857aa]
1304
+ - Updated dependencies [7ea4132]
1305
+ - @ai-sdk/provider@2.0.0-canary.8
1306
+ - @ai-sdk/provider-utils@3.0.0-canary.9
1307
+
1308
+ ## 5.0.0-canary.10
1309
+
1310
+ ### Patch Changes
1311
+
1312
+ - d8aeaef: feat(providers/fal): add transcribe
1313
+ - 3e10408: fix(utils/detect-mimetype): add support for detecting id3 tags
1314
+
3
1315
  ## 5.0.0-canary.9
4
1316
 
5
1317
  ### Major Changes