fix(deps): update dependency ai to v5 #351
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.0.25->^5.0.0Release Notes
vercel/ai (ai)
v5.0.76Compare Source
Patch Changes
87b03d5: feat(ui): add isDataUIPart helperv5.0.75Compare Source
Patch Changes
76678cd]v5.0.74Compare Source
Patch Changes
11a8867]v5.0.73Compare Source
Patch Changes
734c4c3: fix(ai): add missing export forLoadSettingErrorv5.0.72Compare Source
Patch Changes
1b94257: fix(ui): do not submit automatically when server return with errorv5.0.71Compare Source
Patch Changes
bc90c3c: feat(ai): add pruneMessages helper functionv5.0.70Compare Source
Patch Changes
f6a9bf3]v5.0.69Compare Source
Patch Changes
1bacc1f: fix(ai): handle backpressure inwriteToServerResponsev5.0.68Compare Source
Patch Changes
17f9872]v5.0.67Compare Source
Patch Changes
227ca94]v5.0.66Compare Source
Patch Changes
ec5a0a0]v5.0.65Compare Source
Patch Changes
638a561]v5.0.64Compare Source
Patch Changes
e33947b: fix(ai): mcp errors to be jsonrpc 2.0 compliantv5.0.63Compare Source
Patch Changes
22609f8: fix(ai): only parse experimental_output in generateText when finishReason is stopb552c94: fix(core): Fix image download behavior when the initial model is swapped out during prepareStepv5.0.62Compare Source
Patch Changes
6f0644c: chore: use import * from zod/v46f0644c: chore: load zod schemas lazily6f0644c]6f0644c]v5.0.61Compare Source
Patch Changes
143f65b]v5.0.60Compare Source
Patch Changes
cffad55]v5.0.59Compare Source
Patch Changes
bcdba23]v5.0.58Compare Source
Patch Changes
b92e1cd]v5.0.57Compare Source
Patch Changes
c319849: fixed docs and exported NoSpeechGeneratedErrorv5.0.56Compare Source
Patch Changes
b1d8458: fix(ai): align logic of text-end with reasoning-endv5.0.55Compare Source
Patch Changes
85da29e: fix(ai): remove outdated jsdoc param descriptionsv5.0.54Compare Source
Patch Changes
bc5ed71: chore: update zod peer depenedency versionbc5ed71]v5.0.53Compare Source
Patch Changes
d335191: Extend addToolResult to support error resultsv5.0.52Compare Source
Patch Changes
c56822d: fix(ai): updateuiMessageChunkSchemato satisfy theUIMessageChunktype930399b: fix(ai): download files when intermediate file cannot be downloaded7ca78f1]v5.0.51Compare Source
Patch Changes
27645bb: ExportparseJsonEventStreamanduiMessageChunkSchemafrom "ai" package322901b]v5.0.50Compare Source
Patch Changes
c5f403a]v5.0.49Compare Source
Patch Changes
e304478]v5.0.48Compare Source
Patch Changes
4d3ff64]v5.0.47Compare Source
Patch Changes
c86e0f7]6bbae01]v5.0.46Compare Source
Patch Changes
c580fbd: Add safeValidateUIMessages utility to validate UI messages without throwing, returning a success/failure result object like Zod’s safeParsev5.0.45Compare Source
Patch Changes
76024fc: fix(ai): fix static tool call and result detection when dynamic is undefined93d8b60: fix(ai): do not filter zero-length text parts that have provider optionsd8eb31f: fix(ai): fix webp image detection from base64v5.0.44Compare Source
Patch Changes
f49f924]v5.0.43Compare Source
Patch Changes
0294b58: feat(ai): setai,@ai-sdk/provider-utils, and runtime inuser-agentheader0294b58]v5.0.42Compare Source
Patch Changes
de5c066: fix(ai): forwarded providerExecuted flag in validateUIMessagesv5.0.41Compare Source
Patch Changes
cd91e4b: fix(ai): use correct type for reasoning outputsv5.0.40Compare Source
Patch Changes
4ee3719]v5.0.39Compare Source
Patch Changes
a0a725f: feat (ai): export createGatewayv5.0.38Compare Source
Patch Changes
350a328]v5.0.37Compare Source
Patch Changes
d6785d7: feat (ai): add tool and agent helpersv5.0.36Compare Source
Patch Changes
ccc2ded: feat (ai): export gateway providerv5.0.35Compare Source
Patch Changes
99c946a: export missing typev5.0.34Compare Source
Patch Changes
034287f]dee1afe]v5.0.33Compare Source
Patch Changes
5d59a8c]v5.0.32Compare Source
Patch Changes
b6005cd]v5.0.31Compare Source
Patch Changes
99964ed]v5.0.30Compare Source
Patch Changes
7fcc6be: feat(ai): throw InvalidArgumentError when messages is not providedv5.0.29Compare Source
Patch Changes
e0e9449: feat(ui): sent isAbort, isDisconnect, isError in useChat onFinish callbackv5.0.28Compare Source
Patch Changes
4b81e7d: fix(ai): remove vitest dependency from test exportsd68a4f2: feat(ai): log warningsv5.0.27Compare Source
Patch Changes
ca40fac: feat(ai): support custom download functions (experimental)v5.0.26Compare Source
Patch Changes
33cf848: feat(ai): pass messages touseChat({ onFinish })980633d]1c5b88d]v5.0.25Compare Source
Patch Changes
ca65923: fix(ai): remove use ofexpect()from production code886e7cd]v5.0.24Compare Source
Patch Changes
f8f3682: fix: call onFinish when stream is cancelled in toUIMessageStreamPreviously, onFinish was only called on normal stream completion. Now it's also called when the reader is cancelled (e.g., browser close, navigation), ensuring partial messages are persisted.
Updated dependencies [
1b5a3d3]Updated dependencies [
c9994f9]v5.0.23Compare Source
Patch Changes
5099b3d: fix(ai): makechat.addToolResult()compatible with dynamic tool calls7a2bf8d: fix(ai): support loop breaking behavior in async iterable stream50e2029]b8478f0]v5.0.22Compare Source
Patch Changes
926259f]c000f96]v5.0.21Compare Source
Patch Changes
581abea: fix(ai): call abort callback when stream is aborted during tool execution3c178ec: feat(ai): improved type checking for prompt/messages input0857788]v5.0.20Compare Source
Patch Changes
8a87693: fix(ai) Make sure warnings promise in streamObject is resolved and properly collects and passes warningsv5.0.19Compare Source
Patch Changes
8da6e9c: fix(ai): use parsed tool input if possible when validation failsv5.0.18Compare Source
Patch Changes
8b96f99]v5.0.17Compare Source
Patch Changes
4176ecb: feat(ai): add reasoning text to generateObject result20f23f9: feat(ai): export LanguageModelMiddleware typev5.0.16Compare Source
Patch Changes
68751f9]v5.0.15Compare Source
Patch Changes
ca4f68f: feat(ai): add validateUIMessages function28a4006]v5.0.14Compare Source
Patch Changes
7729e32: fix(ai): expand mp3 detection to support all mpeg frame headersv5.0.13Compare Source
Patch Changes
a7b2e66: Added providerOptions to agent stream and generate calls9bed210:extractReasoningMiddleware(): delay sendingtext-startchunk to prevent rendering final text before reasoningWhen wrapping a text stream in
extractReasoningMiddleware(), delay queing thetext-startchunk until eitherreasoning-startchunk was queued or the firsttext-deltachunk is about to be queued, whichever comes first.#8036
v5.0.12Compare Source
Patch Changes
eefa730]034e229]f25040d]v5.0.11Compare Source
Patch Changes
38ac190: feat(ai): preliminary tool resultse3a63cb: fix(ai): streamText promises reject when stream has errors38ac190]cf7b2ad]v5.0.10Compare Source
Patch Changes
63a5dc5: fix(ai): convert user message text/file part provider metadata in convertToModelMessagesv5.0.9Compare Source
Patch Changes
afd5c2a: fix(ai): preserve filename for file parts in convertToModelMessagesv5.0.8Compare Source
Patch Changes
35f93ce]v5.0.7Compare Source
Patch Changes
8e72304: fix (ai): handle invalid tool callsv5.0.6Compare Source
Patch Changes
d983eee: feat(ai): allow passing model string for embeddingsv5.0.5Compare Source
Patch Changes
893aed6]v5.0.4Compare Source
Patch Changes
444df49]v5.0.3Compare Source
Patch Changes
90d212f: feat (ai): add experimental tool call context028fb9c]90d212f]6331826]v5.0.2Compare Source
Patch Changes
401d73e: fix (ai): support dynamic tool calls in lastAssistantMessageIsCompleteWithToolCalls69fde99: Set status to ready when reconnect stream is nullv5.0.1Compare Source
Patch Changes
4d0c108: fix(ai/ui): convert provider metadata for system messages to model messagesv5.0.0Compare Source
Major Changes
e1cbf8a: chore(@ai-sdk/rsc): extract to separate packagea847c3e: chore: rename reasoning to reasoningText etc13fef90: chore (ai): remove automatic conversion of UI messages to model messagesd964901: - remove setting temperature to0by defaultnulloption fromDefaultSettingsMiddlewaretemperatureandstopSequencesinaito enable middleware changes0a710d8: feat (ui): typed tool parts in ui messages9ad0484: feat (ai): automatic tool execution error handling63f9e9b: chore (provider,ai): tools have input/output instead of args,resultab7ccef: chore (ai): change source ui message parts to source-urld5f588f: AI SDK 5ec78cdc: chore (ai): remove "data" UIMessage role6a83f7d: refactoring (ai): restructure message metadata transferdb345da: chore (ai): remove exports of internal ui functions496bbc1: chore (ui): inline/remove ChatRequest type72d7d72: chore (ai): stable activeTools40acf9b: feat (ui): introduce ChatStore and ChatTransport98f25e5: chore (ui): remove managed chat inputs2d03e19: chore (ai): remove StreamCallbacks.onCompletionda70d79: chore (ai): remove getUIText helperc60f895: chore (ai): remove useChat keepLastMessageOnError0560977: chore (ai): improve consistency of generate text result, stream text result, and step result9477ebb: chore (ui): remove useAssistant hook (breaking change)1f55c21: chore (ai): send reasoning to the client by defaulte7dc6c7: chore (ai): remove onResponse callback8b86e99: chore (ai): replaceMessagewithUIMessage04d5063: chore (ai): rename default provider global to AI_SDK_DEFAULT_PROVIDER319b989: chore (ai): remove content from ui messages14c9410: chore: refactor file towards source pattern (spec)a34eb39: chore (ai): removedataandallowEmptySubmitfromChatRequestOptionsf04fb4a: chore (ai): replace useChat attachments with file ui partsf7e8bf4: chore (ai): flatten ui message stream parts257224b: chore (ai): separate TextStreamChatTransportfd1924b: chore (ai): remove redundantmimeTypeproperty2524fc7: chore (ai): remove ui message toolInvocations property6fba4c7: chore (ai): remove deprecated experimental_providerMetadatab4b4bb2: chore (ui): rename experimental_resume to resumeStream441d042: chore (ui): data stream protocol v2 with SSEsef256ed: chore (ai): refactor and use chatstore in svelte516be5b: ### Move Image Model Settings into generate optionsImage Models no longer have settings. Instead,
maxImagesPerCallcan be passed directly togenerateImage(). All other image settings can be passed toproviderOptions[provider].Before
After
Pull Request: #6180
a662dea: chore (ai): remove sendExtraMessageFieldsd884051: feat (ai): simplify default provider setupe8324c5: feat (ai): add args callbacks to toolsfafc3f2: chore (ai): change file to parts to use urls instead of data1ed0287: chore (ai): stable sendStart/sendFinish optionsc7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStreambfbfc4c: feat (ai): streamText/generateText: totalUsage contains usage for all steps. usage is for a single step.9ae327d: chore (ui): replace chat store concept with chat instances9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to stepCountIs.247ee0c: chore (ai): remove steps from tool invocation ui parts109c0ac: chore (ai): rename id to chatId (in post request, resume request, and useChat)954aa73: feat (ui): extended regenerate support33eb499: feat (ai): inject message id in createUIMessageStream901df02: feat (ui): use UI_MESSAGE generic4892798: chore (ai): always stream tool callsc25cbce: feat (ai): use console.error as default error handler for streamText and streamObjectb33ed7a: chore (ai): rename DataStream_ to UIMessage_ed675de: feat (ai): add ui data parts7bb58d4: chore (ai): restructure prepareRequestea7a7c9: feat (ui): UI message metadata0463011: fix (ai): update source url stream partdcc549b: remove StreamTextResult.mergeIntoDataStream methodrename DataStreamOptions.getErrorMessage to onError
add pipeTextStreamToResponse function
add createTextStreamResponse function
change createDataStreamResponse function to accept a DataStream and not a DataStreamWriter
change pipeDataStreamToResponse function to accept a DataStream and not a DataStreamWriter
change pipeDataStreamToResponse function to have a single parameter
35fc02c: chore (ui): rename RequestOptions to CompletionRequestOptions64f6d64: feat (ai): replace maxSteps with continueUntil (generateText)175b868: chore (ai): rename reasoning UI parts 'reasoning' property to 'text'60e2c56: feat (ai): restructure chat transports765f1cd: chore (ai): remove deprecated useChat isLoading helpercb2b53a: chore (ai): refactor header preparatione244a78: chore (ai): remove StreamData and mergeStreamsd306260: feat (ai): replace maxSteps with continueUntil (streamText)4bfe9ec: chore (ai): remove ui message reasoning property1766ede: chore: rename maxTokens to maxOutputTokens2877a74: chore (ai): remove ui message data property1409e13: chore (ai): remove experimental continueStepsb32e192: chore (ai): rename reasoning to reasoningText, rename reasoningDetails to reasoning (streamText, generateText)92cb0a2: chore (ai): rename CoreMessage to ModelMessage2b637d6: chore (ai): rename UIMessageStreamPart to UIMessageChunkMinor Changes
b7eae2d: feat (core): Add finishReason field to NoObjectGeneratedErrorbcea599: feat (ai): add content to generateText result48d675a: feat (ai): add content to streamText resultc9ad635: feat (ai): add filename to file ui partsPatch Changes
a571d6e: chore(provider-utils): move ToolResultContent to provider-utilsde2d2ab: feat(ai): add provider and provider registry middleware functionalityc22ad54: feat(smooth-stream): chunking callbacksd88455d: feat (ai): expose http chat transport typee7fcc86: feat (ai): introduce dynamic toolsda1e6f0: feat (ui): add generics to ui message stream parts48378b9: fix (ai): send null as tool output when tools return undefined5d1e3ba: chore (ai): remove provider re-exports93d53a1: chore (ai): remove clie90d45d: chore (rsc): move HANGING_STREAM_WARNING_TIME constant into @ai-sdk/rsc packageb32c141: feat (ai): add array support to stopWhenbc3109f: chore (ai): push stream-callbacks into langchain/llamaindex adapters0d9583c: fix (ai): use user-provided media type when available38ae5cc: feat (ai): export InferUIMessageChunk type10b21eb: feat(cli): add ai command line interface9e40cbe: Allow destructuring output and errorText onToolUIParttype6909543: feat (ai): support system parameter in Agent constructor86cfc72: feat (ai): add ignoreIncompleteToolCalls option to convertToModelMessages377bbcf: fix (ui): tool input can be undefined during input-streamingd8aeaef: feat(providers/fal): add transcribeae77a99: chore (ai): rename text and reasoning chunks in streamText fullstream4fef487: feat: support for zod v4 for schema validationAll these methods now accept both a zod v4 and zod v3 schemas for validation:
generateObject()streamObject()generateText()experimental_useObject()from@ai-sdk/reactstreamUI()from@ai-sdk/rscb1e3abd: feat (ai): expose ui message stream headers4f3e637: fix (ui): avoid caching globalThis.fetch in case it is patched by other libraries14cb3be: chore(providers/llamaindex): extract to separate package1f6ce57: feat (ai): infer tool call types in theonToolCallcallback16ccfb2: feat (ai): add readUIMessageStream helper225f087: fix (ai/mcp): prevent mutation of customEnvce1d1f3: feat (ai): export mock image, speech, and transcription modelsfc0380b: feat (ui): resolvable header, body, credentials in http chat transport6622441: feat (ai): add static/dynamic toolCalls/toolResults helpers4048ce3: fix (ai): add tests and examples for openai responses6c42e56: feat (ai): validate ui stream data chunksbedb239: chore (ai): make ui stream parts value optional when it's not required9b4d074: feat(streamObject): add enum supportc8fce91: feat (ai): add experimental Agent abstraction655cf3c: feat (ui): add onFinish to createUIMessageStream3e10408: fix(utils/detect-mimetype): add support for detecting id3 tagsd5ae088: feat (ui): add sendAutomaticallyWhen to Chatced8eee: feat(ai): re-export zodSchema from main packagec040e2f: fix (ui): inject generated response message idd3960e3: selectTelemetryAttributes more robustnessfaea29f: fix (provider/openai): multi-step reasoning with text66af894: fix (ai): respect content order in toResponseMessages332167b: chore (ai): move maxSteps into UseChatOptions6b1c55c: feat (ai): introduce GLOBAL_DEFAULT_PROVIDER5a975a4: feat (ui): update Chat tool result submission507ac1d: fix (ui/react): update messages immediately with the submitted user messagea166433: feat: add transcription with experimental_transcribe26735b5: chore(embedding-model): add v2 interfacec93a8bc: chore(ai): export AsyncIterableStream type from async-iterable-stream module0d2c085: feat (ai): support string model ids through gateway2b9bbcd: feat (ai): improve prompt validation error messagea8c8bd5: feat(embed-many): respect supportsParallelCalls & concurrency75c3396: fix (ai): handle errors in 2nd streamText doStream callcb9c9e4: remove deprecatedexperimental_wrapLanguageModel9bf7291: chore(providers/openai): enable structuredOutputs by default & switch to provider option9b0da33: fix (ai): do not send id with start unless specified28ad69e: fix(react-native): support experimental_attachments without FileList global0b78e17: chore(ai/generateObject): simplify function signature20398f2: feat: ai sdk cli documentation + adjusted default model66962ed: fix(packages): export node10 compatible typesb71fe8d: fix(ai): remove jsondiffpatch dependency7827a49: fix (ai/core): refactortoResponseMessagesto filter out empty string/contentbd8a36c: feat(embedding-model-v2/embedMany): add response body fieldd9209ca: fix (image-model):specificationVersion: v1->v2b346545: feat (ai): add data ui part schemas05d2819: feat: allow zod 4.x as peer dependencyf2b041e: Fix customfetchin HttpChatTransport2a62513: Fix error thrown when emptying messages in onError or onFinish143c55b: feat (ai): export Chat callback types9301f86: refactor (image-model): renameImageModelV1toImageModelV2904fa5e: feat (ai/core): add terminateOnError option to readUIMessageStream0a87932: core (ai): change transcription model mimeType to mediaType1675396: fix: avoid job executor deadlock when adding tool result51f497d: feat (ai): step input message modification in prepareStepcee64b2: fix(otel): change back toolCall attributes of input/output back to args/result for compatibilityf04ffe4: feat (ui): add onData callback to Chatbc24722: feat (ai): Add finishReason as a promise on StreamObjectResult to match StreamTextResultb6f9f3c: remove deprecatedCoreTool*types8aa9e20: feat: add speech with experimental_generateSpeech4617fab: chore(embedding-models): remove remaining settings8255639: ### Fix use with Google APIs + zod v4's.literal()schemaBefore [email protected], requests to Google's APIs failed due to a missing
typein the provided schema. The problem has been resolved for theaiSDK by bumping ourzodpeer dependencies to^3.25.49.pull request: #6609
f81c720: chore(ai): bundle dependencies in CLI binarycf9af6e: feat (ai): allow sync prepareStepee38081: Add support for audio/webm to detect-media-type2e4f9e4: feat (ai): improved error messages when using gateway3e3b9df: fix (ai/mcp): better support for zero-argument MCP toolscda32ba: fix (ai): sendstartpart in correct position in stream (streamText)48a7606: feat (ai): support changing the system prompt in prepareStepscb68df0: feat: add transcription and speech model support to provider registrydb64cbe: fix (provider/openai): multi-step reasoning with tool calls97c35c0: feat (ui): transient data parts26695a3: feat (ui): add state for text and reasoning ui message parts90ac328: fix (ui): tool part metadata support in ui messages60132dd: fixed date formatting for updated mcp protocol version4a1e0c8: fix(ai-cli): fix bundling and improve authentication error handlingc6b64a7: feat (ai): allow async prepareRequest on HttpChatTransportfccf75c: update mcp protocol version9121250: Expose provider metadata as an attribute on exported OTEL spans[
ea27cc6]Configuration
📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.