Stars
Forks
Watchers
Developer links
KeiRouter
One endpoint, 130+ models from 90+ providers: KeiRouter is a self-hosted AI gateway, so apps, coding tools, and agents connect once and stop juggling provider keys. Your code speaks OpenAI Chat, OpenAI Responses, Anthropic Messages, or native Gemini, and KeiRouter translates to whichever upstream you want, including AWS Bedrock, Azure AI Foundry, Vertex, Snowflake Cortex, and self-hosted runtimes like Ollama and vLLM. Fallback chains keep requests moving when a provider goes down or hits a rate limit, using priority, round-robin, latency, or cost ordering, so coding sessions do not stop mid-task. Five token savers compress prompts on the way in and trim responses on the way out, with a live dashboard showing savings recovered. A response cache answers repeated prompts instantly for zero marginal cost, with optional semantic matching. Per-key budgets and rate plans set USD, token, RPM, and concurrency limits with auto-cutoff, stopping surprise bills. Guardrails scan for PII, prompt injection, toxicity, and banned topics at global, provider, model, chain, and key scopes, with a monitor showing what got blocked and what it cost. The dashboard tracks usage by provider and model, latency, a live console tracing each request through its fallbacks, and provider health. You can import from 9router or OmniRoute, white-label the portal for your team, and run replicas on Postgres and Redis for high availability. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- One Endpoint, Every Model
- Applications and coding tools connect once through a single base URL speaking OpenAI Chat, Responses, Anthropic Messages, or Gemini APIs, and the gateway translates requests across 130+ models from 90+ cloud, enterprise, and self-hosted providers.
- Fallback Chains Keep Working
- Priority, round-robin, latency, and cost-ordered chains reroute traffic automatically when a provider fails, rate limits, or slows down, with provider health telemetry and synthetic probes showing uptime and p95 latency history for every upstream account.
- Budgets and Token Savers
- Per-key USD and token hard limits with auto-cutoff combine with per-key rate plans for RPM, tokens per minute, and concurrency, plus five token savers and a live savings dashboard, keeping gateway spend predictable and auditable.
- Guardrails and Tamper-Evident Auditing
- PII, injection, toxicity, topic, and bias detectors apply at global, provider, model, chain, and key scopes with mid-stream scanning, and a hash-chained audit log exports changes to OpenTelemetry or JSONL for review.
Features
- Protocol Translation Gateway
- Inbound OpenAI Chat, OpenAI Responses, Anthropic Messages, and Gemini formats translate across cloud, enterprise, and self-hosted providers, including Bedrock, Azure AI Foundry, Vertex AI, Snowflake Cortex, Ollama, and vLLM.
- Smart Routing Chains
- Visual chain builder composes fallback routes with provider, model, and credential entries, priority or loadbalanced ordering, per-node share percentages, and a live dry-run trace before changes go active.
- Semantic Response Cache
- Exact-match caching returns repeated answers instantly for zero marginal cost, with optional semantic matching through an embeddings API for near-duplicate prompts and configurable similarity thresholds per usage.
- White-Label Usage Portal
- Rebrand the dashboard and user portal with your own name, logo, and palette, issue local keys, and let users review their own usage, latency, and cost without seeing provider credentials.