Migrate all callers from /get_server_info to /server_info (#21463)

This commit is contained in:
David Cheung
2026-04-01 21:17:50 -07:00
committed by GitHub
parent 24997fe42c
commit ed427e1299
48 changed files with 74 additions and 70 deletions
+2 -2
View File
@@ -1402,7 +1402,7 @@ async def benchmark(
if "sglang" in backend:
server_info = requests.get(
base_url + "/get_server_info", headers=get_auth_headers()
base_url + "/server_info", headers=get_auth_headers()
)
if server_info.status_code == 200:
server_info_json = server_info.json()
@@ -1538,7 +1538,7 @@ async def benchmark(
print("{:<40} {:<10.2f}".format("Max ITL (ms):", metrics.max_itl_ms))
print("=" * 50)
resp = requests.get(base_url + "/get_server_info", headers=get_auth_headers())
resp = requests.get(base_url + "/server_info", headers=get_auth_headers())
server_info = resp.json() if resp.status_code == 200 else None
if (
@@ -67,7 +67,7 @@ class RuntimeEndpoint(BaseBackend):
def get_server_info(self):
res = http_request(
self.base_url + "/get_server_info",
self.base_url + "/server_info",
api_key=self.api_key,
verify=self.verify,
)
@@ -531,7 +531,7 @@ class Runtime:
async def get_server_info(self):
async with aiohttp.ClientSession() as session:
async with session.get(f"{self.url}/get_server_info") as response:
async with session.get(f"{self.url}/server_info") as response:
if response.status == 200:
return await response.json()
else:
+1 -1
View File
@@ -42,7 +42,7 @@ def run_profile(
# Dump server args.
file_path = Path(output_dir) / "server_args.json"
if not file_path.exists():
response = requests.get(url + "/get_server_info")
response = requests.get(url + "/server_info")
response.raise_for_status()
server_args_data = response.json()
with open(file_path, "w") as file:
@@ -609,7 +609,7 @@ def run_one_case(
last_gen_throughput = -1
acc_length = -1
else:
response = requests.get(url + "/get_server_info", timeout=DEFAULT_TIMEOUT)
response = requests.get(url + "/server_info", timeout=DEFAULT_TIMEOUT)
response.raise_for_status()
server_info = response.json()
internal_state = server_info.get("internal_states", [{}])
@@ -793,7 +793,7 @@ def run_benchmark_internal(
skip_max_running_requests_threshold = float("inf")
else:
model_name = None
response = requests.get(base_url + "/get_server_info", timeout=DEFAULT_TIMEOUT)
response = requests.get(base_url + "/server_info", timeout=DEFAULT_TIMEOUT)
response.raise_for_status()
server_info = response.json()
if "tokenizer_path" in server_info:
+1 -1
View File
@@ -221,7 +221,7 @@ async def _send_round(
def _get_page_size(base_url: str) -> int:
"""Query server for page_size used by radix cache."""
try:
resp = requests.get(f"{base_url}/get_server_info", timeout=10)
resp = requests.get(f"{base_url}/server_info", timeout=10)
resp.raise_for_status()
info = resp.json()
return info.get("page_size", 1)
+2 -2
View File
@@ -208,7 +208,7 @@ def test_input_output_logprobs_match_helper(
def test_input_output_logprobs_match_prefill_cache_hit_helper(
base_url, ACC_THRESHOLDS, model_name, max_samples=None, max_new_tokens=8192
):
server_info = requests.get(base_url + "/get_server_info").json()
server_info = requests.get(base_url + "/server_info").json()
if server_info["disable_radix_cache"]:
print("Radix cache is disabled, skipping test")
return
@@ -261,7 +261,7 @@ def test_input_output_logprobs_match_prefill_cache_hit_helper(
def test_input_output_logprobs_match_decode_cache_hit_helper(
base_url, ACC_THRESHOLDS, model_name, max_samples=None, max_new_tokens=8192
):
server_info = requests.get(base_url + "/get_server_info").json()
server_info = requests.get(base_url + "/server_info").json()
if server_info["disable_radix_cache"]:
print("Radix cache is disabled, skipping test")
return
+1 -1
View File
@@ -324,7 +324,7 @@ class NightlyBenchmarkRunner:
The average speculative decoding accept length, or None if not available.
"""
try:
response = requests.get(f"{self.base_url}/get_server_info", timeout=10)
response = requests.get(f"{self.base_url}/server_info", timeout=10)
if response.status_code == 200:
server_info = response.json()
internal_states = server_info.get("internal_states", [])