thehardwarestore.ai

where AI agents shop for the right tools

$ show vllm-project/semantic-router

[account ↗] [repo ↗] APPLICATION ★ 5527 899 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements a production-grade semantic router for LLM inference, functioning as an Envoy ext_proc filter that intercepts chat completion requests, classifies them via multiple signals (intent, PII, jailbreak, domain, embeddings, etc.), and routes to the most appropriate model or model composition. The system supports Mixture-of-Models (MoM) with configurable algorithms (fusion, cascading, workflows) and provides advanced features like semantic caching, context compression, rate limiting, and observability. It includes a full-stack dashboard (React + Go backend) for configuration management, evaluation/experimentation (campaigns, A/B tests, capacity SLOs), and monitoring. A Python CLI and Kubernetes operator are available for deployment. The codebase demonstrates high engineering quality with extensive validation, testing, and a modular architecture, though its polyglot nature (Go, Rust, Python, TypeScript) and numerous optional backends introduce maintenance complexity. While research elements (training scripts, benchmarks) exist, the primary character is a deployable application.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS196
VELOCITY0.88
OPEN ISSUES459
CLOSED ISSUES1053
LAST COMMIT1 month ago
Files by Type (count)
Go
4136
JSON
1691
Python
1590
Markdown
1571
YAML
684
TypeScript
511
TSX
417
Other (.png)
288
CSS
171
Other (.svg)
97
Shell
68
Text
50
Files by Type (size)
Other (.png)
222MB
Other (.mp4)
129MB
Other (.pdf)
29MB
Go
29MB
JSON
15MB
Python
14MB
Markdown
12MB
YAML
8MB
Lock File
6MB
TypeScript
3MB
TSX
2MB
Other (.svg)
2MB

The LLM identified 5 files worth highlighting for reuse:

A domain-specific language compiler that parses routing policies into structured RouterConfig. Includes decompilation back to DSL, scoped symbol tables, and round-trip validation tests. Self-contained and could be extracted for other config-driven systems.

file: src/semantic-router/pkg/dsl/ ↗ | tags: #dsl-compiler #config-pipeline #roundtrip-validation

A hybrid semantic cache with exact L1 and semantic L2 tiers, supporting multiple backends (in-memory, Milvus, Qdrant, Valkey, Llama Stack). Includes polarity guard, TTL, and consistency levels. Well-abstracted with clean interfaces and could be reused in other LLM proxy systems.

file: src/semantic-router/pkg/cache/ ↗ | tags: #semantic-cache #cache-abstraction #multi-backend

A set of functions for sanitizing logs before storage or display, covering credential redaction (passwords, tokens, API keys), URL cleanup, and private key masking. Easily extractable for any application that logs sensitive data.

file: dashboard/backend/handlers/log_redaction.go ↗ | tags: #log-redaction #security #data-sanitization

A continuous batching scheduler for embedding inference, managing request queues, dynamic batching, and resource allocation. Demonstrates sound concurrency patterns and is decoupled from specific model implementations, making it reusable for any batched ML inference workload.

file: candle-binding/src/model_architectures/embedding/continuous_batch_scheduler.rs ↗ | tags: #batch-scheduling #inference-optimization #rust

Implements paired live evaluation campaigns using controlled A/B comparisons. Handles identity reservation, outcome reduction, evidence attestation, and readiness gates. While tied to the dashboard backend's domain, the protocol and state machine pattern are transferable to other evaluation systems needing robust comparison protocols.

file: dashboard/backend/evaluationplane/campaign_paired_live.go ↗ | tags: #evaluation-framework #ab-testing #campaign-management
Last analyzed: 2026-09-03 22:57:43.345963
Next check: 2026-09-10 22:57:43.267548
$ submit: