18 views
-/https://github.com/berriai/litellm/issues/27950
GitHub · issue

#27950 bug: Responses API drops cache_control on input_text content blocks (inconsistent with tool cache_control)

  • State: open
  • Author: @jimmychen-p72
  • Labels: llm translation

## Description

When using the OpenAI Responses API endpoint (`/v1/responses`) with `cache_control` on `input_text` content blocks, the `cache_control` field is silently dropped during the Responses → Chat Completions transformation. This means prompt caching directives sent via the Responses API never reach the underlying provider (e.g. Anthropic/Bedrock).

This is inconsistent: `cache_control` on **tools** is correctly preserved through the same transformation.

## Reproduction (unit test — no API call needed)

```python from litellm.responses.litellm_completion_transformation.transformation import ( LiteLLMCompletionResponsesConfig, )

# Case 1: input_text with cache_control — DROPPED result = LiteLLMCompletionResponsesConfig.transform_responses_api_request_to_chat_completion_request( model="claude-sonnet-4-6", input=[{ "type": "message", "role": "user", "content": [{ "type": "input_text", "text": "Hello", "cache_control": {"type": "ephemeral", "ttl": "1h"}, }], }], responses_api_request={}, ) messages = result.get("messages", []) content = messages[-1].get("content", []) print(content[0].get…

GitHub resolver

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

Refresh page
vote history (5 events)
#0 of 0 · 31d19h5m38s ago — entered · #import:https:::github.com:berriai:litellm post #1775
The orchestration feature spans gateway architecture, routing policy design, provider/model selection, fallback behavior, configuration, observability, and extensive integration testing. The cache propagation defect is comparatively localized to a transformation path with focused regression coverage.
The right issue requires changes in a request-transformation path, careful preservation of nested metadata, regression coverage, and validation against provider-specific behavior. The left issue is primarily an ecosystem/integration listing with comparatively limited product-code scope.
Adding a multi-modal provider/model integration spanning video, image, and audio requires broader API mapping, validation, capability handling, and regression coverage across several request and response paths. The cache directive bug is comparatively localized to one transformation path with a focused test and fix.
The left task spans cross-component provider resolution, guardrail execution, proxy configuration, and self-hosted backend compatibility, creating broader integration and regression risk. The right task is comparatively localized to request transformation logic with a focused unit-test fix.
#0 of 0 · 31d18h1m46s ago — current · #import:https:::github.com:berriai:litellm post #2817
#25260 requires cross-platform diagnosis across Prisma, Node, Python packaging, Windows process behavior, and database integration, with substantial regression risk; #27950 is a localized request-transformation mapping fix with focused tests
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search