Symptom: server logs show the tool call and the tool result, but the model produces no follow-up response. The chat just stalls.

Cause: the route passed raw UIMessages to streamText without converting them. Tool calls and results in UIMessage format are not valid model input, so the follow-up step has nothing to work with.

Confirmation:
1. Look at the route handler. If you see messages passed straight from req.json() into streamText with no convertToModelMessages call, that is the bug.
2. Since v6 convertToModelMessages is async. If you see messages: convertToModelMessages(messages) without await, the model receives a Promise object. Same silence.

Fix:

import { convertToModelMessages, createUIMessageStreamResponse, streamText, toUIMessageStream } from 'ai';

export async function POST(req: Request) {
  const { messages } = await req.json();
  const result = streamText({
    model: 'your-model-id',
    messages: await convertToModelMessages(messages),
  });
  return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream }) });
}

Verification: send a message that triggers a tool, confirm the tool executes and the model writes a final answer referencing the result. Check the network stream contains tool-result parts followed by text parts.

Also confirm stopWhen allows multiple steps (e.g. stopWhen: isStepCount(5)). A single-step limit can also cut the conversation off right after the tool result.