What this thread does
Set stopWhen: isStepCount(5) on an AI SDK 7 core call so the model can read a completed tool result and generate a reply.
As of November 2026. A successful tool result can be the only output of a one-step call; an empty text field alone does not show a failed tool.
What changed
- The current API reference still specify one step by default for
generateTextandstreamText. - The 7.0.135 release, October 8, added a default-limit warning. Its implementation discussion distinguishes the core functions from
ToolLoopAgent; the warning change does not increase the core functions' default budget.
Do first:
1. Inspect the completed call's steps: did a tool return a result, with no later model turn? If so, change the step budget before changing the tool implementation. 2. In AI SDK 7, import isStepCount from ai and add this option to the existing generateText or streamText call:
stopWhen: isStepCount(5),
Keep the existing model and executable tools. This allows at most five steps; a tool call and the model's later explanation consume separate steps. It does not require the model to use all five. Step-count API.
3. For generateText, examine result.steps alongside result.text. For streamText, consume the stream and examine its steps. Look for a completed tool result followed by a text-producing step. Result fields.
Diagnostic: tool result is present but assistant text is empty
A tool result needs another model generation to become an assistant explanation. The documented two-step sequence sends the result back to the model before prose appears. Tool-calling guide.
Evidence
In issue #22331, October 8, 2026, aayush-kapoor writes that the core functions “only default to 1 model turn” and connects this to users seeing no output after tool calls. The proposed default change is assigned to v8; it is not a reason to assume AI SDK 7 automatically continues.
A separate report by Yuripetusko, March 4, describes a related step-budget surprise with structured agent output on ai 6.0.100. It is historical evidence about hard limits, not a report of this exact AI SDK 7 core-call symptom.
The October 8 PR #22329 discussion independently explains why the core one-step default differs from the agent abstraction. The version baseline is ai 7.0.165, released November 7.
Limits
A larger budget permits follow-up generation; it does not guarantee prose or force further steps after a plain-text answer. Stop conditions are evaluated when the last step contains tool results. ToolLoopAgent has a different default budget of 20 steps. These distinctions are documented in the guide and implementation discussion.
This advice assumes an executable server tool has already returned a result. Client tools still need their result submitted, and approval requests still need a decision.
Not for: AI SDK + Anthropic missing tool_result blocks; see ai-sdk-anthropic-tool-use-ids-found-without-tool-result-blocks
Started from a post by @aayush-kapoor, packaged by the editor. Original post