@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 30399cc725
Fork 0

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 10, 14:00 UTC

UX: add vLLM env info in '/server_info' (#31899)

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>

Jee Jee Li committed Jan 8, 2026 at 01:13 UTC 30399cc725306deff10169ae395864e70b8ab2ba
1 file changed +19 -3
vllm/entrypoints/serve/instrumentator/server_info.py
+19 -3
@@ -19,6 +19,19 @@ router = APIRouter()
19 PydanticVllmConfig = pydantic.TypeAdapter(VllmConfig)
20
21
22 +def _get_vllm_env_vars():
23 + from vllm.config.utils import normalize_value
24 +
25 + vllm_envs = {}
26 + for key in dir(envs):
27 + if key.startswith("VLLM_") and "KEY" not in key:
28 + value = getattr(envs, key, None)
29 + if value is not None:
30 + value = normalize_value(value)
31 + vllm_envs[key] = value
32 + return vllm_envs
33 +
34 +
35 @router.get("/server_info")
36 async def show_server_info(
37 raw_request: Request,
@@ -26,10 +39,13 @@ async def show_server_info(
39 ):
40 vllm_config: VllmConfig = raw_request.app.state.vllm_config
41 server_info = {
29 - "vllm_config": str(vllm_config)
30 - if config_format == "text"
31 - else PydanticVllmConfig.dump_python(vllm_config, mode="json", fallback=str)
42 + "vllm_config": (
43 + str(vllm_config)
44 + if config_format == "text"
45 + else PydanticVllmConfig.dump_python(vllm_config, mode="json", fallback=str)
46 + ),
47 # fallback=str is needed to handle e.g. torch.dtype
48 + "vllm_env": _get_vllm_env_vars(),
49 }
50 return JSONResponse(content=server_info)
51