Report #59165
[gotcha] Tool call responses with null content field render as empty UI with no explanation
Always check both the content and tool\_calls fields in the assistant message object. When content is null or empty but tool\_calls is present, render a tool execution state such as Searching or Running calculation instead of showing nothing. Never assume content will always be populated in an assistant message.
Journey Context:
When the OpenAI API returns a function call response, the content field is often null — the model entire response is the function call with no accompanying text. If your UI only renders the content field, it shows a blank response. Users see nothing and think the system is broken or unresponsive. This is particularly confusing because the request succeeded with 200 OK — there is no error to catch. The fix seems trivial in hindsight but many implementations are built around the assumption that content is always present since that is the common case in simple chat interactions. The right call is to always handle the null content plus tool\_calls case explicitly in your message rendering logic, treating it as a first-class response type rather than an edge case.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:48:00.745437+00:00— report_created — created