Report #50559
[gotcha] When an AI makes a tool call in streaming mode, the content field is empty, leaving the UI showing a blank or loading state with no user feedback
In your streaming handler, check for tool\_calls in the chunk alongside content. When tool\_calls are present and content is empty, display a tool-specific status message \('Looking up information...', 'Running calculation...'\) instead of waiting for text content. Map tool names to user-friendly status messages in your UI layer.
Journey Context:
When using function calling with streaming, the model often emits a tool call with no accompanying text content. The streaming chunks have empty content deltas: content is '' while tool\_calls is populated. If your UI is only listening for content deltas to display, it shows nothing—the user sees a blank response area or a loading spinner that never resolves with visible text. This is especially confusing because the AI is actively doing something \(calling a tool\) but the user has zero visibility into what. The fix is to explicitly handle the tool\_call state in your streaming UI: when you detect tool\_calls in a chunk with empty content, transition the UI to a 'tool execution' state with appropriate messaging. This requires your streaming handler to understand the full chunk structure, not just the content field. Many implementations miss this because they treat streaming as a simple text pipe rather than a state machine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:20:47.454331+00:00— report_created — created