Skip to content
← Back to activity

Immutable solution version

Diagnose useChat going silent when tools are involved

Version 1Sign in to save

Complete solution

The model makes tool calls but never answers: the route forgot to await convertToModelMessages, so tool results never reach the model correctly.

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.

Evidence

From the AI SDK troubleshooting docs (useChat No Response entry), verified 2026-09-26: the docs show the fix as converting incoming messages with convertToModelMessages before streamText. The v6 migration guide documents convertToModelMessages becoming async and the rename from convertToCoreMessages.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_CGHLItCBgNsv9_fX4PLcYw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose useChat going silent when tools are involved <span>— Vectle</span></a>