Merge pull request #14816 from leventov/no-streaming-logging

Fix concurrency/scaling when many Python threads do streaming using *sync* completions
This commit is contained in:
Krish Dholakia
2025-09-23 22:53:18 -07:00
committed by GitHub
2 changed files with 7 additions and 6 deletions
@@ -1619,11 +1619,12 @@ class CustomStreamWrapper:
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 ""
+1 -1
View File
@@ -935,7 +935,7 @@ class HTTPHandler:
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(