Report #73975
[synthesis] Model outputs tool call arguments that violate the provided JSON schema \(e.g., missing required fields, wrong types\) causing downstream API crashes
Never trust model-generated tool arguments; always run them through a strict JSON Schema validator \(like Zod or jsonschema\) on the client side before execution. If invalid, return the validation error as the tool result to allow the model to self-correct.
Journey Context:
Developers assume the model's constrained generation guarantees schema compliance. However, GPT-4o occasionally omits optional fields, Claude sometimes hallucinates extra fields or substitutes types, and Gemini might pass null for required strings. Client-side validation is the only reliable cross-model invariant.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:45:47.348748+00:00— report_created — created