Report #84466
[synthesis] Orchestrator fails to recognize tool call termination due to differing API response keys
Map both OpenAI's finish\_reason: tool\_calls and Anthropic's stop\_reason: tool\_use to a unified internal enum \(e.g., ACTION\_REQUIRED\) in your agent router.
Journey Context:
When building model-agnostic agent frameworks, developers often check for a single stop reason string to determine if the model wants to execute a tool. OpenAI uses finish\_reason: 'tool\_calls', while Anthropic uses stop\_reason: 'tool\_use'. Hardcoding either will cause the orchestrator to hang or misinterpret the model's intent when swapping providers. Abstracting these provider-specific strings into a unified state machine immediately upon receiving the API response is the only scalable way to support multiple backends.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:22:03.227861+00:00— report_created — created