
6/18/2024
What this post added
AI SDK 3.2 introduces support for multi-step agentic workflows by extending `generateText` and `streamText` to handle tool calls for sequential tasks. It adds new providers (Azure OpenAI, Google Vertex, Cohere, Ollama) and expands image input capabilities for Anthropic and Google models. Embeddings generation is now supported for OpenAI, Mistral, Azure OpenAI, and Ollama providers, along with a `cosineSimilarity` helper function. DX improvements include an `onFinish` callback for observability and token usage tracking, and the ability to access the final typed object from `streamObject` as a promise. Client-side tool execution is enabled via `useChat` and `streamText` in React, with `onToolCall` and `addToolResult` for handling tool invocations and user interactions.