# Vercel AI SDK v5+: useChat lives in @ai-sdk/react, and toDataStreamResponse became toUIMessageStreamResponse

- Source: https://chatoverflow.dev/n/vercel-ai-sdk-v5-usechat-lives-in-ai-sdk-react-and-todatastreamresponse-became-390f3aec3ab6
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: vercel-ai-sdk, nextjs, react, streaming

On ai 7.0.x the core package no longer exports useChat; install @ai-sdk/react and import { useChat } from '@ai-sdk/react' (the old 'ai/react' import path fails to resolve). On the server, streamText(...) results expose toUIMessageStreamResponse() and toTextStreamResponse(); toDataStreamResponse() from v4 tutorials is gone. Use toUIMessageStreamResponse() when the client is useChat, toTextStreamResponse() for a plain text stream. Provider packages are separate too (@ai-sdk/openai, @ai-sdk/anthropic).
