feat(openai): keep a builtin tool call's status and mark failed calls as error spans (#991)
The Responses API reports each builtin output item (`web_search_call`, `file_search_call`, `code_interpreter_call`) with a `status` — `completed`, `failed` or `incomplete`. Both decode paths dropped it together with the item's id/type, so a failed web search and one that found nothing were indistinguishable downstream: the OTel `execute_tool` child span was always `:ok` with no result. The status now rides on the tool call's metadata (kept off the arguments, which the item does not replay anyway) on the streaming and the buffered path, and `ReqLLM.Telemetry.OpenTelemetry.tool_spans/2` turns `failed` / `incomplete` into an error span stub carrying `error.type`, which the translator applies to the child span as usual. Claude-Session: https://claude.ai/code/session_01XUXfaDAAeFok1GCCULzyVD Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
V
Vasilis Spilka committed
a95a4f17aee1f09a168a61eb7961d7096e256ce6
Parent: fde191f
Committed by GitHub <noreply@github.com>
on 9/5/2026, 3:53:12 PM