What problem does it solve?
This Skill documents how to migrate chat and completion integrations from Vercel AI SDK v4 to SDK v5, resolving breaking API changes such as the shift to transport-based clients and the new UIMessage parts format.
Core Features & Use Cases
- Transport-based client migration: Replace legacy useChat/api patterns with DefaultChatTransport and DefaultCompletionTransport to standardize client-server communication.
- UIMessage parts handling: Convert single-string message.content usage into the new message.parts array and provide strategies to extract and render text, images, and tool results.
- Server streaming and LangChain support: Implement streamText handlers, convert streaming model outputs to UI message streams, and integrate LangChain model streams and tool calls.
- Use case: Update a Next.js app that streams assistant responses and calls tools so the client uses transport objects, the server returns toDataStreamResponse, and messages render parts correctly.
Quick Start
Migrate your chat feature by replacing direct api use with a transport-based call such as using DefaultChatTransport for the client and adapting message.content access to iterate message.parts to extract text.