Skip to content

JAiRouter

Doc Version: 1.0.0 Last Updated: 2026-08-15 Git Commit: b1088a7e Author: Lincoln

AI Model Service Unified Gateway
Connect to all models with a single line of code

Quick StartConfigurationGitHub


🎯 Core Value

FeatureDescription
🔌 Unified APIOpenAI-compatible interface, seamlessly connect to Ollama, vLLM, GPUStack, etc.
⚖️ Smart Load Balancing5 strategies for automatic request distribution, health checks to remove failed nodes
🛡️ Traffic ControlRate limiting, circuit breaking, degradation for service stability
🔐 Dual AuthenticationJWT + API Key with audit logs and blacklist support
📊 Full-chain TracingOpenTelemetry integration, performance bottlenecks at a glance
💾 State PersistenceRedis / file storage, supports high-availability cluster deployment
🎫 Token Quota & Multi-dimensional LimitingLedger across dimensions (tenant / API Key / user / service / model) × four windows (minute / hour / day / month), with Redis distributed counting and failover; disabled by default
🔗 Multi-protocol EntryOpenAI-native /v1 and Anthropic /v1/messages served directly, so Claude Code can connect as-is (including tool calls)
⚡ Response CacheExact-key and streaming SSE caching; cache hits do not consume downstream quota and can be invalidated on demand

Management Console


🏗️ Architecture Overview

┌─────────────────┐     ┌─────────────────────┐     ┌─────────────────┐
│   OpenAI SDK    │────▶│     JAiRouter       │────▶│    Ollama       │
│   Langchain     │     │  • Load Balancing   │     │    vLLM         │
│   HTTP Client   │     │  • Rate Limiting    │     │    GPUStack     │
└─────────────────┘     │  • Authentication   │     │    Xinference   │
                        └─────────────────────┘     └─────────────────┘

⚡ 1-Minute Quick Start

# Start the service (dev mode, zero config)
docker run -d --name jairouter -p 8080:8080 -e SPRING_PROFILES_ACTIVE=dev sodlinken/jairouter:latest

# For production, also provide JWT_SECRET and INITIAL_ADMIN_PASSWORD (at least 32 characters / a strong password), otherwise the process exits at startup

# Access the console
open http://localhost:8080

📚 Quick Navigation

I want to...Recommended Docs
Get started quicklyQuick Start Guide
Deploy in productionDeployment Guide
Configure servicesConfiguration Guide
Integrate via APIAPI Reference
Set up monitoringMonitoring Guide
Troubleshoot issuesTroubleshooting

📈 Project Status

GitHub starsDocker PullsLicense

Current Release: v3.3.5 (2026-10-17)


🔧 Supported Backends

BackendDescription
GPUStackGPUStack private model service
OllamaLocal LLM runtime
vLLMHigh-performance LLM inference engine
XinferenceDistributed model inference framework
LocalAIOpenAI-compatible local inference
OpenAIOfficial OpenAI API

🤝 Community Support


If JAiRouter helps you, please give it a ⭐️ Star!