vllm-sr
vLLM Semantic Router - Intelligent routing for Mixture-of-Models
What it is and what it does
vLLM Semantic Router is a request router for systems that serve multiple large language models. It intercepts incoming requests, classifies them by semantic intent using signals (domains, keywords, embeddings), and forwards them to the appropriate model based on routing rules you define. The package provides a CLI that starts a local Docker-based stack including the router, an Envoy proxy, a web dashboard, and a fleet simulator, plus support for deploying the same configuration to Kubernetes via Helm.
The router exposes a chat completions API and integrates with observability tools (Jaeger, Prometheus, Grafana) for tracing and metrics. Configuration is YAML-first; you define listeners, model providers, routing decisions, and optional plugins (caching, memory, system prompt injection, hallucination detection) in a canonical config file. The dashboard persists state locally and can run multiple isolated stacks on the same machine using environment variables to offset ports and isolate container names.
Use it for:
- Route domain-specific queries (e.g., economics questions) to specialized models trained on that domain
- Load-balance requests across multiple models to reduce latency and cost by selecting the smallest model that can handle each request
- Cache semantically similar requests to avoid redundant LLM calls and improve response time
- Deploy a multi-model inference system to Kubernetes with automatic credential handling and observability built in
- Test and validate routing decisions interactively via the CLI (vllm-sr eval) before deploying to production
- Monitor model usage, latency, and routing decisions through embedded Grafana dashboards and Prometheus metrics
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Routes LLM requests to appropriate models in a mixture-of-models setup based on semantic intent classification, with a CLI for local Docker deployment, Kubernetes support, and a web dashboard for monitoring and testing.
Yes, if you need to route requests across multiple LLM models and want a batteries-included solution with dashboard, observability, and Kubernetes support. The low install friction and active maintenance are positive signals. Verify first whether you need the full Docker/Kubernetes stack or if a lighter routing library would suffice, and confirm that the package supports your deployment model (local Docker, Kubernetes, or programmatic library use).
Install
vllm-sr on PyPI
pip
pip install vllm-sruv
uv add vllm-srpoetry
poetry add vllm-srInstalling vllm-sr
Before you install
Low install friction with a pure-Python wheel and standard dependencies. Active maintenance as of 70 days ago with support for Python 3.10–3.12. Docker is required for the local serve command on Linux, macOS, or WSL2; native Windows Python environments can use the CLI for configuration only.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and note material changes.
Quickstart
# Install
pip install vllm-sr
# Start the router (requires Docker on Linux/macOS/WSL2)
export HF_TOKEN=hf_xxx
vllm-sr serve
# In another terminal, evaluate a prompt
vllm-sr eval --prompt "Explain inflation vs recession in plain English."
# Or send a chat message through the router
vllm-sr chat "hello"
Docker is required on Linux, macOS, or WSL2 to run `vllm-sr serve`; native Windows Python environments can use the CLI for configuration and validation only. Python >= 3.10 is required.
Verify before relying
- Whether the package works as a library (programmatic API) or is primarily a CLI tool
- Performance characteristics and latency overhead of the routing layer
- Whether Kubernetes deployment requires a running vLLM cluster or if it manages model serving
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — click, pyyaml, jinja2, requests, pydantic, huggingface_hub |
| Maintenance | actively maintained — 70 days since the last release |
| First released | |
| Downloads | 75,567/month — #14,701 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vllm_sr-0.3.0-py3-none-any.whl
Keywords: vllm, semantic-router, llm, routing, caching
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
semantic-routerSemantic Router routes LLM requests to…
permissive · top 15,000 on PyPI
vllm-routerRoutes and load-balances requests across vLLM…
permissive · top 15,000 on PyPI
sglang-routerA high-performance Rust-based load balancer and…
permissive · top 15,000 on PyPI
vllmvLLM is a high-throughput inference and serving…
permissive · top 5,000 on PyPI
vllm-tpuvllm-tpu is a high-throughput LLM inference and…
permissive · top 15,000 on PyPI
chatlasChatlas provides a unified Python interface for…
permissive · top 15,000 on PyPI
jupyter-ai-routerProvides the core message routing layer for…
permissive · top 15,000 on PyPI
litellm-enterpriseLiteLLM Enterprise provides a unified Python…
unclear · top 5,000 on PyPI
llama-index-llms-openaiIntegrates OpenAI's language models into…
permissive · top 1,000 on PyPI