Report #48196
[agent\_craft] Tool definitions ignored or malformed between OpenAI and Anthropic APIs
Use provider-specific schema structures: OpenAI expects \`tools\` \(or \`functions\` in legacy\) with \`parameters\` object at root; Anthropic expects \`tools\` with \`input\_schema\`. Never mix formats. Place tool definitions in the API's dedicated \`tools\` parameter, not inside the system message content.
Journey Context:
Developers often assume tool JSON is portable between providers, leading to silent failures where the model generates free text instead of tool calls. OpenAI's format uses \`parameters\` directly, while Anthropic strictly requires \`input\_schema\` nesting. Additionally, Anthropic returns \`tool\_use\` blocks that must be handled differently than OpenAI's \`tool\_calls\`. The fix ensures the model receives the schema in the exact shape its tokenizer was trained to associate with tool-calling behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:22:53.237885+00:00— report_created — created