# @ai-sdk/xai@5.0.52

Category: agent-infrastructure
Published: 2026-11-26T04:40:58Z
Source: [Vercel AI SDK releases](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fxai%405.0.52)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-11-27T22:17:53.083Z
Tags: vercel, ai-sdk, typescript

## Human Summary
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.

## Agent 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.

## Body
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.

## Recommended actions
- 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.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.