Vercel has released updates to its AI SDK, with version 7.0.94 of the ai package. This release includes new features for batch processing, fixes for tool choice enforcement, and improvements to how image results are handled, particularly concerning retries.
Key Points
- The AI SDK version 7.0.94 now supports specifying models on a per-request basis within batch operations.
- Tool choices are now enforced when using the
streamTextfunction in the AI SDK. - The SDK will retry unclassified empty image results.
- Retry-attempt accounting is preserved during the retry process for image results.
- A provider-independent classification system for result retryability has been added.
- Prompt blocks from Google and Google Vertex are now marked as terminal.
Context
According to the Vercel AI SDK Changelog, these changes are part of a broader update across several packages, including @ai-sdk/provider@4.0.11, @ai-sdk/gateway@4.0.76, @ai-sdk/provider-utils@5.0.37, @ai-sdk/alibaba@2.0.42, and @ai-sdk/amazon-bedrock@5.0.77. The updates aim to refine the SDK's capabilities in handling diverse AI model interactions and ensuring more robust behavior, particularly with streaming and image-based outputs.
Why It Matters
These updates enhance the flexibility and reliability of applications built with the Vercel AI SDK. Developers can now manage models more granularly in batch requests and expect more consistent behavior when using tools with streaming text. The improved retry mechanisms for image results and terminal marking for Google and Google Vertex prompt blocks contribute to more stable and predictable application performance.
What To Do
- Note the updated dependency versions for
@ai-sdk/provider,@ai-sdk/gateway, and@ai-sdk/provider-utilsif integrating with these packages. - Test batch operations with per-request model specifications to leverage the new flexibility.
- Verify
streamTextimplementations that use tool choices to ensure the new enforcement aligns with expected behavior. - Observe how the SDK handles unclassified empty image results and prompt blocks from Google and Google Vertex in existing applications.
Keep Exploring
/techniques/output-schema /techniques/system-user-separation
