Vercel has updated its AI SDK to version ai@7.0.94, as detailed in recent changelog entries. This release includes new features such as support for per-request models within batch operations and a fix to enforce tool choices when using the streamText function. Additionally, the update improves the handling of image results by retrying unclassified empty responses and marking Google and Google Vertex prompt blocks as terminal.
Key Points
- The AI SDK now supports specifying different models for individual requests within a batch operation.
- Tool choices are now enforced when utilizing the
streamTextfunction in the AI SDK. - The SDK will retry unclassified empty image results to improve reliability.
- Retry-attempt accounting is preserved during the retry process for image results.
- A provider-independent classification for result retryability has been added.
- Prompt blocks from Google and Google Vertex are now designated as terminal.
Context
According to the Vercel AI SDK changelog, these updates are part of a broader set of patch changes across various SDK components, 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 changes are managed through a GitHub action that automates the release process to npm.
Why It Matters
These updates enhance the flexibility and robustness of applications built with the Vercel AI SDK. Developers can now manage models more granularly in batch processes and rely on more consistent tool execution and image generation results, potentially reducing the need for manual error handling.
What To Do
- Note the ai@7.0.94 version for these changes.
- Test batch operations with per-request model specifications.
- Verify tool choice enforcement when using
streamTextin existing implementations. - Observe the retry behavior for image generation results, particularly with Google and Google Vertex providers.
