From 7a57f7c73749e0adfeafcb12b8708cacfdbe3f3e Mon Sep 17 00:00:00 2001 From: vishal-vanam Date: Mon, 13 Apr 2026 18:52:44 -0400 Subject: [PATCH] fix: strip stale Content-Length header in pass-through endpoint after gzip decompression Fixes #25624 --- litellm/proxy/pass_through_endpoints/pass_through_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py index d582240395f..a43fb439bf1 100644 --- a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py @@ -320,7 +320,7 @@ class HttpPassThroughEndpointHelpers(BasePassthroughUtils): litellm_call_id: Optional[str] = None, custom_headers: Optional[dict] = None, ) -> dict: - excluded_headers = {"transfer-encoding", "content-encoding"} + excluded_headers = {"transfer-encoding", "content-encoding", "content-length"} return_headers = { key: value