Vercel

Introducing Vercel AI SDK 3.2

Jun 18, 2024
Introducing Vercel AI SDK 3.2
SummaryAI, from the source post

This post introduces AI SDK 3.2, focusing on agentic workflows with extended `generateText` and `streamText` capabilities for multi-step agent execution using tools. It adds support for Azure OpenAI, Google Vertex, Cohere, and Ollama providers, along with image input for Anthropic and Google models. Embeddings support is introduced via OpenAI, Mistral, Azure OpenAI, and Ollama, including `embed` and `embedMany` functions and a `cosineSimilarity` helper. DX improvements include an `onFinish` callback for `streamText`/`streamObject` to report token usage and errors, and the ability to access the final typed object from `streamObject` results. Client-side tool execution is enabled via `useChat` and `streamText` with `onToolCall` and `addToolResult` utilities for interactive chatbots.

More from the AI Gateway and AI SDK Integration trail