mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
Update litellm/proxy/common_request_processing.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
9fc9e433f2
commit
d2c0585f7c
1 changed files with 2 additions and 2 deletions
|
|
@ -1235,15 +1235,15 @@ class ProxyBaseLLMRequestProcessing:
|
|||
# upstream connection is established; the ASGI transport layer handles
|
||||
# cancellation of the upstream when the client disconnects mid-stream.
|
||||
responses = await llm_responses
|
||||
disconnect_task.cancel()
|
||||
except asyncio.CancelledError:
|
||||
disconnect_task.cancel()
|
||||
if disconnect_event.is_set():
|
||||
raise HTTPException(
|
||||
status_code=499,
|
||||
detail="Client disconnected the request",
|
||||
)
|
||||
raise
|
||||
finally:
|
||||
disconnect_task.cancel()
|
||||
|
||||
response = responses[1]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue