[Bugfix][Frontend] Remove async-chunk guard from realtime API (#5383)

Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
Sy03 authored and GitHub committed 2026-07-25 09:20:47 +08:00
1 parent d6240742f3
commit e043818abf
8 files changed
+133 -29

No files matched your search

@@ -1635,22 +1635,6 @@ async def realtime_websocket(websocket: WebSocket):
await duplex_handler.handle_realtime_session(websocket)
return
engine_client = getattr(websocket.app.state, "engine_client", None)
if engine_client is not None and getattr(engine_client, "async_chunk", False):
await websocket.accept()
await websocket.send_json(
{
"type": "error",
"error": (
"The /v1/realtime API is not supported when async_chunk is enabled on the server. "
"Use a stage configuration with async_chunk disabled and restart the server before using "
"this endpoint."
),
"code": "unsupported",
}
)
await websocket.close()
return
serving = getattr(websocket.app.state, "openai_serving_realtime", None)
if serving is None:
await websocket.accept()