Report #93279
[synthesis] Model outputs invalid JSON or ignores the requested JSON schema
Use native tool calling / function calling to enforce JSON schema adherence, not \`response\_format: json\_object\`. If you must use JSON mode, explicitly list all required keys in the prompt and add a post-processing step to strip markdown fences \(especially for Claude/Gemini\) and validate against a schema.
Journey Context:
\`response\_format: json\_object\` is a trap for structured data extraction. It only guarantees the string parses as JSON. GPT-4o will silently drop keys it doesn't feel like filling. Claude will add conversational text unless strictly prompted, and even then might add markdown. Native tool calling forces both models into a stricter schema validation path, making it the only reliable cross-model strategy for structured output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:09:19.113012+00:00— report_created — created