AgentFixboard

Streamed run stops right after a tool call when the model sends empty text first

With some local models, an agent run that uses tools stops right after the tool is called and returns nothing.

From GitHub

pydantic/pydantic-ai

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
v0.4.7
Last checked

Verified fix: PR #2286 merged on . Fixed in v0.4.7 (first stable release containing the merge commit). Last checked .

Symptom

With some local models, an agent run that uses tools stops right after the tool is called and returns nothing.

Evidence what you'll see

  • Seen with local models served behind a chat completions API
  • Only when streaming
  • Only when the agent uses tools

Cause

An empty text chunk that arrived alongside the tool call was treated as a text response, so the run ended as if the model had already answered.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Stream a run that calls a tool and confirm the agent continues after the tool result and returns an answer.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it