[Bugfix] Restore Omni health route ownership (#6723)

Signed-off-by: qujing226 <qujing226@gmail.com>
Signed-off-by: Eugene Zhao <113281545+qujing226@users.noreply.github.com>
This commit is contained in:
Eugene Zhao authored and GitHub committed 2026-09-03 00:54:36 -07:00
1 parent 711daacabf
commit ec22c7ac06
2 files changed
+7 -6

No files matched your search

+1 -5
View File
@@ -513,6 +513,7 @@ async def omni_run_server_worker(listen_address, sock, args, client_config=None,
remove_route_from_app(app, "/v1/chat/completions", {"POST"})
remove_route_from_app(app, "/v1/chat/completions/batch", {"POST"})
remove_route_from_app(app, "/v1/models", {"GET"}) # Remove upstream /v1/models to use omni's handler
remove_route_from_app(app, "/health", {"GET"})
app.include_router(router)
# OMNI: Override upstream exception handlers with Omni-aware versions
@@ -1759,11 +1760,6 @@ async def duplex_websocket(websocket: WebSocket):
# Health and Model endpoints for diffusion mode
# Remove existing health endpoint if present (from vllm imports)
# to ensure our handler takes precedence
_remove_route_from_router(router, "/health")
@router.get("/health")
async def health(raw_request: Request) -> JSONResponse:
"""Health check endpoint that works for both LLM and diffusion modes.