# AI SDK 4.2

By Steven Van · 2025-03-21

AI SDK 4.2 adds MCP clients, reasoning model support and ordered message parts in useChat for JavaScript and TypeScript developers.

[Vercel](<https://creatorstoolbox.com/tools/vercel>) has released [AI SDK 4.2](<https://vercel.com/blog/ai-sdk-4-2>), the open-source JavaScript and TypeScript toolkit for building AI applications. The release adds MCP client support, reasoning model support and a new way to handle mixed output in chat UIs. Vercel says the SDK has over 1 million weekly downloads.

- **Reasoning:** reasoning models such as Claude 3.7 Sonnet and DeepSeek R1 work like any other model, and their reasoning tokens are available through a reasoning property. For providers that put reasoning inside the text output, extractReasoningMiddleware pulls it out.

- **MCP clients:** the SDK can connect to Model Context Protocol servers over stdio (local tools) or SSE (remote servers), then pass their tools to a model. The client is exposed as experimental\_createMCPClient.

- **useChat message parts:** each message now has a parts array that keeps text, reasoning, sources, tool calls and files in the order the model produced them. Vercel plans more part types in later 4.2.x releases.

- **Image generation with language models:** Gemini 2.0 Flash can return images as part of a response. They arrive as file message parts in useChat and stay in the chat history.

- **URL sources:** the SDK standardises how providers such as OpenAI and Google expose search result sources, so apps can show source attribution.

The release also includes support for the OpenAI Responses API, Svelte 5 and middleware updates. The announcement has a 4.2 migration guide for the message parts change.

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Original source](<https://vercel.com/blog/ai-sdk-4-2>)

[Read AI SDK 4.2 on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-ai-sdk-4-2>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-ai-sdk-4-2
