litellm - 💡(How to fix) Fix [Bug]: Bedrock pass-through /converse returns 200 with empty body on v1.85.0

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After upgrading LiteLLM proxy from v1.83.10-stable to 1.85.0, native Bedrock pass-through calls to the non-streaming Converse endpoint return HTTP 200 with Content-Length: 0 and an empty body.

LiteLLM observability/logging records the upstream Bedrock call as successful and shows output tokens, but the HTTP client receives no body. AWS boto3 then parses only ResponseMetadata, with no output, causing downstream callers to fail with KeyError: 'output'.

Error Message

KeyError: 'output'

Root Cause

After upgrading LiteLLM proxy from v1.83.10-stable to 1.85.0, native Bedrock pass-through calls to the non-streaming Converse endpoint return HTTP 200 with Content-Length: 0 and an empty body.

LiteLLM observability/logging records the upstream Bedrock call as successful and shows output tokens, but the HTTP client receives no body. AWS boto3 then parses only ResponseMetadata, with no output, causing downstream callers to fail with KeyError: 'output'.

Fix Action

Fix / Workaround

This may be related to a response-header merge introduced between v1.83.10-stable and 1.85.0.

Code Example

curl -i "$LITELLM_PROXY_URL/bedrock/model/us.anthropic.claude-haiku-4-5-20251001-v1%3A0/converse" \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{
    "messages": [
      {
        "role": "user",
        "content": [{"text": "Reply with exactly: ok"}]
      }
    ],
    "inferenceConfig": {
      "maxTokens": 16,
      "temperature": 0
    }
  }'

---

HTTP/1.1 200 OK
content-type: application/json
content-length: 0
x-litellm-version: 1.85.0

---

KeyError: 'output'

---

headers=HttpPassThroughEndpointHelpers.get_response_headers(
    headers=result.headers,
    custom_headers=None,
)

---

headers=HttpPassThroughEndpointHelpers.get_response_headers(
    headers=result.headers,
    custom_headers=dict(fastapi_response.headers),
)

---

curl -i "$LITELLM_PROXY_URL/bedrock/model/us.anthropic.claude-haiku-4-5-20251001-v1%3A0/converse" \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{
    "messages": [
      {
        "role": "user",
        "content": [{"text": "Reply with exactly: ok"}]
      }
    ],
    "inferenceConfig": {
      "maxTokens": 16,
      "temperature": 0
    }
  }'

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Summary

After upgrading LiteLLM proxy from v1.83.10-stable to 1.85.0, native Bedrock pass-through calls to the non-streaming Converse endpoint return HTTP 200 with Content-Length: 0 and an empty body.

LiteLLM observability/logging records the upstream Bedrock call as successful and shows output tokens, but the HTTP client receives no body. AWS boto3 then parses only ResponseMetadata, with no output, causing downstream callers to fail with KeyError: 'output'.

Version

  • LiteLLM Docker image: docker.io/litellm/litellm-database:1.85.0
  • Previous working image: docker.io/litellm/litellm-database:v1.83.10-stable
  • Route: /bedrock/model/{modelId}/converse
  • Model tested: us.anthropic.claude-haiku-4-5-20251001-v1:0

Minimal repro

Call native Bedrock pass-through Converse:

curl -i "$LITELLM_PROXY_URL/bedrock/model/us.anthropic.claude-haiku-4-5-20251001-v1%3A0/converse" \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{
    "messages": [
      {
        "role": "user",
        "content": [{"text": "Reply with exactly: ok"}]
      }
    ],
    "inferenceConfig": {
      "maxTokens": 16,
      "temperature": 0
    }
  }'

Actual behavior

The response is successful but empty:

HTTP/1.1 200 OK
content-type: application/json
content-length: 0
x-litellm-version: 1.85.0

Body length is 0.

When using boto3 with endpoint_url=$LITELLM_PROXY_URL/bedrock, the parsed response contains only ResponseMetadata and does not contain output.

Example downstream failure:

KeyError: 'output'

Expected behavior

The /converse response should include the Bedrock Converse JSON body, including output.message.content.

The response should not send Content-Length: 0 when LiteLLM has already read a non-empty upstream response body.

Possible related change

This may be related to a response-header merge introduced between v1.83.10-stable and 1.85.0.

In v1.83.10-stable, the non-streaming pass-through response path used:

headers=HttpPassThroughEndpointHelpers.get_response_headers(
    headers=result.headers,
    custom_headers=None,
)

In 1.85.0, this became:

headers=HttpPassThroughEndpointHelpers.get_response_headers(
    headers=result.headers,
    custom_headers=dict(fastapi_response.headers),
)

Possibly related PR: https://github.com/BerriAI/litellm/pull/27412

Notes

This appears specific to native Bedrock pass-through non-streaming /converse.

These paths did not show the same failure in our testing:

  • /bedrock/model/{modelId}/converse-stream
  • OpenAI-compatible /v1/chat/completions

Steps to Reproduce

Call native Bedrock pass-through Converse:

curl -i "$LITELLM_PROXY_URL/bedrock/model/us.anthropic.claude-haiku-4-5-20251001-v1%3A0/converse" \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{
    "messages": [
      {
        "role": "user",
        "content": [{"text": "Reply with exactly: ok"}]
      }
    ],
    "inferenceConfig": {
      "maxTokens": 16,
      "temperature": 0
    }
  }'

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

1.85.0

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The /converse response should include the Bedrock Converse JSON body, including output.message.content.

The response should not send Content-Length: 0 when LiteLLM has already read a non-empty upstream response body.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Bedrock pass-through /converse returns 200 with empty body on v1.85.0