Vercel has updated its AI SDK, promoting the repairText option to stable for the generateObject and streamObject functions. This update, noted in the release of @ai-sdk/workflow-harness@1.0.45 and @ai-sdk/xai@4.0.20, includes a deprecated experimental_repairText alias for backward compatibility.
Concurrently, earlier releases, including @ai-sdk/workflow-harness@1.0.44 and @ai-sdk/workflow@1.0.38, introduced an experimental speech translation model specification, Experimental_SpeechTranslationModelV4, and an experimental_streamTranslate function for streaming speech-to-speech translation.
Key Points
- The
repairTextoption is now stable ongenerateObjectandstreamObjectin Vercel's AI SDK, as of ai@7.0.39. - A deprecated
experimental_repairTextalias is provided for backward compatibility. - An experimental speech translation model specification, Experimental_SpeechTranslationModelV4, has been added.
- The
experimental_streamTranslatefunction supports streaming speech-to-speech translation. - The SDK avoids synthesizing client tool errors for invalid provider-executed tool calls.
Context
According to Vercel's AI SDK changelog, these updates are part of ongoing releases to the SDK. The promotion of repairText to stable indicates a maturation of this functionality for object generation and streaming. The introduction of experimental speech translation features suggests an expansion of the SDK's capabilities into new modalities.
Why It Matters
These updates offer developers enhanced stability for text repair during object generation and introduce new experimental capabilities for speech translation. The repairText stabilization can improve the reliability of structured output, while the speech translation features open avenues for integrating real-time voice interactions into applications.
What To Do
- Review the Vercel AI SDK documentation for the stable
repairTextoption ongenerateObjectandstreamObject. - Test the
experimental_streamTranslatefunction and Experimental_SpeechTranslationModelV4 for speech-to-speech translation use cases. - Note the deprecated
experimental_repairTextalias for future migration planning. - Observe how the SDK handles client tool errors for provider-executed tool calls.
