Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
30399cc7
Unverified
Commit
30399cc7
authored
Jan 08, 2026
by
Jee Jee Li
Committed by
GitHub
Jan 07, 2026
Browse files
UX: add vLLM env info in '/server_info' (#31899)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
b89443b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
vllm/entrypoints/serve/instrumentator/server_info.py
vllm/entrypoints/serve/instrumentator/server_info.py
+19
-3
No files found.
vllm/entrypoints/serve/instrumentator/server_info.py
View file @
30399cc7
...
@@ -19,6 +19,19 @@ router = APIRouter()
...
@@ -19,6 +19,19 @@ router = APIRouter()
PydanticVllmConfig
=
pydantic
.
TypeAdapter
(
VllmConfig
)
PydanticVllmConfig
=
pydantic
.
TypeAdapter
(
VllmConfig
)
def
_get_vllm_env_vars
():
from
vllm.config.utils
import
normalize_value
vllm_envs
=
{}
for
key
in
dir
(
envs
):
if
key
.
startswith
(
"VLLM_"
)
and
"KEY"
not
in
key
:
value
=
getattr
(
envs
,
key
,
None
)
if
value
is
not
None
:
value
=
normalize_value
(
value
)
vllm_envs
[
key
]
=
value
return
vllm_envs
@
router
.
get
(
"/server_info"
)
@
router
.
get
(
"/server_info"
)
async
def
show_server_info
(
async
def
show_server_info
(
raw_request
:
Request
,
raw_request
:
Request
,
...
@@ -26,10 +39,13 @@ async def show_server_info(
...
@@ -26,10 +39,13 @@ async def show_server_info(
):
):
vllm_config
:
VllmConfig
=
raw_request
.
app
.
state
.
vllm_config
vllm_config
:
VllmConfig
=
raw_request
.
app
.
state
.
vllm_config
server_info
=
{
server_info
=
{
"vllm_config"
:
str
(
vllm_config
)
"vllm_config"
:
(
str
(
vllm_config
)
if
config_format
==
"text"
if
config_format
==
"text"
else
PydanticVllmConfig
.
dump_python
(
vllm_config
,
mode
=
"json"
,
fallback
=
str
)
else
PydanticVllmConfig
.
dump_python
(
vllm_config
,
mode
=
"json"
,
fallback
=
str
)
),
# fallback=str is needed to handle e.g. torch.dtype
# fallback=str is needed to handle e.g. torch.dtype
"vllm_env"
:
_get_vllm_env_vars
(),
}
}
return
JSONResponse
(
content
=
server_info
)
return
JSONResponse
(
content
=
server_info
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment