-
Notifications
You must be signed in to change notification settings - Fork 302
[Feat] Implement VSR CLI tool for better user experience #757
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
base: main
Are you sure you want to change the base?
Conversation
…llm-project#713) Fixes two critical bugs causing keyword routing E2E test failures: 1. **Config merge bug**: Embedded struct assignment in reconciler didn't copy IntelligentRouting fields correctly. Changed to explicit field-by-field copy to ensure keyword rules are properly loaded from CRDs. 2. **Cache hit headers bug**: Cache responses used ImmediateResponse which bypassed normal header processing, causing VSR decision headers to be missing. Added vsrDecisionName parameter to CreateCacheHitResponse() to include x-vsr-selected-decision header in cached responses. **Test Results:** - keyword-routing: 16.67% -> 100% - rule-condition-logic: 33.33% -> 83.33% (remaining failure is unrelated) Fixes vllm-project#713 Signed-off-by: Srinivas A <[email protected]>
Implements the initial version of the VSR CLI with the following commands: config, deploy, get, install, logs, status, test-prompt. - Added Cobra-based CLI structure - Implemented configuration management - Added deployment support for Local, Docker, and Kubernetes - Added documentation in website/docs/cli
…ssue vllm-project#234) Completes the VSR CLI tool implementation with all remaining commands, comprehensive test coverage, and full documentation. - Added model management commands (list, info, validate, remove, download) - Added debug and diagnostics commands (debug, health, diagnose) - Added monitoring commands (dashboard, metrics) - Added utility commands (completion, upgrade, undeploy) - Implemented Helm deployment support (4th deployment environment) - Added comprehensive test coverage (15 test files, 109 test functions, 93+ test cases) - Created detailed documentation (README, quick start guide, test coverage report) - Enhanced deployment lifecycle with graceful shutdown and health checks - Implemented multi-environment auto-detection for status and logs - Added shell completion support for bash, zsh, fish, and powershell Signed-off-by: Srinivas A <[email protected]>
Updates the main README with detailed VSR CLI usage instructions, replacing the previous brief CLI section with comprehensive guidance. - Added installation instructions with verification step - Added quick start guide (4 commands to deploy) - Listed key features (multi-environment, model management, monitoring) - Provided common command examples with descriptions - Added links to detailed CLI documentation and quick start guide This provides users with a clear entry point to the VSR CLI tool and highlights its capabilities for simplified deployment and management. Signed-off-by: Srinivas A <[email protected]>
This commit addresses 6 critical issues identified during code review, plus build improvements for better user experience. Critical fixes: - Issue vllm-project#1: PID file race condition - kill router process if PID file write fails to prevent untrackable processes - Issue vllm-project#2: Cross-platform compatibility - replace hardcoded /tmp paths with os.TempDir() and add user-specific suffixes using os.Getuid() - Issue vllm-project#3: Signal handling - add graceful shutdown for port-forward process on Ctrl+C to prevent orphaned kubectl processes - Issue vllm-project#4: HTTP timeout - add 30-second timeout to prevent hanging requests in test command - Issue vllm-project#5: Security - restrict log/PID file permissions to 0600 - Issue vllm-project#6: Input validation - enforce 10k character limit on prompts Build improvements: - Embed library path using -ldflags="-r" to eliminate need for users to manually set LD_LIBRARY_PATH when running vsr binary Files modified: - src/semantic-router/pkg/cli/deployment/deployment.go - src/semantic-router/pkg/cli/deployment/upgrade.go - src/semantic-router/cmd/vsr/commands/dashboard.go - src/semantic-router/cmd/vsr/commands/test.go - tools/make/build-run-test.mk - src/semantic-router/pkg/cli/deployment/deployment_test.go All fixes have been verified with standalone test programs. Signed-off-by: Srinivas A <[email protected]>
Add unit tests to verify all 6 critical production fixes implemented in the previous commit. Tests ensure cross-platform compatibility, security, and robustness of the VSR CLI tool. Test coverage added: - Cross-platform path handling (Issue vllm-project#2) * Absolute path validation * User-specific path generation * Temp directory usage - PID file management and security (Issues vllm-project#1, vllm-project#5) * PID file race condition handling * Process termination on write failure * Restrictive 0600 file permissions * Proper cleanup on exit - HTTP client timeout (Issue vllm-project#4) * 30-second timeout prevents hanging * Fast responses unaffected * Timeout configuration validation - Input validation (Issue vllm-project#6) * 10k character limit enforcement * Boundary condition testing - Signal handling (Issue vllm-project#3) * Graceful shutdown on interrupt * Process cleanup verification * No orphaned processes All tests compile and validate the production fixes. Signed-off-by: Srinivas A <[email protected]>
Replace 'Issue #X' comments with clear, descriptive explanations of test functionality to improve code maintainability and prevent confusion with GitHub issue tracking. Remove generated test coverage report. Signed-off-by: Srinivas A <[email protected]>
Signed-off-by: Srinivas A <[email protected]>
Ignore the config/config.yaml file as it is generated by 'vsr init' and contains environment-specific settings. This prevents accidental commits of local or sensitive configuration. Signed-off-by: Srinivas A <[email protected]>
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|

Close #234
-swhen doinggit commit[Bugfix],[Feat], and[CI].Detailed Checklist (Click to Expand)
Thank you for your contribution to semantic-router! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:
[Bugfix]for bug fixes.[CI/Build]for build or continuous integration improvements.[Doc]for documentation fixes and improvements.[Feat]for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).[Router]for changes to thevllm_router(e.g., routing algorithm, router observability, etc.).[Misc]for PRs that do not fit the above categories. Please use this sparingly.Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:
pre-committo format your code. SeeREADME.mdfor installation.DCO and Signed-off-by
When contributing changes to this project, you must agree to the DCO. Commits must include a
Signed-off-by:header which certifies agreement with the terms of the DCO.Using
-swithgit commitwill automatically add this header.What to Expect for the Reviews