by baiibayu
Never hit rate limits again. One OpenAI-compatible endpoint for 60+ providers & 1,200+ models — smart auto-fallback, prompt compression, 60-language dashboard. Plug into Claude Code, Cursor, Codex & more. Free, open-source, self-hosted.
# Add to your Claude Code skills
git clone https://github.com/baiibayu/srouterSee how srouter compares with popular alternatives.
srouter is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by baiibayu. Never hit rate limits again. One OpenAI-compatible endpoint for 60+ providers & 1,200+ models — smart auto-fallback, prompt compression, 60-language dashboard. Plug into Claude Code, Cursor, Codex & more. Free, open-source, self-hosted. It has 54 GitHub stars.
srouter's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/baiibayu/srouter" and add it to your Claude Code skills directory (see the Installation section above).
srouter is primarily written in TypeScript. It is open-source under baiibayu on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh srouter against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Never hit rate limits again. Save tokens with prompt compression + auto-fallback to ~60 free AI providers and ~1,200+ models.
Connect all AI coding tools (Claude Code, Cursor, Windsurf, Cline, Codex, Copilot, Aider, OpenCode...) behind a single unified OpenAI-compatible endpoint.

Your router auto-syncs its model catalog twice daily from a signed feed: new models, quota updates, and provider quirk fixes arrive automatically without needing a git pull.
Coding with AI agents (Claude Code, Cursor, Windsurf, Cline) is transformative, but developers constantly run into walls:
| ❌ The Headaches | ✅ The SRouter Solution |
|---|---|
| Quota Waste & Expirations: Monthly paid API allowances sit unused or expire at month-end. | Maximize Every Token: Intelligently drains active quotas first, then rotates across other providers. |
| Sudden Rate Limits (429): One heavy prompt or repeated tool call halts your workflow mid-coding. | Smart 3-Tier Auto-Fallback: Instant, seamless failover (Subscription → Budget → 100% Free Keyless) with zero downtime. |
Token Burning on Tool Outputs: Long git diff, grep, test logs, and JSON outputs consume massive context windows. |
Prompt Compression & Token Saver: Built-in heuristics and structure-aware filters compress noisy tool results, typically saving 20–40% tokens. |
| SDK & API Fragmentation: Juggling 50+ incompatible SDKs, auth formats, and endpoint URLs. | One Universal /v1 Gateway: A single OpenAI-compatible base URL (http://localhost:20268/v1) that also natively handles Anthropic Messages (/v1/messages), Gemini (/v1beta), and Ollama emulation. |
| Unpredictable Free Tiers: Providers add, change, or deprecate free models every week. | Self-Updating Catalog: Pinned Ed25519 signed catalog auto-updates ~1,200+ models twice daily into your local SQLite DB. |
| Privacy & Security Risks: Sending API keys to cloud proxy providers exposes your credentials. | 100% Local & Encrypted: Keys are stored locally using AES-256-GCM encryption; traffic proxies directly from your machine to upstream providers. |

┌─────────────────────────────────────────────────────────────────────────────┐
│ Your Coding Agents & IDEs │
│ (Claude Code, Cursor, Windsurf, Cline, Roo Code, Codex, Aider) │
└──────────────────────────────────────┬──────────────────────────────────────┘
│ http://localhost:20268/v1
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ SRouter Smart AI Gateway │
│ • Complexity Gate (System One: routes simple prompts fast, complex deep) │
│ • Prompt Compressor & Token Saver (compacts tool results, trims context) │
│ • Protocol Translation (OpenAI ↔ Anthropic Messages ↔ Gemini ↔ Ollama) │
│ • Per-Key Rate Tracking (RPM / RPD / TPM / TPD tracking with auto-reset) │
│ • Local AES-256-GCM Key Vault & SQLite Persistence │
└──────────────────────────────────────┬──────────────────────────────────────┘
│
┌──────────────────────────────┼──────────────────────────────┐
▼ ▼ ▼
┌──────────────────────────┐ ┌──────────────────────────┐ ┌──────────────────────────┐
│ Tier 1: Sub / Fast Key │ │ Tier 2: Generous Quota │ │ Tier 3: 100% Free / Anon │
│ • Google Gemini 2.5 │ │ • Mistral / Codestral │ │ • Kilo Gateway (No Key) │
│ • Groq (Llama 3.3 70B) │──►│ • Zhipu GLM-4 / CogView │──►│ • OpenCode Free (No Key)│
│ • Pollinations (Free) │ │ • Cloudflare Workers AI │ │ • OVH Endpoints (No Key)│
│ • OpenRouter / DeepSeek │ │ • Cohere / NVIDIA NIM │ │ • LLM7 / AI Horde │
└──────────────────────────┘ └──────────────────────────┘ └──────────────────────────┘
When a request arrives, SRouter evaluates model health, current RPM/RPD limits, and complexity. If an upstream provider returns 429 Too Many Requests or 5xx Server Error, the key enters a temporary cooldown, and SRouter instantly retries the next best model in your fallback chain.

Choose your preferred way to run SRouter:
Run SRouter anywhere Node 20+ is installed without cloning the repository:
# Install once
npm install -g @baiibayu/srouter
srouter
# Or run directly with npx — no install needed
npx @baiibayu/srouter
The Web Dashboard opens automatically at http://localhost:20268.
# 1. Clone the repository
git clone https://github.com/baiibayu/srouter.git
cd srouter
# 2. Copy environment file and start container
cp .env.example .env
docker compose up -d
# Or run directly via GHCR without cloning:
# docker run -d --name srouter -p 20268:20268 -v srouter-data:/app/server/data ghcr.io/baiibayu/srouter:latest
http://localhost:20268http://localhost:20268/v1Prefer a native application with a system tray menu?
SRouter-Setup-x.x.x.exeSRouter-x.x.x-arm64.dmg (Apple Silicon) or x64.dmg (Intel).# 1. Clone repository
git clone https://github.com/baiibayu/srouter.git
cd srouter
# 2. Install dependencies & run database migrations
npm install
npm run db:migration:up
# 3. Start development server (Server :20268 + Client :5173 with HMR)
npm run dev
Open your browser and navigate to:
👉 http://localhost:20268 (Web Dashboard).
SRouter includes automated configuration generators (setup-*) that inspect your live model catalog, back up existing settings, and write the exact configuration your tool expects: