chore(deps): update dependency @ai-sdk/provider-utils to v5#55
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency @ai-sdk/provider-utils to v5#55renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/ai-sdk-provider-utils-5.x
branch
4 times, most recently
from
July 2, 2026 23:02
508fdca to
ebbf4db
Compare
renovate
Bot
force-pushed
the
renovate/ai-sdk-provider-utils-5.x
branch
5 times, most recently
from
July 14, 2026 21:00
46e57c4 to
20d65b9
Compare
renovate
Bot
force-pushed
the
renovate/ai-sdk-provider-utils-5.x
branch
from
July 17, 2026 15:00
20d65b9 to
9617f58
Compare
renovate
Bot
force-pushed
the
renovate/ai-sdk-provider-utils-5.x
branch
from
July 21, 2026 17:10
9617f58 to
6efc694
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.38→5.0.12Release Notes
vercel/ai (@ai-sdk/provider-utils)
v5.0.12Compare Source
Patch Changes
02ffdcb: fix(provider-utils): bound media-type sniffing decode for ID3-prefixed inputMedia-type detection stripped ID3 tags before the ~18-byte prefix cap, decoding the entire base64 attachment (plus a full-size copy) whenever the data began with
ID3/SUQz. This turned the intended O(1) sniff into an O(N) decode of the whole attachment. Detection now decodes at most a bounded prefix and skips the ID3 tag within that bound, keeping cost O(1) in input size on all paths (image, audio, and combined).76cb673: fix: detect MP4 audio from its ftyp box during transcriptionv5.0.11Compare Source
Patch Changes
cd06458: fix(ai): callonInputStartbeforeonInputAvailableduring non-streaming tool callsv5.0.10Compare Source
Patch Changes
31c7be8: Accept callable Standard Schema validators that do not provide JSON Schema conversion.v5.0.9Compare Source
Patch Changes
4be62c1: fix(provider-utils): validate provider-response URLs ingetFromApigetFromApinow has avalidateUrlflag. It is optional so existing callers keep compiling (omitting it behaves likefalse, i.e. no validation), but all AI SDK provider packages set it explicitly at every call site so each one makes a visible trust decision. Whentrue, the URL is routed throughfetchWithValidatedRedirects— the same guard used bydownloadBlob— which rejects private/loopback/link-local targets, re-validates every redirect hop, strips proxy/metadata/cookie request headers, and drops all caller headers except the user-agent on cross-origin redirects (custom API-key headers must not follow a redirect off-origin any more thanAuthorizationmay); blocked URLs throwDownloadError. It is enabled at the image/video/audio download and polling call sites where the URL comes from a provider response body; URLs built from developer-configured endpoints passvalidateUrl: falseand are unaffected.A new optional
credentialedOriginwithholds caller headers unless the URL is same-origin with it, so the API key is not sent to a response-supplied host on a different origin.A new optional
trustedOriginexempts URLs (and redirect hops) that are same-origin with the developer-configured provider endpoint from target validation, so self-hosted and localhost deployments whose response URLs point back at the configured host keep working; all other hops are still validated.Also closes range gaps in
validateDownloadUrl(IPv4224.0.0.0/4multicast and the TEST-NET documentation ranges192.0.2.0/24,198.51.100.0/24,203.0.113.0/24; IPv6 documentation ranges2001:db8::/32and3fff::/20), and follows only the fetch-spec redirect status codes (301/302/303/307/308) — aLocationheader on any other status is not followed. This guard performs string/literal checks only and does not resolve DNS; hostnames that resolve to private addresses and DNS rebinding remain out of scope and must be constrained at the network layer (or by injecting a Nodefetchthat pins the resolved IP at connect time) for server deployments handling untrusted URLs. Seecontributing/secure-url-handling.md.7805e4a: Add experimental transcription-stream WebSocket envelope (standard doStream-over-WebSocket serialization): frame type constants,experimental_parseTranscriptionStreamClientFrame,experimental_serializeTranscriptionStreamPart, andexperimental_parseTranscriptionStreamPart(all APIs are exported with experimental prefixes).serializeTranscriptionStreamPartreturnsundefinedfor payloads that are not JSON-serializable (callers drop the frame) and serializes cross-realmErrorpayloads by brand check.cd12954: Reject empty OpenAI, Anthropic, and Replicate base URLs with a helpful AI SDKinvalid argument error.
v5.0.7Compare Source
Patch Changes
0f93c57]v5.0.6Compare Source
Patch Changes
ac306ed: FixStreamingToolCallTrackerfinalizing 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.v5.0.5Compare Source
Patch Changes
5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAIgpt-realtime-whisperand xAI WebSocket STT.5c5c0f5]v5.0.4Compare Source
Patch Changes
c6f5e62: Prevent prototype pollution when synchronously parsing provider JSON inputs and exposesecureJsonParsefrom provider-utils.v5.0.3Compare Source
Patch Changes
8c616f0: feat(mcp): add maxRetries option for failed mcp tool callsv5.0.2Compare Source
Patch Changes
0274f34]v5.0.1Compare Source
Patch Changes
6a436e3: Limit JSON response body reads in response handlers to prevent unbounded memory use.v5.0.0Compare Source
Major Changes
986c6fd: feat(ai): change type of experimental_context from unknown to genericb0c2869: chore(ai): remove deprecatedmediatype part fromToolResultOutputf7d4f01: feat(provider): add support forreasoning-filetype for files that are part of reasoning776b617: feat(provider): adding new 'custom' content typeef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers usingrequire()must switch to ESMimportsyntax.493295c: Remove the deprecatedToolCallOptionsexport.Use
ToolExecutionOptionsinstead.c29a26f: feat(provider): add support for provider references and uploading files as supported per provider3887c70: feat(provider): add new top-level reasoning parameter to spec and support it ingenerateTextandstreamText61753c3: ###@ai-sdk/openai: remove redundantnameargument fromopenai.tools.customTool()openai.tools.customTool()no longer accepts anamefield. the tool name is now derived from the sdk tool key (the object key in thetoolsobject).migration: remove the
nameproperty fromcustomTool()calls. the object key is now used as the tool name sent to the openai api.before:
after:
@ai-sdk/provider-utils:createToolNameMapping()no longer accepts theresolveProviderToolNameparameterbefore: tool name can be set dynamically
after: tool name is static based on
toolskeys7e26e81: chore: rename experimental_context to context8359612: Start v7 pre-release5463d0d: feat(provider): align tool result output content file part types with top-level message file part typesPatch Changes
2427d88: feat(ai): change Tool.sensitiveContext to telemetry.includeToolsContext and make it opt-in785fe16: feat: distinguish provider-defined and provider-executed toolsee798eb: chore(provider-utils): renameExperimental_SandboxtoExperimental_SandboxSession531251e: fix(security): validate redirect targets in download functions to prevent SSRF bypassBoth
downloadBlobanddownloadnow validate the final URL after following HTTP redirects, preventing attackers from bypassing SSRF protections via open redirects to internal/private addresses.67df0a0: feat: add sensitiveContext property to Tool105f95b: Ensure the default empty tool input schema includestype: "object"for OpenAI-compatible providers that require object schemas.eea8d98: refactoring: rename tool execution eventsd848405: feat: add optionalabortSignalparameters to sandbox command execution46d1149: chore(provider-utils,google): fix grammar errors in error and warning messages1f509d4: fix(ai): force template check on 'kind' paramca446f8: feat: flexible tool descriptions3ae1786: fix: better context type inferencea7de9c9: fix: make sandbox experimental9f0e36c: trigger release for all packages after provenance setupbefb78c: refactoring: remove real-time delays in unit testsf634bac: feat(mcp): add new McpProviderMetadata type2e17091: fix(types): move shared tool set utility types into provider-utilsMoved
ToolSet,InferToolSetContext, andUnionToIntersectioninto@ai-sdk/provider-utilsand updatedaiinternals to import them directly from there. This keeps the shared tool typing utilities colocated with the core tool type definitions.ca39020: Add an optionalworkingDirectoryparameter to sandbox command execution.0458559: fix: deprecate needsApproval on Tool5852c0a: refactoring(provider-utils): add controller as property to StreamingToolCallTracker2e98477: fix: retain stack traces on async errorsadd1126: refactoring: executeTool uses tool as parameteraeda373: fix: only send provider credentials to same-origin response-supplied URLsSeveral provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as
polling_url,urls.get,result_url,result.sample, orvideo.uri) and reused the authenticated headers — or appended?key=<API_KEY>— on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.A new
isSameOriginhelper is added to@ai-sdk/provider-utils, and the affected fetches in@ai-sdk/black-forest-labs,@ai-sdk/fireworks,@ai-sdk/replicate,@ai-sdk/gladia,@ai-sdk/fal, and@ai-sdk/googlenow attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.350ea38: refactoring: introduce Arrayable type7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.f807e45: Extract sharedStreamingToolCallTrackerclass into@ai-sdk/provider-utilsto deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missinggenerateId()fallback fortoolCallIdin Alibaba'sdoGeneratepath and ensures all providers finalize unfinished tool calls during stream flush.08d2129: feat(mcp): propagate the server name through dynamic tool parts0c4c275: trigger initial canary release6fd51c0: fix(provider): preserve error type prefix in getErrorMessage69254e0: feat(ai): add toolMetadata for tool specific metdata6c93e36: feat(provider-utils): addspawnCommandmethod toExperimental_Sandboxto allow for detached command execution9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type258c093: chore: ensure consistent import handling and avoid import duplicates or cycles375fdd7: fix: harden download URL SSRF guard against hostname and redirect bypassesvalidateDownloadUrland the file download helpers (downloadBlob,download) could be bypassed in several ways when handling untrusted URLs:localhost.,myhost.local.) skipped the localhost/.localblocklist.::127.0.0.1), IPv4-translated (::ffff:0:127.0.0.1), and NAT64 (64:ff9b::127.0.0.1, including the64:ff9b:1::/48local-use prefix) — were not decoded and checked against the private IPv4 ranges.fetchhad already followed them, so the request to a redirect target (e.g. an internal/metadata address) had already been issued before the check ran.100.64.0.0/10, used by some cloud providers for internal traffic), benchmarking (198.18.0.0/15), IETF protocol assignments (192.0.0.0/24), the reserved240.0.0.0/4block (including the255.255.255.255broadcast address), and IPv6 site-local (fec0::/10) and multicast (ff00::/8).The validator now strips trailing dots before the hostname checks and fully expands IPv6 addresses to detect embedded private IPv4 targets. The download helpers now follow redirects manually (
redirect: 'manual'), re-validating each hop before requesting it, so an unsafe redirect target is never fetched. When a redirect cannot be inspected because the runtime returns an opaque response, the helpers fail closed (reject the redirect) on the server; only in a real browser — where SSRF is not reachable (fetch is constrained by CORS and cannot reach a server's internal network or cloud-metadata endpoints) — is the redirect followed natively so legitimate redirected downloads keep working.b6783da: refactoring: restructure Tool types3015fc3: feat: sandbox shell execution abstractionb8396f0: trigger initial beta releasedaf6637: feat(provider-utils): addenvoption tospawnandrunmethods ofExperimental_SandboxSessiona6617c5: feat(provider-utils): addreadFileandwriteFileplus convenience wrappers toExperimental_Sandboxabstraction28dfa06: fix: support tools with optional context083947b: feat(ai): separate toolsContext from contextbae5e2b: fix(security): re-validate tool approvals from client message history before executionThe approval-replay path in
generateText/streamText(andWorkflowAgent.stream) reconstructed approved tool calls from the client-supplied messages array and executed them without re-validating input against the tool's schema or re-applying the approval policy. A client could forge an assistant message with a pre-approved tool-call part and have the server execute a tool with attacker-chosen arguments.The replay path now validates HMAC signature (when
experimental_toolApprovalSecretis configured), re-validates tool-call input against the tool's input schema, and re-resolves the approval policy before execution.f617ac2: feat(provider-utils): narrowtool()return type toExecutableTool<...>whenexecuteis provided90e2d8a: chore: fix unused vars not being flagged by our lint toolingb4507d5: fix(provider-utils): cancel response body on download rejection to prevent socket leakWhen a download was rejected early — because the
Content-Lengthheader exceeded the size limit, the response status was not ok, or a redirect resolved to a blocked URL — the fetch response body was left unconsumed and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP socket open instead of returning it to the connection pool, allowing an attacker-controlled origin to exhaust file descriptors and cause a denial of service. The body is now cancelled on all early-rejection paths inreadResponseWithSizeLimit,download, anddownloadBlob, andfetchWithValidatedRedirectscancels each redirect hop's body before following or rejecting the next hop.e93fa91: rename Sandbox.executeCommand to Sandbox.runCommandfc92055: feat(ai): automatic tool approvalb3976a2: Add workflow serialization support to all provider models.@ai-sdk/provider-utils: NewserializeModel()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.All providers:
headersis now optional in provider config types. This is non-breaking — existing code that passesheaderscontinues to work. Custom provider implementations that construct model configs manually can now omitheaders, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.All provider model classes now include
WORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEstatic methods, enabling them to cross workflow step boundaries without serialization errors.ff5eba1: feat: rollimage-*tool output types into their equivalentfile-*typesv4.0.40Compare Source
Patch Changes
19093fd: fix(ai): callonInputStartbeforeonInputAvailableduring non-streaming tool callsv4.0.39Compare Source
Patch Changes
06fb54c: Accept callable Standard Schema validators that do not provide JSON Schema conversion.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.