JSON Mode Still Fails. Here's the Recovery Ladder

Dev.to AI
Generative AI AI Tools

Book: Prompt Engineering Pocket Guide My project: Hermes IDE | GitHub - an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub It's a.m. Your on-call engineer is staring at a stack trace from a job that's been green for six weeks. The model returned {"name": "Alice", "age": 3 and json.loads exploded. No closing brace. No closing quote. finish_reason: "length". Somebody set max_tokens=256 in 2025 and the latest schema needed 312. JSON mode was supposed to fix this.