Skip to content

[misc] release new router version#7798

Merged
zhyncs merged 4 commits intomainfrom
slin/router-patch
Jul 7, 2025
Merged

[misc] release new router version#7798
zhyncs merged 4 commits intomainfrom
slin/router-patch

Conversation

@slin1237
Copy link
Collaborator

@slin1237 slin1237 commented Jul 5, 2025

Motivation

release new router version to kick off CICD

Modifications

  • pyproject.toml

Checklist

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @slin1237, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request is a maintenance release that updates the version of the sglang-router package. The primary goal of this version bump is to initiate the continuous integration and continuous deployment (CI/CD) pipeline for the new router version.

Highlights

  • Version Update: The version of the sglang-router package has been incremented from 0.1.4 to 0.1.5.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request bumps the version of the sglang-router package to 0.1.5 in pyproject.toml. My review identified a version inconsistency: the __version__ attribute in sgl-router/py_src/sglang_router/version.py has not been updated to match. This should be corrected to ensure the package reports its version consistently.

[project]
name = "sglang-router"
version = "0.1.4"
version = "0.1.5"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While you've updated the version here, it seems the version in sgl-router/py_src/sglang_router/version.py is still 0.1.4. This will lead to an inconsistency where the installed package version (e.g., from pip show sglang-router) will be 0.1.5, but sglang_router.__version__ will report 0.1.4.

To ensure consistency, please update the __version__ attribute in sgl-router/py_src/sglang_router/version.py to match this version as well.

Copy link
Collaborator

@ShangmingCai ShangmingCai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The CI fails because of "tokenizer_path" has been changed to derive from the /get_server_info endpoint after #7632, and this endpoint of mini_lb does not contain this key in the first layer of JSON, so I changed it to use prefill infos in #7731. But I find that the /get_server_info endpoint of sgl-router doesn't contain "prefill" like mini_lb, it only contains "decode_servers", so the CI fails.

@ShangmingCai
Copy link
Collaborator

I think you can refactor these impl

@app.get("/get_server_info")
async def get_server_info():
prefill_servers, decode_servers = (
load_balancer.prefill_servers,
load_balancer.decode_servers,
)
prefill_infos = []
decode_infos = []
all_internal_states = []
async with aiohttp.ClientSession() as session:
for server in chain(prefill_servers):
server_info = await session.get(f"{server}/get_server_info")
prefill_infos.append(await server_info.json())
for server in chain(decode_servers):
server_info = await session.get(f"{server}/get_server_info")
info_json = await server_info.json()
decode_infos.append(info_json)
# Extract internal_states from decode servers
if "internal_states" in info_json:
all_internal_states.extend(info_json["internal_states"])
# Return format expected by bench_one_batch_server.py
if all_internal_states:
return {
"internal_states": all_internal_states,
"prefill": prefill_infos,
"decode": decode_infos,
}
else:
# Fallback with dummy data if no internal states found
return {
"internal_states": [
{
"last_gen_throughput": 0.0,
"avg_spec_accept_length": None,
}
],
"prefill": prefill_infos,
"decode": decode_infos,
}
and
server_info = requests.get(base_url + "/get_server_info").json()
if "tokenizer_path" in server_info:
tokenizer_path = server_info["tokenizer_path"]
elif "prefill" in server_info:
tokenizer_path = server_info["prefill"][0]["tokenizer_path"]
tokenizer = get_tokenizer(tokenizer_path)

to align with the usage of https://github.com/sgl-project/sglang/blob/main/sgl-router/src/pd_router.rs#L922-L978 to fix CI.

@zhyncs zhyncs merged commit 3646f6b into main Jul 7, 2025
7 checks passed
@zhyncs zhyncs deleted the slin/router-patch branch July 7, 2025 05:54
chenxijun1029 pushed a commit to chenxijun1029/sglang that referenced this pull request Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants