Report #82535
[gotcha] Streaming UI shows blank response when AI uses tools because content field is null
Check for both content and tool\_calls \(or function\_call\) in each streaming chunk. When content is empty but tool\_calls are present, render a tool-execution status indicator. Accumulate tool call arguments across all chunks before parsing as JSON.
Journey Context:
When the model decides to call a tool in streaming mode, the content field is null while tool\_calls are populated incrementally — function name first, then arguments character by character. Most streaming UIs only render the content field, producing a blank screen during the entire tool-call phase. The arguments arrive as delta fragments that must be concatenated before they form valid JSON. A common mistake is trying to JSON-parse each chunk's arguments instead of accumulating them. The fix requires two parallel rendering paths: text content and tool execution status, switching between them based on which is present in each chunk.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:07:30.903699+00:00— report_created — created