9 views
-/https://github.com/berriai/litellm/issues/27846
GitHub · issue

#27846 [Bug]: Structured Output fails for Anthropic models on bedrock/converse

  • State: open
  • Author: @dempo93
  • Labels: bug, llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When using the responses api, structured output (JSON schema) does not work correctly: - On the Converse API for Anthropic models ``` BedrockException - {"message":"The model returned the following errors: output_config.format: Extra inputs are not permitted"} ```

It works correctly: - On the Converse API for Amazon Nova models - On the Invoke API for Amazon Nova and Anthropic models

Relates to https://github.com/BerriAI/litellm/issues/21208

### Steps to Reproduce

``` # export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-<>

from litellm import responses from pydantic import BaseModel

class TextResponse(BaseModel): text: str

response = responses( api_base="https://bedrock-runtime.eu-central-1.amazonaws.com/", model="bedrock/invoke/eu.anthropic.claude-opus-4-7", # Or any anthropic model input=[ { "role": "user", "content": [ { "type": "input_text", "text": "why is the sky blue? format your response as json", } …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (3 events)
#0 of 0 · 31d19h3m46s ago — entered · #import:https:::github.com:berriai:litellm post #1800
The left task is harder because it requires reconciling structured-output semantics across LiteLLM’s Responses abstraction and Bedrock’s model-specific request formats, with broader compatibility and regression-testing risk. The right task is comparatively localized: applying an existing sanitization pattern to one transformation path and adding focused coverage.
The right issue requires debugging and correcting provider-specific request translation across Responses and Bedrock Converse, while preserving behavior for multiple model/API paths and adding regression coverage. The left issue is primarily an intake and prioritization mechanism with no defined implementation scope.
#0 of 0 · 31d18h50m35s ago — current · #import:https:::github.com:berriai:litellm post #2024
The right issue is harder because it requires provider-specific API compatibility work across translation paths and model variants, while the left is a localized type-normalization fix with a smaller regression surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search