skillfed

vllm-sr

vLLM Semantic Router - Intelligent routing for Mixture-of-Models

vllm-sr v0.3.0 75.6K downloads/30d#14,701 on PyPI
Permissive license Apache-2.0 Active released

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-sr

uv

uv add vllm-sr

poetry

poetry add vllm-sr

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12

Tags

llm request routingmixture of models routersemantic intent classificationmulti-model load balancingllm model selectionintelligent request dispatchervllm routing
llm-routingkubernetes-readyobservability-included

More Artificial Intelligence packages

Further reading