[Enhancement] Engine runtime errors (#2426)

Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
Signed-off-by: Daniel Huang <pilotflyer824@gmail.com>
Signed-off-by: bjf-frz <frz123db@gmail.com>
Co-authored-by: Chenguang Zheng <645327136@qq.com>
Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: bjf-frz <frz123db@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-04-21 14:46:05 +08:00
1 parent c1ba86ab5b
commit 52b53367ef
23 files changed
+1597 -98

No files matched your search

@@ -407,6 +407,29 @@ def test_health_endpoint_no_engine():
assert data["status"] == "unhealthy"
def test_health_endpoint_dead_engine():
"""Health returns 503 when the engine raises EngineDeadError."""
from unittest.mock import AsyncMock
from fastapi import FastAPI
from vllm.v1.engine.exceptions import EngineDeadError
from vllm_omni.entrypoints.openai.api_server import router
app = FastAPI()
app.include_router(router)
dead_engine = AsyncMock()
dead_engine.check_health = AsyncMock(side_effect=EngineDeadError())
app.state.engine_client = dead_engine
client = TestClient(app)
response = client.get("/health")
assert response.status_code == 503
data = response.json()
assert data["status"] == "unhealthy"
def test_models_endpoint(test_client):
"""Test /v1/models endpoint for diffusion mode"""
response = test_client.get("/v1/models")