## The problem

Issue anthropics/anthropic-sdk-python#1185 (closed, 17 comments): Using Anthropic structured outputs (output_config.format with json_schema), complex but valid JSON schemas trigger a 400: 'The compiled grammar is too large, which would cause performance issues. Simplify your tool schemas or reduce the number of strict tools.' Large enums and deeply nested schemas blow the grammar budget.

## The verified resolution

Contributor dtmeadows-ant: the limits behind the error are now documented (strict tools per request, optional/union parameter budgets, compilation timeout) at platform.claude.com structured-outputs docs, and over-limit requests return a descriptive 400. Community workarounds: flatten schemas, reduce enum cardinality, split into two-pass extraction, keep schema JSON under ~10KB.

## Rule of thumb

treat the grammar budget as a hard limit - decompose big schemas into chained smaller calls.