luqman-v1/9router-go

Public

High-performance Go proxy gateway for 9Router LLM routing — 32K RPS, 42MB RAM, CGO-free

  • Stars257+32 tuần này
  • Forks95
  • Watchers1
  • Issues2
  • Ngày tạo18/07/2026
  • Cập nhật gần nhất31/10/2026
  • Ngôn ngữGo
  • Giấy phép—
README.md32.5 KBRaw

9router-go — FREE AI Router & Token Saver (Single Binary)

Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models.

Connect Claude Code, Cursor, Antigravity, Codex, Gemini, OpenCode, Cline, OpenClaw... to 40+ AI providers & 100+ models — no Node.js needed at runtime.

CI Release GitHub release License GitHub All Releases Telegram

🚀 Quick Start • 💡 Features • ⚙️ Setup • 🔄 Share DB with 9Router • 🌐 Upstream


🤔 Why 9router-go?

Same idea as 9Router, minus the Node.js runtime: one Go binary serves the proxy APIs + an embedded Svelte dashboard.

Stop wasting money, tokens and hitting limits:

  • ❌ Subscription quota expires unused every month
  • ❌ Rate limits stop you mid-coding
  • ❌ Tool outputs (git diff, grep, ls...) burn tokens fast
  • ❌ Manual switching between providers

9router-go solves this:

  • ✅ RTK Token Saver — auto-compress tool_result content, save 20-40% tokens
  • ✅ Auto fallback — Subscription → Cheap → Free, zero downtime
  • ✅ Extended combo routing — per-combo strategy: fallback, round-robin, sticky, capacity, or fusion
  • ✅ Multi-account — round-robin between accounts per provider
  • ✅ Proxy per API key — bind a proxy pool to each provider API key (connection), one-by-one or via Apply Proxy across many at once
  • ✅ Custom headers — add your own request headers to custom compatible providers
  • ✅ Unified custom provider add — one shared dialog adds OpenAI-/Anthropic-compatible endpoints
  • ✅ Custom usage ranges — analyze any window (14d, 12h), not just fixed presets
  • ✅ Extended logging — live console log with level filters & search, plus per-request payload inspector
  • ✅ Single binary — Go + embedded dashboard, works with Claude Code, Codex, Cursor, Cline, any CLI tool

🔄 How It Works

┌─────────────┐
│  Your CLI   │  (Claude Code, Codex, OpenClaw, Cursor, Cline...)
│   Tool      │
└──────┬──────┘
       │ http://localhost:20130/v1
       ↓
┌─────────────────────────────────────────────┐
│         9router-go (Smart Router)           │
│  • RTK Token Saver (cut tool_result tokens) │
│  • Format translation (OpenAI ↔ Claude)     │
│  • Quota tracking                           │
│  • Auto token refresh                       │
└──────┬──────────────────────────────────────┘
       │
       ├─→ [Tier 1: SUBSCRIPTION] Claude Code, Codex, GitHub Copilot
       │   ↓ quota exhausted
       ├─→ [Tier 2: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)
       │   ↓ budget limit
       └─→ [Tier 3: FREE] Kiro, OpenCode Free, Vertex ($300 credits)

Result: Never stop coding, minimal cost + 20-40% token savings via RTK

Nội dung README thuộc về luqman-v1 và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/luqman-v1/9router-go