mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
fix(proxy): share the parallel-request slot with the SSE keepalive task
This commit is contained in:
parent
8bbe7edb71
commit
be3193a298
1 changed files with 7 additions and 0 deletions
|
|
@ -1218,6 +1218,13 @@ async def open_sse_before_first_byte(
|
|||
if interval is None:
|
||||
return await produce_response
|
||||
|
||||
# The slot record must exist before this task is forked, or the release
|
||||
# looks in the original task and never sees it.
|
||||
from litellm.proxy.hooks.parallel_request_limiter_v3 import (
|
||||
get_or_create_request_stash,
|
||||
)
|
||||
|
||||
get_or_create_request_stash()
|
||||
produce_task: Final = asyncio.ensure_future(produce_response)
|
||||
await asyncio.wait((produce_task,), timeout=interval)
|
||||
if produce_task.done():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue