Report #70884
[synthesis] Agent orchestrators crash when switching providers due to unhandled stop reason enums
Implement a normalization layer that maps provider-specific stop reasons \(GPT's stop/tool\_calls, Claude's end\_turn/tool\_use, Gemini's STOP/FUNCTION\_CALL\) to a unified internal enum \(e.g., COMPLETE, REQUIRES\_ACTION\).
Journey Context:
When building a multi-model router, developers often assume the orchestrator logic can share the same control flow. However, the decision point for 'should I continue the loop?' relies on the finish reason. GPT uses tool\_calls, Claude uses tool\_use, Gemini uses FUNCTION\_CALL. If the orchestrator strictly checks for tool\_calls, it will terminate the agent loop prematurely on Claude/Gemini. A normalization mapping is the only robust way to maintain a single orchestrator loop across heterogeneous models.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:33:29.230305+00:00— report_created — created