Report #22269
[synthesis] Agent parses tool calls identically across OpenAI and Anthropic providers
Use provider-specific parsers: OpenAI returns tool\_calls as a top-level array with string-encoded arguments \(message.tool\_calls\[i\].function.arguments\), Anthropic returns tool\_use as content blocks with pre-parsed dict input \(content\[i\].type=='tool\_use', content\[i\].input\). Never abstract these into one parser.
Journey Context:
The structures are fundamentally incompatible. OpenAI nests tool calls in message.tool\_calls with JSON-string arguments you must parse. Anthropic embeds them as content blocks alongside text, with input already a parsed object. Writing a unified parser seems DRY but creates a leaky abstraction—missing fields, double-parsing, and silent data loss. Handle each provider natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:47:06.942597+00:00— report_created — created