AI API proxy engine with provider failover, token compression, and circuit breaking.
Sits between your CLI tool and AI providers. Translates formats, rotates accounts, compresses tokens.
No telemetry. No external servers. Everything runs locally.
🇮🇩 Bahasa Indonesia · 🇻🇳 Tiếng Việt · 🇨🇳 中文 · 🇯🇵 日本語 · 🇷🇺 Русский
npm install -g xscope0-modifed-router
xscope0-routerOr run directly:
npx xscope0-modifed-router| Endpoint | URL |
|---|---|
| Dashboard | http://localhost:20128/dashboard |
| API | http://localhost:20128/v1 |
| Health | http://localhost:20128/health |
┌─────────────────┐
│ Your CLI │ Claude Code, Codex, Cursor, Cline, OpenCode...
│ Tool │
└────────┬────────┘
│ POST http://localhost:20128/v1/chat/completions
↓
┌─────────────────────────────────────────────────────────────┐
│ VansRoute Engine │
│ │
│ 1. Auth & ACL check (cached API key validation) │
│ 2. Circuit Breaker (skip dead proxy buckets) │
│ 3. Account Semaphore (queue if at concurrency cap)│
│ 4. Token Compression (RTK / Caveman / Ponytail) │
│ 5. Format Translation (OpenAI ↔ Claude ↔ Gemini) │
│ 6. Param Stripping (Kimchi CLI-aligned) │
│ 7. Executor (upstream via proxy if set) │
│ 8. Response Translation (back to client format) │
│ │
│ On success: clearProviderFailure() + clearAccountError │
│ On error: recordProviderFailure() → breaker counts │
│ markAccountUnavailable() → try next account │
│ Kimchi quota? → deactivate until month end │
└─────────────────────────────────────────────────────────────┘
│
├─→ Kimchi (5 CLI models, quota auto-reactivation)
├─→ AgentRouter ($200 free credits, passthrough)
├─→ GitHub Copilot (subscription tier)
├─→ Gemini / OpenCode (free tier)
├─→ OpenRouter / NVIDIA (pay-per-token)
└─→ Combo (fallback / round-robin / fusion / capacity)
| Provider | Auth | Models | Notes |
|---|---|---|---|
| Kimchi | OAuth | 5 CLI models | Quota auto-reactivation at month end |
| AgentRouter | API key | All | $200 free credits, direct passthrough |
| GitHub Copilot | OAuth | Copilot models | Subscription tier |
| Gemini CLI | OAuth | Gemini family | Free tier |
| OpenCode | OAuth | Multiple | Free tier |
| OpenRouter | API key | 100+ models | Pay-per-token |
| NVIDIA | API key | NIM endpoints | Pay-per-token |
| Combo | — | Aggregated | Fallback / round-robin / fusion / capacity |
Routing Engine
- Circuit breaker per provider bucket (auto-skip dead pools)
- Account semaphore (concurrency cap per provider)
- Format translation between OpenAI / Claude / Gemini / Kiro protocols
- Kimchi CLI-aligned parameter stripping
- Proxy pool support (HTTP/SOCKS5, auto-rotate on errors)
Token Management
- RTK compression (request token kiln)
- Caveman mode (ultra-compressed prompts)
- Ponytail mode (minimal output)
- Visible request logs for Caveman / Ponytail in dashboard
Account Pool
- Bulk import API keys (appends, never replaces)
- Bulk delete selected / inactive / deactivated
- Provider-wide
Error → inactivepolicy - Proxy force-delete unbinds accounts first
- Kiro temporary suspension handling
xscope0 Build
- Custom branding and provider icons
- Pi provider endpoint:
http://localhost:20128/v1 - Donate / Remote UI removed
xScope0-Router/
├── cli.js # Entry, process mgmt, system tray
├── src/cli/ # Core engine modules
├── app/
│ ├── server.js # Express API server
│ ├── custom-server.js # HTTP server setup
│ └── next.config.mjs # Dashboard (Next.js)
├── hooks/
│ ├── postinstall.js # Runtime dep installation
│ ├── sqliteRuntime.js # SQLite native modules
│ └── trayRuntime.js # System tray binary
├── scripts/
│ └── build-cli.js # esbuild bundler
├── assets/
│ ├── logo.png
│ └── preview/
└── package.json
git clone https://github.com/xscope0/xScope0-Router.git
cd xScope0-Router
npm install
npm run build
npm packRequirements: Node.js >= 18.0.0
Runtime deps (auto-installed by postinstall.js):
sql.js/better-sqlite3→~/.xscope0/runtime/node_modulessystray2(macOS/Linux only) →~/.xscope0/runtime/node_modules
MIT — Original project: 9router
Built by xscope0 · Co-founder Laurent-xscope


