Vercel has updated its AI SDK with several changes across various packages, including @ai-sdk/react@2.0.253, @ai-sdk/openai@3.0.106, @ai-sdk/openai-compatible@1.0.53, and @ai-sdk/provider-utils@3.0.36. These updates address how tool calls are validated, how network errors are managed, and when assistant messages are omitted.
Key Points
- The Vercel AI SDK now validates persisted typed tool calls against current input and output schemas.
- Schema-incompatible empty or error inputs and completed or failed history from unavailable tools are loadable as dynamic tool parts.
- Transient network errors occurring while reading successful response bodies, including AI Gateway responses, are now marked as retryable.
- The Vercel AI SDK omits assistant messages when only cache points are present.
- The Vercel AI SDK preserves explicit prompt cache breakpoints on scalar Responses tool results.
Context
According to Vercel's changelog, these updates are part of ongoing maintenance and improvement for the AI SDK. The changes aim to enhance the robustness of tool call handling and network communication within the SDK, as well as refine message management for specific caching scenarios.
Why It Matters
These updates affect developers using the Vercel AI SDK by improving the reliability of tool integrations and network operations. The changes can lead to more stable applications and clearer handling of cached responses, potentially reducing unexpected behavior related to tool calls and network interruptions.
What To Do
- Review the updated documentation for Vercel AI SDK to understand the implications of schema validation for typed tool calls.
- Test applications with the new SDK versions to observe changes in network error handling and assistant message omission.
- Note the preservation of explicit prompt cache breakpoints for scalar Responses tool results.
- Compare the behavior of dynamic tool parts versus static tool types for schema-incompatible tool call histories.
