-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[router] Add gRPC E2E test suite #11790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sgl-router/py_test/e2e_grpc/features/test_openai_server_ebnf.py
Outdated
Show resolved
Hide resolved
sgl-router/py_test/e2e_grpc/features/test_openai_server_hidden_states.py
Outdated
Show resolved
Hide resolved
sgl-router/py_test/e2e_grpc/validation/test_large_max_new_tokens.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this by verifying the /v1/models and /v1/chat/completions endpoint first?
I think for advanced features, we don't need cache_report, ebnf, hidden_states yet.
assert len(response.choices[0].message.content) > 0 | ||
|
||
|
||
class TestReasoningContentWithoutParser(CustomTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this test or rename it?
Because it is basically duplicated to test_nonstreaming_separate_reasoning_false
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure removed
import requests | ||
|
||
_TEST_DIR = Path(__file__).parent | ||
sys.path.insert(0, str(_TEST_DIR.parent)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this for all uts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds the e2e_grpc directory to Python's module search path, allowing from util import ... to work
python3 -m pip --no-cache-dir install --upgrade --break-system-packages genai-bench==0.0.2 | ||
pytest -m e2e -s -vv -o log_cli=true --log-cli-level=INFO | ||
- name: Run Python E2E gRPC tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we use another workflow?
to speed things up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good point. we can do that later once the openai router ci is also added
Motivation
The SGLang router supports gRPC connections but lacks end-to-end tests to validate this functionality. This PR adds comprehensive test coverage for gRPC endpoints to ensure reliability and catch regressions.
Modifications
Accuracy Tests
https://github.com/sgl-project/sglang/actions/runs/18694641875/job/53308814787?pr=11790
Benchmarking and Profiling
Checklist