AI SDK 7.0.174 validates deeply nested UI-message metadata in one pass before it can exhaust a worker
Vercel released AI SDK 7.0.174 on November 17. validateUIMessages, safeValidateUIMessages, and agent UI helpers no longer apply a recursive union schema to deeply nested provider, tool, and citation metadata. The new path traverses once and avoids copying input except when removing __proto__, preventing repeated memory amplification that could exhaust a worker before any model call. The same fix was backported to 6.0.333 and 5.0.291. Versions 7.0.175 and 7.0.176 only update gateway dependencies, so they are folded into this release window rather than treated as separate events.
Why it matters
The generative-UI attack surface starts before inference: clients can submit histories containing nested tool results, provider data, and citations. A validator that recursively copies the structure for every union branch can make a large valid message or hostile nesting consume memory first. One-pass validation bounds this particular amplification, while still leaving byte and depth budgets to the host.
A closer look
Version 7.0.174 also adds output support to startBatch and getBatchResults, gives transform factories an empty tools array instead of undefined, and fixes locked streams when a telemetry subscriber or integration replaces a stream while metadata requires credential redaction. It adds extraction-model support and normalizes empty extraction results. The UI-message change traverses metadata once and only copies when stripping __proto__, eliminating repeated whole-input work across recursive union alternatives. The 5.x and 6.x maintenance lines receive the same backport for hosts that cannot yet move to 7.x.
Who this is for
Frontend, server-platform, and security teams using AI SDK UIMessage validation, agent UI helpers, tool metadata, batch APIs, or telemetry streams.
Original sources
- Vercel AI SDK official 7.0.174 release ↗github.com
- AI SDK 5.0.291 backport release ↗github.com
- AI SDK 6.0.333 backport release ↗github.com
- AI SDK 7.0.175 dependency-only follow-up ↗github.com
- AI SDK 7.0.176 dependency-only follow-up ↗github.com
Revisions & corrections (1)
— Official release and maintenance-line backports document a concrete pre-inference memory/CPU amplification fix in UI-message validation; dependency-only follow-ups are merged into the same version window.