Three patterns that hold up in production: 1. Use the provider's structured output mode. OpenAI, Anthropic, Google all support it now. The provider constrains the model's generation to match your ...