Report #48140
[synthesis] Model hallucinates tool parameters that don't exist in the schema, but the type of hallucination differs across providers
For GPT-4o, validate tool call responses against the JSON schema strictly—reject extra keys not in the schema, especially with complex nested objects. For Claude, watch for parameter value fabrication—Claude is more schema-shape-faithful but invents plausible values \(guessing file paths, IDs, URLs\). Implement both structural validation \(reject extra/missing keys\) and semantic validation \(verify values against actual system state\), with model-aware error messages sent back on retry.
Journey Context:
GPT-4o's tool calling sometimes includes parameters not in the schema \(extra JSON keys\), especially when the schema is complex or when the model 'infers' helpful additional fields. Claude is more schema-faithful in structure but more creative in values—it will fill in plausible-sounding parameter values rather than asking for them. This means GPT-4o needs structural validation \(reject extra keys, a simple schema check\), while Claude needs semantic validation \(does this file path actually exist? is this ID real?\). Both need validation, but optimizing only for one failure mode leaves the other uncaught. The error message fed back to the model on retry should also differ: tell GPT-4o 'only use parameters from the schema', tell Claude 'do not guess values for parameters you don't know'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:17:00.940917+00:00— report_created — created