From b3562fa9ccc2a5af575652acb256e719d7bc4eed Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 19 Jun 2026 12:43:03 -0400 Subject: [PATCH] fix: store ssl_verify on AsyncHTTPHandler and forward it in retry paths --- litellm/llms/custom_httpx/http_handler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/litellm/llms/custom_httpx/http_handler.py b/litellm/llms/custom_httpx/http_handler.py index 01c94476431..6786ef62061 100644 --- a/litellm/llms/custom_httpx/http_handler.py +++ b/litellm/llms/custom_httpx/http_handler.py @@ -527,6 +527,7 @@ class AsyncHTTPHandler: ): self.timeout = timeout self.event_hooks = event_hooks + self.ssl_verify = ssl_verify self.client = self.create_client( timeout=timeout, event_hooks=event_hooks, @@ -649,7 +650,7 @@ class AsyncHTTPHandler: except (httpx.RemoteProtocolError, httpx.ConnectError): # Retry the request with a new session if there is a connection error new_client = self.create_client( - timeout=timeout, event_hooks=self.event_hooks + timeout=timeout, event_hooks=self.event_hooks, ssl_verify=self.ssl_verify ) try: return await self.single_connection_post_request( @@ -712,7 +713,7 @@ class AsyncHTTPHandler: except (httpx.RemoteProtocolError, httpx.ConnectError): # Retry the request with a new session if there is a connection error new_client = self.create_client( - timeout=timeout, event_hooks=self.event_hooks + timeout=timeout, event_hooks=self.event_hooks, ssl_verify=self.ssl_verify ) try: return await self.single_connection_post_request( @@ -773,7 +774,7 @@ class AsyncHTTPHandler: except (httpx.RemoteProtocolError, httpx.ConnectError): # Retry the request with a new session if there is a connection error new_client = self.create_client( - timeout=timeout, event_hooks=self.event_hooks + timeout=timeout, event_hooks=self.event_hooks, ssl_verify=self.ssl_verify ) try: return await self.single_connection_post_request( @@ -834,7 +835,7 @@ class AsyncHTTPHandler: except (httpx.RemoteProtocolError, httpx.ConnectError): # Retry the request with a new session if there is a connection error new_client = self.create_client( - timeout=timeout, event_hooks=self.event_hooks + timeout=timeout, event_hooks=self.event_hooks, ssl_verify=self.ssl_verify ) try: return await self.single_connection_post_request(