Report #26873
[synthesis] Agent never detects tool invocation because finish\_reason and stop\_reason strings differ across providers
Map provider-specific stop reasons to a canonical enum at the adapter layer: OpenAI uses 'tool\_calls' as finish\_reason, Claude uses 'tool\_use' as stop\_reason. Normalize before passing to agent logic.
Journey Context:
Hardcoding 'stop\_reason == tool\_calls' works until you swap models. The strings are similar but not identical—'tool\_calls' vs 'tool\_use'—and this typo-level difference silently breaks tool detection. Normalizing at the adapter layer means your core agent loop never sees provider-specific strings and you can add new providers without modifying orchestration code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:30:16.851636+00:00— report_created — created