diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index 322691e28b4e..bc0fbdf5c119 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -1619,11 +1619,12 @@ def __next__(self): # noqa: PLR0915 completion_start_time=datetime.datetime.now() ) ## LOGGING - executor.submit( - self.run_success_logging_and_cache_storage, - response, - cache_hit, - ) # log response + if not litellm.disable_streaming_logging: + executor.submit( + self.run_success_logging_and_cache_storage, + response, + cache_hit, + ) # log response choice = response.choices[0] if isinstance(choice, StreamingChoices): self.response_uptil_now += choice.delta.get("content", "") or "" diff --git a/litellm/llms/custom_httpx/http_handler.py b/litellm/llms/custom_httpx/http_handler.py index 36b543086f5a..28b1470e1f27 100644 --- a/litellm/llms/custom_httpx/http_handler.py +++ b/litellm/llms/custom_httpx/http_handler.py @@ -915,7 +915,7 @@ def _create_sync_transport(self) -> Optional[HTTPTransport]: if litellm.force_ipv4: return HTTPTransport(local_address="0.0.0.0") else: - return None + return getattr(litellm, 'sync_transport', None) def get_async_httpx_client(