Vercel AI SDK, specifically version ai@7.0.94, has received updates that enhance its capabilities for batch processing and tool interaction. The changes include new features and fixes across several components of the SDK.
Key Points
- ai@7.0.94 now supports per-request models in batch operations.
- The
streamTextfunction in ai@7.0.94 enforces tool choices. - The SDK includes retry logic for unclassified empty image results.
- Retry-attempt accounting is preserved during retry operations.
- Provider-independent result retryability classification has been added.
- Google and Google Vertex prompt blocks are now marked as terminal.
- @ai-sdk/provider@4.0.11 and @ai-sdk/gateway@4.0.76 are among the updated dependencies.
Context
According to the Vercel AI SDK changelog, these updates are part of a series of patch changes. The release process is managed by a GitHub action, which automatically publishes packages to npm upon merging the relevant pull request. This system ensures that new changesets are incorporated and released systematically.
Why It Matters
These updates offer developers more control and reliability when working with AI models through the Vercel AI SDK. The ability to specify models per request in batch processing can optimize resource usage and tailor AI responses more precisely. Enforcing tool choices in streamText improves the predictability and robustness of interactions with AI models that utilize external tools.
What To Do
- Review the ai@7.0.94 changelog for full details on the new features.
- Test the per-request model support in batch operations within your applications.
- Verify the enforcement of tool choices when using
streamTextwith your AI models. - Note the updated dependency versions, such as @ai-sdk/provider@4.0.11, for compatibility.
- Watch for changes in how Google and Google Vertex prompt blocks are handled as terminal states.
