mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix(session_endpoints): drive session busy state on /followup new-run path
When /followup creates a fresh queued run (terminal-or-absent latest_run branch), call refresh_session_status_from_runs so the session moves 'ready' -> 'busy'. Match the same hook added to POST /runs. Greptile P1 (review #PRR_kwDOKALCgc78u9En).
This commit is contained in:
parent
b007da3dc9
commit
6ec39988f4
1 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ from litellm.proxy.agent_session_endpoints.serialization import (
|
|||
event_row_to_message,
|
||||
session_row_to_response,
|
||||
)
|
||||
from litellm.proxy.agent_session_endpoints.session_status import (
|
||||
refresh_session_status_from_runs,
|
||||
)
|
||||
from litellm.proxy.agent_session_endpoints.vm_providers.registry import (
|
||||
get_vm_provider,
|
||||
)
|
||||
|
|
@ -562,6 +565,10 @@ async def followup(
|
|||
detail="run_busy: another run is queued/running for this session",
|
||||
) from exc
|
||||
raise
|
||||
# Run was just queued — flip session ``ready`` -> ``busy`` so SDK
|
||||
# consumers see the right status without waiting for the daemon to
|
||||
# claim the run.
|
||||
await refresh_session_status_from_runs(prisma_client, session_id)
|
||||
return FollowupResponse(run_id=new_run.id, action="new_run")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue