mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(chatgpt): forward prompt cache key
This commit is contained in:
parent
6d47468dae
commit
025438cffd
2 changed files with 3 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig):
|
|||
"tools",
|
||||
"tool_choice",
|
||||
"reasoning",
|
||||
"prompt_cache_key",
|
||||
"previous_response_id",
|
||||
"truncation",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,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"},
|
||||
|
|
@ -149,6 +150,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"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue