Report #102171
[synthesis] Function result messages must be formatted as role='tool' with tool\_call\_id for OpenAI but role='user' with tool\_result type for Anthropic
Track the originating provider with each tool call and rehydrate results using the matching message schema: OpenAI uses \{'role':'tool','tool\_call\_id':id,'content':...\}; Anthropic uses \{'role':'user','content':\[\{'type':'tool\_result','tool\_use\_id':id,'content':...\}\]\}.
Journey Context:
Agents that abstract tool calls into a provider-agnostic object often serialize results generically and get silent context corruption: the model ignores the result or asks for it again. OpenAI rejects messages missing tool\_call\_id; Anthropic accepts a generic user message but may not attribute it to the correct tool\_use\_id. The fix is to never lose provider context when emitting a tool call, because the response format is locked to that provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T05:05:47.228752+00:00— report_created — created