A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 11:00 UTC
Add missing content type headers to /ping and /health (#17036) (#17786)
Signed-off-by: Ximo Guanter <ximo.guanter@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Ximo Guanter committed
May 10, 2025 at 08:13 UTC
fc4441a4ee99741ca81ae92f006b531138eea257
2 files changed
+5
-5
tests/entrypoints/openai/test_openai_schema.py
+2
-2
@@ -44,6 +44,6 @@ schema = schemathesis.from_pytest_fixture("get_schema")
44
45
@schema.parametrize()
46
@schema.override(headers={"Content-Type": "application/json"})
47
-async def test_openapi_stateless(case):
47
+def test_openapi_stateless(case: schemathesis.Case):
48
#No need to verify SSL certificate for localhost
49
- await case.call_and_validate(verify=False)
49
+ case.call_and_validate(verify=False)
vllm/entrypoints/openai/api_server.py
+3
-3
@@ -390,10 +390,10 @@ def engine_client(request: Request) -> EngineClient:
390
391
392
@router.get("/health")
393
-async def health(raw_request: Request) -> Response:
393
+async def health(raw_request: Request) -> JSONResponse:
394
"""Health check."""
395
await engine_client(raw_request).check_health()
396
- return Response(status_code=200)
396
+ return JSONResponse(content={}, status_code=200)
397
398
399
@router.get("/load")
@@ -415,7 +415,7 @@ async def get_server_load_metrics(request: Request):
415
416
417
@router.api_route("/ping", methods=["GET", "POST"])
418
-async def ping(raw_request: Request) -> Response:
418
+async def ping(raw_request: Request) -> JSONResponse:
419
"""Ping check. Endpoint required for SageMaker"""
420
return await health(raw_request)
421