Vercel AI SDK 6.0.333 trims UI message validation memory
The @ai-sdk/[email protected] version release carries an [email protected] patch that changes message validation, gateway error mapping and Vertex tool result downloads.
On 17 Nov, the Vercel AI SDK published @ai-sdk/[email protected], a version-packages release generated by the Changesets release action (pull request #25070). The tag is a routine bump, but the Vercel AI SDK 6.0.333 changes it carries touch three things app builders deal with: how UI messages are validated, how AI Gateway access policy failures are reported, and how Google Vertex tool result downloads are fetched and capped. The release notes list the detail.
What the release actually contains
The page is titled for the Vue package, but the changelog entries come from [email protected] and the provider packages published alongside it. [email protected] is a patch release, and @ai-sdk/[email protected] appears in the notes as a dependency update to [email protected]. Most of the other provider packages, among them @ai-sdk/[email protected], @ai-sdk/[email protected] and @ai-sdk/[email protected], show only "Updated dependencies" pointing at @ai-sdk/[email protected], so there is no behaviour change to read there. A handful of packages carry real notes.
Message validation gets cheaper
In [email protected], the change referenced as 2771b61 reduces memory and CPU usage when validating UI messages that contain deeply nested provider or tool metadata. validateUIMessages and safeValidateUIMessages, which the agent UI stream helpers also use, previously checked JSON in providerMetadata, callProviderMetadata, resultProviderMetadata and toolMetadata against a recursive union schema that needed several times the memory of the value being validated. The new path validates in a single pass and no longer copies those values, except to remove proto keys.
Gateway denials become their own error
@ai-sdk/[email protected] maps AI Gateway access_policy_denied responses (HTTP 403) to a new GatewayAccessPolicyDeniedError instead of GatewayInternalServerError. Code can tell a policy denial apart from other 403 responses with GatewayAccessPolicyDeniedError.isInstance(error). When the response includes them, the error exposes the denying policy IDs as policyIds, plus removedModels and removedProviders, so you can log which policy blocked a call and which models or providers it took away. The same package also gets a backport that updates the gateway model settings files.
Vertex tool downloads: a 7 MiB default and a pinned transport
@ai-sdk/[email protected] and @ai-sdk/[email protected] limit Google Vertex tool result file downloads through toolResultDownloads.maxBytes, which defaults to 7 MiB. That is well below the previous 2 GiB default for these downloads, so larger files require raising the option. A second Vertex change keeps those downloads on the built-in validated transport and stops using the provider fetch option for them. The notes explain the reason: the built-in transport resolves every hostname through a validating lookup hook and pins the connection to the resolved address on Node.js, while a logging, tracing or proxy wrapper passed as fetch might not validate DNS results, letting tool result URLs whose hostnames resolve to private addresses reach internal hosts. A transport set through toolResultDownloads.fetch must perform equivalent connect-time DNS validation, for example a guarded fetch on Bun or Deno.
Two smaller changes
@ai-sdk/[email protected] adds support for MAI-Image-2.7 and MAI-Image-2.7-Flash with the background option. @ai-sdk/[email protected] fixes additionalTools handling so definitions are sent only for tools registered in the request. The notes say those entries can arrive from replayed, client-supplied conversation history, and that the Responses provider now uses an entry only to select a registered tool and sends the definition derived from that tool.
Limits and open questions
This is a changelog, not a migration guide. The OpenAI entry is cut off mid-word in the published notes, so the full scope of the additionalTools fix is unclear. The notes do not say whether the 7 MiB default will break existing Vertex tool downloads or how to pick a size. Nothing states how many apps rely on the agent UI stream helpers, and no deprecation or removal timeline appears anywhere in the release.
What it means for building apps with AI
If you wire models into an app yourself, the Vertex changes matter most when tools fetch files from URLs, and the gateway error type matters when you show users why a call failed. If you build with Draftship instead, AI features are configured through the AI chat and model options rather than by editing SDK internals, and the relevant docs are at adding AI to your app. Draftship is not affiliated with Vercel.
Primary sources
- @ai-sdk/[email protected]: Version Packages (#25070) · Vercel AI SDK releases, Nov 17, 2026
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.