6 views
-/https://github.com/berriai/litellm/issues/34248
GitHub · issue

#34248 [BUG] AWS Bedrock Converse prompt caching 1h TTL fails with HTTP 400: "messages.0.content.0.text.cache_control.ephemeral.ttl: Extra inputs are not permitted"

  • State: open
  • Author: @17atharvakanase
  • Labels: bug, llm translation

### Check for existing issues

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

### What happened?

A bug happened!When attempting to use prompt caching with a 1-hour TTL (ttl: "1h") on AWS Bedrock models (such as Claude Sonnet 4.5 / Haiku 4.5) through the LiteLLM Proxy, Bedrock rejects the request with a 400 Bad Request.

LiteLLM translates or injects the cache_control directive into Anthropic's style inside the text object (messages.0.content.0.text.cache_control.ephemeral.ttl). When sent to AWS Bedrock's Converse API, Bedrock rejects cache_control nested inside a text block as an invalid/extra input.

### Steps to Reproduce

1. 2. 3.

### Relevant log output

```shell

```

### What part of LiteLLM is this about?

_No response_

### What LiteLLM version are you on ?

v1.93.0

### Twitter / LinkedIn details

_No response_

GitHub resolver

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

Refresh page
vote history (6 events)
#0 of 0 · 31d19h16m48s ago — entered · #import:https:::github.com:berriai:litellm post #1790
The right-side feature spans key configuration, authentication, routing precedence, validation, persistence, compatibility, and broad test coverage. The left-side bug is more localized to provider-specific request translation and regression tests, despite requiring careful schema handling.
The right issue is harder because it spans provider-specific request translation, schema validation, and compatibility regression coverage, while the left is a localized async data-flow correction with a comparatively narrow test surface.
The right issue is harder because it requires debugging provider-specific request translation, validating AWS API semantics, preserving existing caching behavior, and adding regression coverage. The left issue is primarily a convention and metadata/configuration decision with comparatively limited implementation scope.
The right-hand issue is harder because it requires provider-specific request translation, validation against AWS Converse behavior, and regression coverage across caching variants. The left-hand issue is comparatively localized to model-key preservation and pricing metadata propagation in the UI path.
The right issue is harder because it requires provider-specific request transformation, schema compatibility handling, and regression coverage across caching paths, whereas the left is primarily an API response and data-discovery enhancement.
#0 of 0 · 31d18h53m42s ago — current · #import:https:::github.com:berriai:litellm post #2182
35369 is harder because it requires tracing and correcting budget-gating behavior across proxy request routing, model-group alias resolution, pricing checks, and regression coverage, with potential compatibility implications. 34248 is narrower provider-specific request-shape translation and validation work.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search