AI Gateway and AI SDK Integration
AI SDK 4.1

AI SDK 4.1

1/20/2025

What this post added

Introduced image generation via `experimental_generateImage` function supporting multiple providers (Replicate, OpenAI, Google Vertex AI, Fireworks). Added `smoothStream` for transforming and smoothing stream output, and `createDataStreamResponse` for non-blocking data streaming. Enhanced `useChat` for simplified persistence. Improved tool calling context with `toolCallId`, `messages`, and `abortSignal`. Added new and updated providers.

Read the original post ↗