Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion python/sglang/srt/entrypoints/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,16 @@ async def gen():

@app.get("/get_model_info")
async def get_model_info():
"""Get the model information (deprecated - use /model_info instead)."""
logger.warning(
"Endpoint '/get_model_info' is deprecated and will be removed in a future version. "
"Please use '/model_info' instead."
)
return await model_info()


@app.get("/model_info")
async def model_info():
"""Get the model information."""
result = {
"model_path": _global_state.tokenizer_manager.model_path,
Expand All @@ -492,6 +502,16 @@ async def get_model_info():

@app.get("/get_weight_version")
async def get_weight_version():
"""Get the current weight version (deprecated - use /weight_version instead)."""
logger.warning(
"Endpoint '/get_weight_version' is deprecated and will be removed in a future version. "
"Please use '/weight_version' instead."
)
return await weight_version()


@app.get("/weight_version")
async def weight_version():
"""Get the current weight version."""
return {
"weight_version": _global_state.tokenizer_manager.server_args.weight_version
Expand All @@ -500,7 +520,18 @@ async def get_weight_version():

@app.get("/get_server_info")
async def get_server_info():
# Returns interna states per DP.
"""Get the server information (deprecated - use /server_info instead)."""
logger.warning(
"Endpoint '/get_server_info' is deprecated and will be removed in a future version. "
"Please use '/server_info' instead."
)
return await server_info()


@app.get("/server_info")
async def server_info():
"""Get the server information."""
# Returns internal states per DP.
internal_states: List[Dict[Any, Any]] = (
await _global_state.tokenizer_manager.get_internal_state()
)
Expand Down
Loading