freshcrate
Skin:/

smg

Engine-agnostic LLM gateway in Rust. Full OpenAI & Anthropic API compatibility across SGLang, vLLM, TRT-LLM, OpenAI, Gemini & more. Industry-first gRPC pipeline, KV cache-aware routing, chat history,

Why this rank:Strong adoptionRelease freshnessHealthy release cadence

Description

Engine-agnostic LLM gateway in Rust. Full OpenAI & Anthropic API compatibility across SGLang, vLLM, TRT-LLM, OpenAI, Gemini & more. Industry-first gRPC pipeline, KV cache-aware routing, chat history, tokenization caching, Responses API, embeddings, WASM plugins, MCP, and multi-tenant auth.

README

SMG Logo

Shepherd Model Gateway

Release Docker PyPI License Docs Discord Slack Ask DeepWiki

High-performance model-routing gateway for large-scale LLM deployments. Centralizes worker lifecycle management, balances traffic across HTTP/gRPC/OpenAI-compatible backends, and provides enterprise-ready control over history storage, MCP tooling, and privacy-sensitive workflows.

SMG Architecture

Why SMG?

๐Ÿš€ Maximize GPU Utilization Cache-aware routing understands your inference engine's KV cache stateโ€”whether SGLang, vLLM, or TensorRT-LLMโ€”to reuse prefixes and reduce redundant computation.
๐Ÿ”Œ One API, Any Backend Route to self-hosted models (SGLang, vLLM, TensorRT-LLM) or cloud providers (OpenAI, Anthropic, Gemini, Bedrock, and more) through a single unified endpoint.
โšก Built for Speed Native Rust with gRPC pipelines, sub-millisecond routing decisions, and zero-copy tokenization. Circuit breakers and automatic failover keep things running.
๐Ÿ”’ Enterprise Control Multi-tenant rate limiting with OIDC, WebAssembly plugins for custom logic, and a privacy boundary that keeps conversation history within your infrastructure.
๐Ÿ“Š Full Observability 40+ Prometheus metrics, OpenTelemetry tracing, and structured JSON logs with request correlationโ€”know exactly what's happening at every layer.

API Coverage: OpenAI Chat/Completions/Embeddings, Responses API for agents, Anthropic Messages, and MCP tool execution.

Quick Start

Install โ€” pick your preferred method:

# Docker
docker pull lightseekorg/smg:latest

# Python
pip install smg

# Rust
cargo install smg

Run โ€” point SMG at your inference workers:

# Single worker
smg --worker-urls http://localhost:8000

# Multiple workers with cache-aware routing
smg --worker-urls http://gpu1:8000 http://gpu2:8000 --policy cache_aware

# With high availability mesh
smg --worker-urls http://gpu1:8000 --enable-mesh \
  --mesh-advertise-host 10.0.0.1 --mesh-peer-urls 10.0.0.2:39527

Use โ€” send requests to the gateway:

curl http://localhost:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "llama3", "messages": [{"role": "user", "content": "Hello!"}]}'

That's it. SMG is now load-balancing requests across your workers.

Supported Backends

Self-Hosted Cloud Providers
vLLM OpenAI
SGLang Anthropic
TensorRT-LLM Google Gemini
Ollama AWS Bedrock
Any OpenAI-compatible server Azure OpenAI

Features

Feature Description
8 Routing Policies cache_aware, round_robin, power_of_two, consistent_hashing, prefix_hash, manual, random, bucket
gRPC Pipeline Native gRPC with streaming, reasoning extraction, and tool call parsing
MCP Integration Connect external tool servers via Model Context Protocol
High Availability Mesh networking with SWIM protocol for multi-node deployments
Chat History Pluggable storage: PostgreSQL, Oracle, Redis, or in-memory
WASM Plugins Extend with custom WebAssembly logic
Resilience Circuit breakers, retries with backoff, rate limiting

Documentation

Getting Started Installation and first steps
Architecture How SMG works
Configuration CLI reference and options
API Reference OpenAI-compatible endpoints
Kubernetes Setup In-cluster discovery and production setup

Contributing

We welcome contributions! See Contributing Guide for details.

Release History

VersionChangesUrgencyDate
v1.4.1## ๐Ÿš€ Shepherd Model Gateway v1.4.1 Released Patch release with **mesh HA stability fix**, **DP rank scheduling**, **reasoning parser fixes**, and engine version bumps. ### Mesh HA Stability Fix **Fixed premature worker removal during rolling deploys:** - Workers synced via mesh with `health: false` were being removed by the health checker before they had a chance to pass local health checks - Fix: health checker now only removes workers whose health check **actually failed this tiHigh4/9/2026
v1.4.0## ๐Ÿš€ Shepherd Model Gateway v1.4.0 Released The biggest SMG release yet -- **Kubernetes-native deployment via Helm**, a **terminal dashboard**, **200x mesh memory reduction**, **7-11x faster multimodal preprocessing**, **native Completion API over gRPC**, and **per-model retry configuration**. ### Kubernetes-Native Deployment with Helm **Production-ready Helm chart for deploying SMG on Kubernetes:** - **One-command deployment** -- `helm install smg oci://ghcr.io/lightseekorg/smg-helHigh4/2/2026
v1.3.3## ๐Ÿš€ Shepherd Model Gateway v1.3.3 Released Major performance release with **7x faster mesh synchronization** and critical bug fixes. ### โšก Mesh Performance Revolution **Switched mesh serialization from JSON to bincode with dramatic performance improvements:** **Benchmark Results** (production workload - 1024 operations, 4000 tokens): - **Serialization**: 7.1x faster (35.5ms โ†’ 5.0ms) - **Deserialization**: 14.8x faster (63.4ms โ†’ 4.3ms) - **Wire size**: 4.3x smaller (67.9MB โ†’ 15.7Low3/21/2026
v1.3.2## ๐Ÿš€ Shepherd Model Gateway v1.3.2 Released Feature release adding **multimodal support to Messages API** and Python mesh bindings. ### ๐ŸŽจ Multimodal Support for Messages API **Complete vision/image support in Messages API gRPC pipeline:** - Native image processing for Messages API requests - Works across all gRPC backends (SGLang, vLLM, TensorRT-LLM) - Full feature parity with Anthropic's Messages API including vision **Impact**: Messages API now supports both text and vision Low3/17/2026
v1.3.1## ๐Ÿš€ Shepherd Model Gateway v1.3.1 Released Minor release with operational improvements and bug fixes. ### ๐Ÿ› ๏ธ New Features **Operational improvements:** - `--remove-unhealthy-workers` flag - Automatically remove workers that fail health checks - `disable_tokenizer_autoload` support - Skip automatic tokenizer loading for custom configurations ### ๐Ÿ› Bug Fixes - **Gateway**: Index external workers by all discovered models (not just primary model) - **CI**: Added VERSION_OVERRLow3/16/2026
v1.3.0## ๐Ÿš€ Shepherd Model Gateway v1.3.0 Released We're excited to announce **Shepherd Model Gateway v1.3.0** โ€“ a major release bringing **native Messages API support** and expanding our agentic workload capabilities. ### ๐ŸŽฏ Messages API: First-Class Implementation **Native Messages API implementation with core protocol support:** credits to @CatherineSue - **True first-class support** โ€” Direct protocol implementation, not a translation layer - **Extended thinking** โ€” Native ThinkingConLow3/15/2026
v1.2.0## ๐Ÿš€ Shepherd Model Gateway v1.2.0 Released! We're thrilled to announce **Shepherd Model Gateway v1.2.0** โ€“ a transformative release featuring **enhanced event-driven cache-aware routing**, **production-ready client SDKs**, **Google Gemini integration**, and **vLLM gRPC server adoption**! ### โšก **Enhanced Event-Driven Cache-Aware Routing** **Inspired by Amazon Dynamo's distributed caching principles**, SMG extends its existing cache-aware routing with real-time KV cache event subscriptLow3/10/2026
v1.1.0## ๐Ÿš€ Shepherd Model Gateway v1.1.0 Released! We're excited to announce **Shepherd Model Gateway v1.1.0** โ€“ a major feature release bringing **universal multimodal support**, **Messages API MCP integration**, and **critical production hardening** across the entire stack! ### ๐ŸŽจ **Universal Multimodal Support** ๐Ÿ”ฅ **Industry-leading multimodal processing across all major inference engines:** - **SGLang gRPC** - Full multimodal pipeline with vision processing - **vLLM gRPC** - Fetch +Low2/23/2026
v1.0.1## ๐ŸŽ‰ Introducing Shepherd Model Gateway v1.0.1! We're thrilled to announce **Shepherd Model Gateway v1.0.1** โ€“ formerly SGLang Model Gateway. This major release marks a new chapter with a complete architectural overhaul, new enterprise features, and production-grade improvements! ### ๐Ÿ‘ **Welcome to Shepherd** **SGLang Model Gateway is now Shepherd Model Gateway (SMG)**. **Truly Engine-Agnostic Architecture**: Shepherd is your universal gateway supporting **all major inference enginLow2/13/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

DaemoraOpen-source AI agent - any LLM, any MCP server, any channel. Self-hosted, autonomous, multi-tenant.2026.1.0-beta.0
agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.v0.1.38
claude-code-proxyMonitor and visualize your Claude Code API interactions with Claude Code Proxy. Easily set up a transparent proxy and live dashboard. ๐Ÿ› ๏ธ๐Ÿš€main@2026-06-06
oh-my-piโŒฅ AI Coding agent for the terminal โ€” hash-anchored edits, optimized tool harness, LSP, Python, browser, subagents, and morev15.9.5
LeanKGLeanKG: Stop Burning Tokens. Start Coding Lean.v0.17.1

More in MCP Servers

PlanExeCreate a plan from a description in minutes
agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.
ProxmoxMCP-PlusEnhanced Proxmox MCP server with advanced virtualization management and full OpenAPI integration.
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.