mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
refactor(router): drop redundant ttft deadline guard
asyncio.wait_for already raises TimeoutError for a non-positive timeout, so the explicit remaining<=0 check duplicated wait_for's own behavior. Removing it keeps the same observable result (litellm.Timeout via the except clause) and lets wait_for return an already-ready chunk instead of spuriously timing out.
This commit is contained in:
parent
adeb27dba6
commit
6f87b4e649
1 changed files with 0 additions and 2 deletions
|
|
@ -2917,8 +2917,6 @@ class Router:
|
|||
chunk = await aiter.__anext__()
|
||||
else:
|
||||
remaining = deadline - loop.time()
|
||||
if remaining <= 0:
|
||||
raise asyncio.TimeoutError
|
||||
chunk = await asyncio.wait_for(
|
||||
aiter.__anext__(), timeout=remaining
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue