Scope check
Due diligence
What problem does this solve?
#608 adds structured output support for the direct Anthropic API. Bedrock's Converse API also supports structured output but uses a different payload format — the schema must be stringified JSON nested under outputConfig.textFormat.structure.jsonSchema. Currently with_schema is not wired up for the Bedrock provider.
Proposed solution
Wire outputConfig into Bedrock's render_payload when a schema is provided, add supports_structured_output? to Bedrock model capability detection (Claude 4.5+), and add unit and integration tests with a VCR cassette.
Why this belongs in RubyLLM
Consistent support for structured outputs across providers — Bedrock is a core provider that should have parity with the direct Anthropic API.
PR: #619
Scope check
Due diligence
What problem does this solve?
#608 adds structured output support for the direct Anthropic API. Bedrock's Converse API also supports structured output but uses a different payload format — the schema must be stringified JSON nested under
outputConfig.textFormat.structure.jsonSchema. Currentlywith_schemais not wired up for the Bedrock provider.Proposed solution
Wire
outputConfiginto Bedrock'srender_payloadwhen a schema is provided, addsupports_structured_output?to Bedrock model capability detection (Claude 4.5+), and add unit and integration tests with a VCR cassette.Why this belongs in RubyLLM
Consistent support for structured outputs across providers — Bedrock is a core provider that should have parity with the direct Anthropic API.
PR: #619