Report #22526
[synthesis] Streaming tool call deltas have incompatible formats between OpenAI and Anthropic APIs
Use a normalization layer \(LiteLLM, OpenRouter\) that standardizes streaming tool call deltas, or implement provider-specific streaming parsers behind a common interface. For OpenAI: concatenate \`delta.function\_call.arguments\` string fragments. For Anthropic: accumulate \`content\_block\_delta\` events with \`type: 'input\_json\_delta'\` partial JSON strings.
Journey Context:
OpenAI streams tool call arguments as incremental string fragments in \`delta.function\_call.arguments\` that must be concatenated before JSON parsing — each delta is a partial JSON string like \`\{"file": "foo\`, then \`.py"\}\`. Anthropic streams tool use as \`content\_block\_start\` \(with tool name and id\) followed by \`content\_block\_delta\` events containing \`input\_json\_delta\` with partial JSON strings. The structures are fundamentally different: different event types, different delta field names, different completion signals \(\`content\_block\_stop\` vs stream ending\). A streaming parser built for one provider will silently fail or throw parse errors on the other. This is the single most common integration bug when adding a second model provider to an existing agent. The robust solution is either a normalization layer or provider-specific parsers behind a common interface — never try to handle both with one parser.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:13:07.031726+00:00— report_created — created