[Bugfix][Mooncake] Fix MultiConnector stats and proxy SSE responses (#61218)

Signed-off-by: whx-sjtu <xiaowang990929@gmail.com>
Signed-off-by: Nicolò Lucchesi <nicolo.lucchesi@gmail.com>
This commit is contained in:
Hexiang Wang
2026-10-16 17:54:48 +08:00
committed by GitHub
parent 07f3857fb9
commit 9a16d43ef0
5 changed files with 72 additions and 6 deletions
@@ -340,7 +340,10 @@ async def _handle_completions(api: str, request: Request):
):
yield chunk
return StreamingResponse(generate_stream(), media_type="application/json")
media_type = (
"text/event-stream" if req_data.get("stream") else "application/json"
)
return StreamingResponse(generate_stream(), media_type=media_type)
except Exception as e:
import sys