Vercel AI SDK Update: @ai-sdk/xai 4.0.58 — Batch Processing and Image Generation Improvements

Vercel AI SDK xAI provider 4.0.58 adds batch image generation and fixes DeepSeek reasoning stream interruptions.
Vercel AI SDK released `@ai-sdk/xai@4.0.58` with three core changes: support for image generation tasks in batch requests, a fix for missing type validation on unsupported batch request types, and a fix for DeepSeek reasoning models losing their reasoning stream when encountering empty tool-call deltas. The underlying `@ai-sdk/provider` and `@ai-sdk/provider-utils` dependencies were also updated in sync. This backward-compatible patch is recommended for projects using the xAI provider, DeepSeek streaming inference, or batch image generation — with a reminder to update associated dependencies to avoid version mismatches.
Vercel's AI SDK recently released version @ai-sdk/xai@4.0.58. As an open-source toolkit focused on building AI applications, the AI SDK has accumulated over 26.7k stars and 5.1k forks on GitHub, making it one of the more widely adopted AI integration solutions in the TypeScript/JavaScript ecosystem. While this patch release bumps only a minor version number, it covers several practical improvements across batch processing, image generation, and reasoning stream handling.
Core Changes in This Release
According to the official Patch Changes, 4.0.58 includes three key updates:
- Reject unsupported batch request types (
fix: reject unsupported batch request types): Fixes a missing type validation issue in batch requests, preventing unsupported request types from being submitted to the API and reducing runtime errors. - Support image generation requests in batches (
feat: support image generation requests in batches): The only new feature in this release — developers can now include image generation tasks within a single batch call, improving flexibility for multi-task parallel processing scenarios. - Fix DeepSeek reasoning stream issue (
fix(deepseek): preserve reasoning streams across empty tool-call deltas): Ensures that DeepSeek's reasoning streams are not interrupted or lost when encountering empty tool-call delta data, improving the streaming reasoning experience when tool calls are involved.

Dependency Updates
Alongside this release, several underlying dependency packages have been updated in sync, including @ai-sdk/provider@4.0.14 and @ai-sdk/provider-utils@5.0.40. These provider-layer packages are the core abstraction layer for different model providers (such as xAI, DeepSeek, etc.) in the AI SDK. Version alignment ensures that new features and fixes remain consistent across the entire SDK ecosystem. For projects using multiple providers simultaneously, keeping these dependencies in sync helps avoid compatibility issues caused by version mismatches.
What This Means for Developers
This update reflects the AI SDK's continued effort to refine its batch processing capabilities. Batch APIs are typically used in cost-sensitive or throughput-prioritized scenarios — such as bulk content generation and offline data annotation — where they can significantly reduce per-unit costs compared to individual real-time calls. Adding image generation to batch support signals the growing demand for multimodal capabilities in real-world applications.
The fix to DeepSeek's reasoning stream is also noteworthy. As models with explicit reasoning capabilities (reasoning models) become increasingly common, reliably preserving the reasoning process in streaming output is an important detail that SDK-level tooling must handle carefully. Empty tool-call deltas causing reasoning stream interruptions is a classic edge case for this type of model in tool-calling scenarios, and this fix directly addresses that pain point.
Upgrade Recommendations
As a patch release, 4.0.58 is a backward-compatible update with no breaking changes. If your project uses the xAI provider, DeepSeek model streaming inference, or has batch image generation requirements, upgrading is recommended to benefit from these fixes and the new feature. When upgrading, make sure to also update the associated @ai-sdk/provider and @ai-sdk/provider-utils dependencies to ensure overall consistency.
For most users, minor patch releases like this may seem unremarkable — but they reflect the engineering rhythm of a mature open-source project: frequent, focused incremental updates that continuously polish edge cases and emerging requirements. This is one of the reasons the AI SDK remains competitive in a rapidly evolving AI ecosystem.
Related articles

Vercel AI SDK Releases Vue 3.0.282 Patch Update
Vercel AI SDK releases @ai-sdk/vue@3.0.282 patch update, syncing with core package ai@6.0.282. Learn about the changes, release cadence, and upgrade recommendations.

Vercel AI SDK Sandbox Component Receives Patch Update
Vercel AI SDK releases sandbox-vercel@1.0.109 patch update, syncing the harness dependency to the same version. A look at this maintenance release and what it means for AI app developers.

Vercel AI SDK Vue 4.0.99 Released: Dependency Update Overview
The @ai-sdk/vue 4.0.99 patch release syncs the underlying ai@7.0.99 dependency. Learn what this means for Vue developers building AI apps with Vercel AI SDK.