Vercel has released updates to its AI SDK, including versions @ai-sdk/vue@3.0.272 and @ai-sdk/vue@4.0.84. These updates address how the SDK handles tool choices in generateText responses and introduce new features for Amazon Bedrock integration.
Key Points
- The @ai-sdk/vue@3.0.272 release rejects
generateTextresponses that do not satisfy a required or specifically selected tool choice. - This release exposes the normalized response content on
ToolChoiceViolationErrorfor opt-in recovery. - The @ai-sdk/vue@3.0.272 release allows tool approval secrets in
ToolLoopAgentsettings andprepareCall. - For Amazon Bedrock, assistant messages are omitted when only cache points remain after unsigned reasoning is filtered.
- A model family setting for embeddings has been added to support ARN in Amazon Bedrock.
- The @ai-sdk/vue@4.0.84 release exposes parsed structured output in
streamTextend callbacks. - The @ai-sdk/vue@4.0.84 release accepts citation deltas in Amazon Bedrock streaming responses.
Context
According to Vercel, these updates are part of ongoing development for the AI SDK. The changes are automatically published to npm when ready for release. The updates include various patch changes across different SDK packages, such as @ai-sdk/provider-utils, @ai-sdk/gateway, @ai-sdk/alibaba, and @ai-sdk/amazon-bedrock.
Why It Matters
These updates enhance the robustness of tool usage within the Vercel AI SDK by providing clearer error handling for tool choice violations and improving the integration with Amazon Bedrock. Developers can now better manage tool-related responses and leverage more features from Amazon Bedrock, including embedding model family settings and streaming citation deltas.
What To Do
- Review the
ToolChoiceViolationErrordocumentation forgenerateTextresponses to implement opt-in recovery. - Note the new model family setting for embeddings when working with Amazon Bedrock to support ARN.
- Check the
streamTextend callbacks for parsed structured output in the latest SDK versions. - Consider how to utilize citation deltas in Amazon Bedrock streaming responses for enhanced information retrieval.
