diff --git a/litellm/llms/chatgpt/responses/transformation.py b/litellm/llms/chatgpt/responses/transformation.py index 9774b762396..b191d6d101b 100644 --- a/litellm/llms/chatgpt/responses/transformation.py +++ b/litellm/llms/chatgpt/responses/transformation.py @@ -104,6 +104,7 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig): "tools", "tool_choice", "reasoning", + "prompt_cache_key", "previous_response_id", "truncation", } diff --git a/tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py b/tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py index 0b04dd0ed78..b02d1f58cc0 100644 --- a/tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py +++ b/tests/unit/llms/chatgpt/responses/test_chatgpt_responses_transformation.py @@ -169,6 +169,7 @@ class TestChatGPTResponsesAPITransformation: "max_output_tokens": 123, "stream_options": {"include_usage": True}, # supported and should be preserved + "prompt_cache_key": "session_123", "truncation": "auto", "previous_response_id": "resp_123", "reasoning": {"effort": "medium"}, @@ -187,6 +188,7 @@ class TestChatGPTResponsesAPITransformation: assert "max_output_tokens" not in request assert "stream_options" not in request + assert request["prompt_cache_key"] == "session_123" assert request["truncation"] == "auto" assert request["previous_response_id"] == "resp_123" assert request["reasoning"] == {"effort": "medium"}