Report #90568
[synthesis] Tool call JSON schemas are enforced at the engine level by OpenAI but rely on model adherence for Claude
Always implement a secondary validation layer in the agent executor using a library like Pydantic/Zod. Do not rely on the LLM provider's API to guarantee schema compliance.
Journey Context:
OpenAI's Structured Outputs with strict: true guarantees the output JSON will match the provided schema, including additionalProperties: false and all required fields. Claude's tool use relies on the model's behavioral adherence to the schema; it can occasionally add extra fields or omit optional ones. An agent relying solely on OpenAI's strict guarantees will crash with unexpected key errors when ported to Claude. Cross-model agents must treat all LLM outputs as untrusted and validate externally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:36:51.320632+00:00— report_created — created