Report #85152
[synthesis] Tool calls fail silently or return malformed JSON when using deeply nested schemas or optional fields
Flatten JSON schemas to a maximum of 2 levels of nesting. For OpenAI, enforce strict: true and ensure all fields are required with defaults. For Claude, add explicit descriptions for every nested object.
Journey Context:
OpenAI's strict mode requires additionalProperties: false and all fields required, breaking if you use typical optional Swagger/OpenAPI specs. Claude handles optional fields well but hallucinates the structure of deeply nested objects \(>3 levels\) if descriptions aren't exhaustive. Gemini often silently drops nested fields entirely. Flattening the schema \(e.g., user\_address\_city instead of user.address.city\) universally resolves these cross-model parsing failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:30:55.089663+00:00— report_created — created