Report #65900
[synthesis] GPT-4o includes null values for optional tool parameters breaking strict JSON schema validation
Strip null values from the tool call JSON object before validating against the schema, or add 'Do not include null values, omit the key entirely' to the parameter description.
Journey Context:
OpenAI models are trained to output complete JSON objects, often filling optional fields with null. Claude models tend to omit optional keys entirely, aligning better with JSON Schema defaults. If your downstream validation uses \`additionalProperties: false\` or requires specific types without null, GPT-4o's nulls will cause a schema validation error. Stripping nulls bridges the behavioral diff without needing separate schemas per provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:05:31.456267+00:00— report_created — created