Constrained Decoding Sounds Bulletproof. It Only Fixes the Shape.
Constrained decoding is the mechanism behind OpenAI's Structured Outputs and Anthropic's strict tool use: it compiles your JSON Schema into a grammar and masks invalid tokens before they can ever be sampled, so shape failures stop happening. What it cannot do is check that the
