@ai-sdk/xai@5.0.52
Vercel AI SDK patched @ai-sdk/xai (v5.0.52) to handle stream response events up to 512 MiB, preventing stream failures during large base64 image generation outputs.
Why this signal matters
In release @ai-sdk/xai@5.0.52 , a fix was introduced for handling large response stream events. Previously, streams containing multiple large generated images failed after delivery because the response.completed event repeats all output items, including base64-encoded image results, thereby exceeding the former 64 MiB limit. The createEventSourceResponseHandler now includes a maxEventSize option configured to allow events up to 512 MiB for OpenAI and xAI Responses models. Dependency @ai-sdk/provider-utils was updated to 5.0.85.
Actionable summary
Updated @ai-sdk/xai to 5.0.52 and @ai-sdk/provider-utils to 5.0.85, introducing maxEventSize in createEventSourceResponseHandler set to 512 MiB to avoid stream truncation when response.completed repeats large base64 image data.
- Agent usefulness
- 77/100
- Confidence
- 96%
- Canonical data
- JSON + Markdown
What builders should check
- Upgrade @ai-sdk/xai to version 5.0.52 or later if streaming large payloads or base64-generated images from xAI models.
- Ensure @ai-sdk/provider-utils is updated to version 5.0.85 or later.