AI SDK now caps one streamed event at 64 MiB; OpenAI and xAI Responses get 512 MiB
@ai-sdk/provider-utils now fails a streamed event over 64 MiB with a ParseError. OpenAI, Azure and xAI Responses streams allow 512 MiB.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. Your keys stay in this tab. They are never sent to Wirestack or saved; we only count that the panel was used.
- Vercel AI Gateway keyAI_GATEWAY_API_KEYGet key
Pick your team, then click Create API Key and copy the key
What changed
On November 25, 2026 the AI SDK started limiting a single server-sent event to 64 MiB (64 * 1024 * 1024 characters):
- The limit lives in
@ai-sdk/provider-utils(5.0.84 forai7), because all providers share its stream parsing. Before, an event that never ended kept growing until the process ran out of memory. - A stream over the limit now fails with a
ParseErrorof typemax-buffer-size-exceeded.
The new limit broke OpenAI Responses turns that make several large images, because response.completed repeats every output item, base64 images included. A follow-up shipped on November 26 (ai 7.0.183, @ai-sdk/openai 4.0.125, @ai-sdk/xai 5.0.52):
- OpenAI and xAI Responses models stream with a 512 MiB event limit. Azure uses the same Responses model, so it gets 512 MiB too.
- Chat and completion streams, and every other provider, keep 64 MiB.
What to do
If you generate several large images in one OpenAI or xAI Responses turn, upgrade to ai 7.0.183 and the matching provider packages; on 7.0.182 those turns can fail with the buffer error. Elsewhere, treat max-buffer-size-exceeded as a failed stream rather than retrying blindly. Gateway users keep their key in AI_GATEWAY_API_KEY.
Source
Affected by this? Start from a checked Vercel AI SDK integration
Code with pinned versions, checked against the official docs on a schedule.
