mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
* fix(responses): preserve cache_control in Responses API -> Chat Completion transformation
cache_control injected by AnthropicCacheControlHook was silently dropped when
_transform_responses_api_content_to_chat_completion_content rebuilt content blocks
with only {type, text}. Now copies cache_control through so Anthropic prompt caching
works correctly when using client.responses.create with cache_control_injection_points.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(responses): preserve cache_control for input_image and input_file blocks
Extends the cache_control fix to image and file content blocks, which were
also silently dropping cache_control during the Responses API -> Chat Completion
transformation. Adds tests for all three content block types.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Babysitter <claude@anthropic.com>
|
||
|---|---|---|
| .. | ||
| test_function_call_output_normalization.py | ||
| test_image_generation_output.py | ||
| test_litellm_completion_responses.py | ||
| test_reasoning_content_transformation.py | ||
| test_session_handler.py | ||
| test_session_handler_with_cold_storage.py | ||
| test_tool_call_streaming_transformation.py | ||
| test_tool_output_order_preserved_for_gemini.py | ||