ai @ai-sdk/xai@5.0.52
- Source
- github.com
- Publisher
- Vercel
- Author
- github-actions[bot]
- Date

Context
Version 5.0.52 of @ai-sdk/xai, the package that connects the AI SDK to xAI's models, fixes streamed responses that failed at the very end when a generated several large images (release notes). The SDK reads a streamed response as a series of events and capped each event at 64 MiB by default. Models on the Responses used by OpenAI and xAI finish a stream with a `response.completed` event that repeats every output item, including generated images encoded as base64 text, so a response with several large images produced a final event over the cap and failed after every image had already been delivered. The fix adds a `maxEventSize` option to the shared `createEventSourceResponseHandler`, and the OpenAI and xAI Responses models now use it to accept events of up to 512 MiB.






