Vercel has updated its AI SDK, with releases for @ai-sdk/svelte@5.0.101, @ai-sdk/vue@4.0.101, and @ai-sdk/tui@1.0.102. These updates include changes to the core ai package, now at ai@7.0.101, and specific fixes for the @ai-sdk/google@4.0.70 package.
Key Points
- The core
aipackage, now at ai@7.0.101, includes a fix to serialize tool output JSON values. - The
@ai-sdk/google@4.0.70package now preserves JSON Schema instead of converting it to OpenAPI schema. - A fix in
@ai-sdk/google@4.0.70addresses an issue where Gemini expectedfunctionResponse.responseto be an object, but non-object tool results could lead to a socket closure with code 1007. - Non-object tool results are now wrapped under an
outputkey to align with Gemini's expectedgoogle.protobuf.Structtype for thefunctionResponse.responsefield. - The
@ai-sdk/angular@3.0.101and@ai-sdk/code-mode@1.0.58packages have updated dependencies to ai@7.0.101.
Context
According to Vercel, these updates were released via the Changesets release GitHub action. The changes address specific technical issues related to how tool outputs are handled and how schema definitions are managed, particularly for integrations with Google Gemini.
Why It Matters
These updates improve the reliability and compatibility of the Vercel AI SDK, especially for developers integrating with Google Gemini. Correct serialization of tool outputs and proper schema handling can prevent unexpected disconnections and ensure data integrity in AI applications.
What To Do
- Developers using the Vercel AI SDK should update their
@ai-sdk/svelte,@ai-sdk/vue, or@ai-sdk/tuipackages to the latest versions. - Note the change in how non-object tool results are now wrapped under an
outputkey when interacting with Gemini. - Review the updated dependency for
@ai-sdk/angularand@ai-sdk/code-modeto ai@7.0.101. - Test existing Gemini integrations to ensure continued functionality with the schema preservation and tool output serialization fixes.
Keep Exploring
/atlas/**gemini**-family /techniques/output-schema /techniques/ptcf