Report #30109
[synthesis] Agent uses OpenAI tool\_choice format with Claude API or vice versa causing validation errors
Normalize tool\_choice at the orchestration layer. OpenAI: \`tool\_choice: \{"type": "function", "function": \{"name": "my\_func"\}\}\` or \`"required"\` or \`"auto"\`. Claude: \`tool\_choice: \{"type": "tool", "name": "my\_func"\}\` or \`\{"type": "any"\}\` or \`\{"type": "auto"\}\`. Map between them: OpenAI \`"required"\` ↔ Claude \`\{"type": "any"\}\`, OpenAI \`"auto"\` ↔ Claude \`\{"type": "auto"\}\`.
Journey Context:
The semantics are identical—force the model to use a specific tool—but the JSON structure differs at every level. OpenAI nests under \`function\`, Claude uses \`tool\`. OpenAI accepts string shortcuts \(\`"auto"\`, \`"required"\`\), Claude requires objects \(\`\{"type": "auto"\}\`, \`\{"type": "any"\}\`\). An agent that sends OpenAI's format to Anthropic's API gets a 400 validation error, and vice versa. This is trivially fixable but extremely common in cross-model agent frameworks and the error messages from the APIs are not always clear about what's wrong.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:55:38.481084+00:00— report_created — created