9RouterX

Architecture

┌─────────────┐
│  CLI tool   │  (Claude Code, Codex, OpenClaw, Cursor, Cline...)
└──────┬──────┘
       │ http://localhost:20128/v1
       ↓
┌─────────────────────────────────────────────┐
│         9RouterX (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)

RTK Token Saver

RTK compresses tool_result content before it reaches the model, saving 20-40% of tokens. The guards it keeps:

Combo strategies

Each combo carries its own strategy:

Strategy Behaviour
Fallback Try candidates in order until one succeeds
Round-robin Rotate across candidates
Sticky Hold the same candidate while it succeeds
Capacity Reorder capability-aware
Fusion Combine several models into one panel

Design decisions that matter

Further reading

Full internals: ARCHITECTURE.md.