mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(chatgpt): keep compaction config filtered
I removed context_management from the ChatGPT Responses allowlist after\nauthenticated GPT-5.6 probes did not establish normal endpoint support.\nprompt_cache_key remains forwarded, and the regression keeps unsupported\nChatGPT request fields filtered.
This commit is contained in:
parent
a4a1079510
commit
682ffbf78f
2 changed files with 4 additions and 5 deletions
|
|
@ -98,7 +98,6 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig):
|
|||
"tool_choice",
|
||||
"reasoning",
|
||||
"prompt_cache_key",
|
||||
"context_management",
|
||||
"previous_response_id",
|
||||
"truncation",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,12 +124,14 @@ class TestChatGPTResponsesAPITransformation:
|
|||
"user": "user_123",
|
||||
"temperature": 0.2,
|
||||
"top_p": 0.9,
|
||||
"context_management": [
|
||||
{"type": "compaction", "compact_threshold": 200000}
|
||||
],
|
||||
"metadata": {"foo": "bar"},
|
||||
"max_output_tokens": 123,
|
||||
"stream_options": {"include_usage": True},
|
||||
# supported and should be preserved
|
||||
"prompt_cache_key": "session_123",
|
||||
"context_management": [{"type": "compaction", "compact_threshold": 200000}],
|
||||
"truncation": "auto",
|
||||
"previous_response_id": "resp_123",
|
||||
"reasoning": {"effort": "medium"},
|
||||
|
|
@ -143,14 +145,12 @@ class TestChatGPTResponsesAPITransformation:
|
|||
assert "user" not in request
|
||||
assert "temperature" not in request
|
||||
assert "top_p" not in request
|
||||
assert "context_management" not in request
|
||||
assert "metadata" not in request
|
||||
assert "max_output_tokens" not in request
|
||||
assert "stream_options" not in request
|
||||
|
||||
assert request["prompt_cache_key"] == "session_123"
|
||||
assert request["context_management"] == [
|
||||
{"type": "compaction", "compact_threshold": 200000}
|
||||
]
|
||||
assert request["truncation"] == "auto"
|
||||
assert request["previous_response_id"] == "resp_123"
|
||||
assert request["reasoning"] == {"effort": "medium"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue