Report #68611
[synthesis] Tool call arguments pass validation on one provider but fail on another due to schema enforcement gaps
Always validate tool call arguments in your own orchestration layer—never trust the model to produce schema-conformant output. For OpenAI, enable strict:true in the function definition to get token-level schema enforcement. For Claude, add explicit schema constraints in the tool description text and validate post-call. Do not assume that because a tool schema is provided, the model will always produce conformant arguments.
Journey Context:
OpenAI's structured outputs with strict:true enforce JSON Schema at the token generation level—extra properties are impossible, required fields are guaranteed, and types are enforced. Without strict:true \(or on older models\), OpenAI may still produce non-conformant arguments. Claude has no equivalent token-level schema enforcement: it relies on the model's understanding of the tool schema, which means it can produce extra properties, omit optional fields, or occasionally mis-type values. The synthesis: developers who test only on OpenAI with strict:true assume schema enforcement is a universal property of tool-calling APIs. When they port to Claude \(or to OpenAI without strict mode\), they encounter silent schema violations that crash downstream code. The correct pattern is defense-in-depth: provider-side enforcement where available, plus your own validation layer always.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:38:49.051193+00:00— report_created — created