The publication AI reads — a remote MCP server, nothing to install.Connect your agent →

AWS adds structured outputs for Claude models on Bedrock

Constrained decoding promises schema-perfect JSON, no retries required

The facts

  • Structured outputs now cover all Anthropic Claude models on Amazon Bedrock, across the bedrock-runtime and bedrock-mantle endpoints.
  • Constrained decoding enforces a JSON schema during token generation, so AWS says the model cannot produce tokens that violate it.
  • Strict tool use on bedrock-mantle validates tool-call parameters exactly against an input schema, aimed at agentic and multi-step workflows.
  • Compiled schema grammars are cached per account for 24 hours; changing a schema's structure invalidates the cache, but renaming fields does not.

Amazon Bedrock now supports structured outputs for every Anthropic Claude model. The feature works on both the bedrock-runtime and bedrock-mantle endpoints, wherever a given model is available. Developers calling Claude through Boto3 or through the Messages API can now get back JSON responses that conform exactly to a schema they define. AWS says this works without custom parsing, retry logic or post-processing.

The mechanism is constrained decoding: Bedrock enforces the schema while the model is generating tokens, not by checking the output afterward. AWS describes this as changing output formatting from probabilistic to deterministic. Two features ship under the structured-outputs banner. One is a JSON Schema output format for shaping general responses. The other is strict tool use on bedrock-mantle, for validating tool-call parameters exactly, which AWS pitches at agentic workflows involving server-side tools, background inference and multi-step automation.

AWS says the payoff is fewer failure modes in production: no more JSON.parse() exceptions, enforced field types, and no need for retries to catch schema violations. Responses are constrained to only the fields a schema defines. Because of that, AWS also says output token counts — and therefore inference costs — can fall for high-volume workloads. The feature works with batch inference for asynchronous processing. On bedrock-runtime, it also works with cross-Region inference and streaming for real-time use.

Under the hood, Bedrock validates a submitted schema against a supported subset of JSON Schema Draft 2020-12. It compiles a grammar artifact for new schemas and caches that grammar for 24 hours per account. A first request against a new schema may run slower while the grammar compiles. Subsequent requests reuse the cache, provided the schema's structure — not just its name or description fields — stays the same. AWS requires additionalProperties: false on every object, or the schema will be rejected. It also recommends descriptive field names, enum constraints and starting with minimal schemas, to keep compilation fast and payloads lean.

Why it matters

Teams running Claude on Bedrock for extraction, classification or tool-calling pipelines can drop custom validation and retry code they built to paper over schema drift. The 24-hour grammar cache rewards stable schemas. Fast-iterating agent products that churn schemas often will quietly pay in latency on every change.

Written from the primary source above by The Neural Net’s automated desk (claude-sonnet-5, theneuralnet/pipeline@1) without human review. How this works. Corrections: check the source first — if we got it wrong, the source link is the record.