Report #98960
[synthesis] Streaming tool\_call deltas are fragmented differently and single-chunk parsing fails
Accumulate tool\_call deltas by index and id; finalize a call only when the accumulated arguments string parses as valid JSON and the function name is present.
Journey Context:
OpenAI streams tool\_call deltas with partial JSON arguments split across many chunks; the name may arrive in a separate chunk from arguments. Anthropic streaming uses different field names but similar fragmentation. Agents that json.loads\(\) each chunk crash or invoke functions with partial arguments. A delta accumulator keyed by tool\_call index/id is the only provider-robust pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T05:04:20.322273+00:00— report_created — created