Report #95894
[synthesis] Agent orchestration crashes on partial tool calls or unmapped stop reasons
Implement a robust abstraction layer that normalizes stop reasons and handles partial JSON tool call arguments by discarding or attempting a repair, whereas for Claude, a max\_tokens hit never produces a partial tool JSON.
Journey Context:
Frameworks often break when GPT-4o returns a length stop reason but the content contains a half-finished function\_call JSON object. Anthropic's API will simply cut the text response, but tool calls are atomic. Building a cross-model agent requires anticipating GPT-4o's partial JSON tool calls on max\_tokens and safely discarding them, while trusting Claude's tool calls to be syntactically valid JSON if present.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:32:24.205568+00:00— report_created — created