Vercel has updated its @ai-sdk/workflow package to version 2.0.37. This release, published via the Changesets release GitHub action, incorporates fixes for the AI SDK.
Key Points
- The AI SDK now preserves provider metadata when simulating text streams.
- The
prepareStepmodel is now reported in streamed step results. - Unhandled rejections are prevented when the UI message stream reading stops early.
- Prototype-named properties are preserved in serialized tool outputs.
- Telemetry spans now close when provider response streams fail.
- The
prepareStep-selected model is used for streamed response metadata fallbacks. - Tool calls required by retained pending approvals are preserved.
- Input available callbacks are skipped for invalid streamed tool calls.
- Prompt attachment downloads are canceled when model calls are aborted or time out.
- Streamed JSON fences are stripped before arbitrary trailing whitespace.
- The AI SDK now streams
null.
Context
According to Vercel, these updates address various issues within the AI SDK, particularly concerning the handling of streaming data, tool interactions, and error management. The release process is automated through GitHub actions, ensuring that packages are published to npm upon merging the release PR.
Why It Matters
These fixes enhance the reliability and stability of applications built with the Vercel AI SDK, particularly for developers working with streaming responses and complex tool integrations. Improved error handling and metadata preservation can lead to more robust and predictable AI-powered features.
What To Do
- Developers using @ai-sdk/workflow should update to version 2.0.37.
- Review the updated behavior for streamed text and tool outputs.
- Note the changes in telemetry span management for provider response streams.
- Observe how prompt attachment downloads are now handled during abortions or timeouts.
