Report #29538
[synthesis] GPT-4o omits optional tool parameters from arguments while Claude includes them as null, and GPT-4o may add parameters not in the schema, causing tool execution failures
Always validate and normalize tool call arguments against your schema before execution. Set default values for missing optional parameters. Strip unknown parameters that are not in the schema. For OpenAI, enable strict: true in the function definition to enforce exact schema adherence. Never assume the model will send exactly what the schema defines.
Journey Context:
When a tool schema has optional parameters, Claude tends to include them with null values in the tool call arguments. GPT-4o tends to omit them entirely. If your tool execution code assumes a parameter key exists even as null, it will throw key-not-found errors on GPT-4o. Conversely, GPT-4o may add extra parameters it infers from context that are not in the schema. OpenAI's strict: true mode enforces exact schema adherence but has limitations: all parameters must be marked required, no optional fields are allowed in strict mode, and the schema must follow a restricted JSON Schema subset. The pragmatic fix is to always run arguments through a validation and normalization layer that applies defaults for missing keys and strips extras. This is the adapter pattern applied to tool calls and prevents an entire class of cross-model bugs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:58:03.208431+00:00— report_created — created