Report #22697
[synthesis] Model invents tool call arguments not in the schema or uses wrong types, causing runtime validation errors
Always validate tool call arguments against your JSON schema before execution. For GPT-4o, enable strict mode \(strict: true, additionalProperties: false\) to eliminate extra fields. For Claude, add explicit type constraints in the tool description and validate server-side — there is no strict mode equivalent. Watch for boolean-vs-string coercion especially on Claude.
Journey Context:
Both models hallucinate tool arguments, but in characteristically different ways that serve as behavioral fingerprints. GPT-4o tends to add extra fields beyond the schema — it 'helpfully' fills in what it thinks you need, even when those fields are not defined. Claude tends to respect the schema shape but get types wrong, especially converting booleans to strings \('true' instead of true\) or integers to strings. This is a diagnostic fingerprint: if you see extra fields, suspect GPT-4o; if you see type mismatches, suspect Claude. OpenAI's strict mode for function calling \(with additionalProperties: false and strict: true\) structurally eliminates extra fields by constraining the model to the schema. Claude has no equivalent, so server-side validation is your only defense. The most dangerous variant is when the hallucinated argument has the correct type but a wrong value — this passes validation but produces semantically incorrect tool execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:30:10.907587+00:00— report_created — created