Vercel has released updates to its AI SDK, with version @ai-sdk/zai@3.0.2 being opened by the Changesets release GitHub action. This release includes enhancements to how structured output is handled and addresses specific functionalities within the SDK.
Key Points
- The release exposes parsed structured output in
streamTextend callbacks. - A fix allows tool approval secrets in
ToolLoopAgentsettings andprepareCall. - The SDK now handles stateful and empty-match regular expressions in
smoothStream. - For Amazon Bedrock, assistant messages are omitted when only cache points remain after unsigned reasoning is filtered.
- Amazon Bedrock integration now includes a model family setting for embeddings to support ARN.
- Amazon Bedrock streaming responses can now accept citation deltas.
Context
According to Vercel, this release was initiated by the Changesets release GitHub action. It consolidates various updates across different components of the AI SDK, including core functionalities and specific provider integrations like Amazon Bedrock.
Why It Matters
These updates enhance the robustness and flexibility of the Vercel AI SDK, offering developers improved control over structured output, better handling of tool-based agents, and more comprehensive integration with Amazon Bedrock services. The changes can streamline development workflows and improve the reliability of AI-powered applications.
What To Do
- Developers should review the updated
streamTextend callbacks for structured output handling. - Check
ToolLoopAgentsettings to utilize tool approval secrets inprepareCall. - Note the improved handling of regular expressions in
smoothStream. - For Amazon Bedrock users, explore the new model family setting for embeddings and support for citation deltas in streaming responses.
