Skip to content

Commit c044ec3

Browse files
fix(openai-responses): strip cache_control on compact endpoint as well
Co-authored-by: Yassin Kortam <[email protected]>
1 parent acba553 commit c044ec3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

litellm/llms/openai/responses/transformation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,12 @@ def transform_compact_response_api_request(
648648
url = str(parsed_url.copy_with(path=compact_path))
649649

650650
input = self._validate_input_param(input)
651+
tools = response_api_optional_request_params.get("tools")
652+
input, tools = self.remove_cache_control_flag_from_input_and_tools(
653+
model=model, input=input, tools=tools
654+
)
655+
if tools is not None:
656+
response_api_optional_request_params["tools"] = tools
651657
data = dict(
652658
ResponsesAPIRequestParams(
653659
model=model, input=input, **response_api_optional_request_params

0 commit comments

Comments
 (0)