{"id":37899091,"url":"https://github.com/decolua/9router","last_synced_at":"2026-05-15T07:07:27.563Z","repository":{"id":331905604,"uuid":"1128025899","full_name":"decolua/9router","owner":"decolua","description":"Universal AI Proxy for Claude Code, Codex, Cursor | OpenAI, Claude, Gemini, Copilot","archived":false,"fork":false,"pushed_at":"2026-01-16T06:09:17.000Z","size":1167,"stargazers_count":79,"open_issues_count":11,"forks_count":28,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-17T03:49:41.057Z","etag":null,"topics":["9router","antigravity","claude-code","cliproxyapi","cursor","vibecoding"],"latest_commit_sha":null,"homepage":"https://9router.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decolua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-05T02:59:30.000Z","updated_at":"2026-01-17T03:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/decolua/9router","commit_stats":null,"previous_names":["decolua/9router"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/decolua/9router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decolua%2F9router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decolua%2F9router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decolua%2F9router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decolua%2F9router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decolua","download_url":"https://codeload.github.com/decolua/9router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decolua%2F9router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["9router","antigravity","claude-code","cliproxyapi","cursor","vibecoding"],"created_at":"2026-01-16T17:03:01.848Z","updated_at":"2026-05-15T07:07:27.549Z","avatar_url":"https://github.com/decolua.png","language":"JavaScript","funding_links":[],"categories":["*Ops for AI","AI开源项目","🚀 AI Tools for Vim, Neovim, and Terminal","The latest additions 🎉","Repos","JavaScript","Agent Integration \u0026 Deployment Tools","A01_文本生成_文本对话","Open-Source LLM \u0026 Agent Projects","🤖 AI \u0026 Machine Learning"],"sub_categories":["LLMOps","AI 工具","AI Agent Gateway","大语言对话模型及数据"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./images/9router.png?1\" alt=\"9Router Dashboard\" width=\"800\"/\u003e\n  \n  # 9Router - FREE AI Router \u0026 Token Saver\n  \n  **Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE \u0026 cheap AI models.**\n  \n  **Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers \u0026 100+ Models.**\n  \n  [![npm](https://img.shields.io/npm/v/9router.svg)](https://www.npmjs.com/package/9router)\n  [![Downloads](https://img.shields.io/npm/dm/9router.svg)](https://www.npmjs.com/package/9router)\n  [![Docker Pulls](https://img.shields.io/docker/pulls/decolua/9router.svg?logo=docker\u0026label=Docker%20pulls)](https://hub.docker.com/r/decolua/9router)\n  [![GHCR](https://img.shields.io/badge/GHCR-decolua%2F9router-blue?logo=github)](https://github.com/decolua/9router/pkgs/container/9router)\n  [![License](https://img.shields.io/npm/l/9router.svg)](https://github.com/decolua/9router/blob/main/LICENSE)\n\n  \u003ca href=\"https://trendshift.io/repositories/22628\" target=\"_blank\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/repositories/22628\" alt=\"decolua%2F9router | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n  \n  [🚀 Quick Start](#-quick-start) • [💡 Features](#-key-features) • [📖 Setup](#-setup-guide) • [🌐 Website](https://9router.com)\n\n  [🇻🇳 Tiếng Việt](./i18n/README.vi.md) • [🇨🇳 中文](./i18n/README.zh-CN.md) • [🇯🇵 日本語](./i18n/README.ja-JP.md)\n\u003c/div\u003e\n\n---\n\n## 🤔 Why 9Router?\n\n**Stop wasting money, tokens and hitting limits:**\n\n- ❌ Subscription quota expires unused every month\n- ❌ Rate limits stop you mid-coding\n- ❌ Tool outputs (git diff, grep, ls...) burn tokens fast\n- ❌ Expensive APIs ($20-50/month per provider)\n- ❌ Manual switching between providers\n\n**9Router solves this:**\n\n- ✅ **RTK Token Saver** - Auto-compress tool_result content, save 20-40% tokens per request\n- ✅ **Maximize subscriptions** - Track quota, use every bit before reset\n- ✅ **Auto fallback** - Subscription → Cheap → Free, zero downtime\n- ✅ **Multi-account** - Round-robin between accounts per provider\n- ✅ **Universal** - Works with Claude Code, Codex, Cursor, Cline, any CLI tool\n\n---\n\n## 🔄 How It Works\n\n```\n┌─────────────┐\n│  Your CLI   │  (Claude Code, Codex, OpenClaw, Cursor, Cline...)\n│   Tool      │\n└──────┬──────┘\n       │ http://localhost:20128/v1\n       ↓\n┌─────────────────────────────────────────────┐\n│           9Router (Smart Router)            │\n│  • RTK Token Saver (cut tool_result tokens) │\n│  • Format translation (OpenAI ↔ Claude)     │\n│  • Quota tracking                           │\n│  • Auto token refresh                       │\n└──────┬──────────────────────────────────────┘\n       │\n       ├─→ [Tier 1: SUBSCRIPTION] Claude Code, Codex, GitHub Copilot\n       │   ↓ quota exhausted\n       ├─→ [Tier 2: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)\n       │   ↓ budget limit\n       └─→ [Tier 3: FREE] Kiro, OpenCode Free, Vertex ($300 credits)\n\nResult: Never stop coding, minimal cost + 20-40% token savings via RTK\n```\n\n---\n\n## ⚡ Quick Start\n\n**1. Install globally:**\n\n```bash\nnpm install -g 9router\n9router\n```\n\n🎉 Dashboard opens at `http://localhost:20128`\n\n**2. Connect a FREE provider (no signup needed):**\n\nDashboard → Providers → Connect **Kiro AI** (free Claude unlimited) or **OpenCode Free** (no auth) → Done!\n\n**3. Use in your CLI tool:**\n\n```\nClaude Code/Codex/OpenClaw/Cursor/Cline Settings:\n  Endpoint: http://localhost:20128/v1\n  API Key: [copy from dashboard]\n  Model: kr/claude-sonnet-4.5\n```\n\n**That's it!** Start coding with FREE AI models.\n\n**Alternative: run from source (this repository):**\n\nThis repository package is private (`9router-app`), so source/Docker execution is the expected local development path.\n\n```bash\ncp .env.example .env\nnpm install\nPORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev\n```\n\nProduction mode:\n\n```bash\nnpm run build\nPORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start\n```\n\nDefault URLs:\n- Dashboard: `http://localhost:20128/dashboard`\n- OpenAI-compatible API: `http://localhost:20128/v1`\n\n---\n\n## Video Guides\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=raEyZPg5xE0\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/raEyZPg5xE0/maxresdefault.jpg\" alt=\"9Router Setup Tutorial\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇺🇸 English\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003e9Router + Claude Code FREE Setup\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/@BuildAIWithHamid\"\u003eBuild AI With Hamid\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=X69n5Lm06Yw\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/X69n5Lm06Yw/maxresdefault.jpg\" alt=\"Tiết kiệm chi phí LLM với 9Router\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇻🇳 Tiếng Việt\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003eTiết kiệm chi phí LLM cho OpenClaw với 9Router\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/c/M%C3%ACAIblog\"\u003eMì AI\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=o3qYCyjrFYg\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/o3qYCyjrFYg/maxresdefault.jpg\" alt=\"Claude Code FREE Forever\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇺🇸 English\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003eClaude Code FREE Forever — Unlimited Models\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/@BuildAIWithHamid\"\u003eBuild AI With Hamid\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=Ttpc26m39Dw\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/Ttpc26m39Dw/maxresdefault.jpg\" alt=\"Claude CLI Free Setup\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇺🇸 English\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003eClaude CLI Free Setup with 9Router 🚀\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/@CodeVerseSoban\"\u003eCodeVerse Soban\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=G-5A_D5Pm6Y\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/G-5A_D5Pm6Y/maxresdefault.jpg\" alt=\"Cài đặt OpenClaw Free A-Z\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇻🇳 Tiếng Việt\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003eCài Đặt OpenClaw Free Từ A-Z + 9Router\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/@maigia\"\u003eMai Gia\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"320\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=JXmg8_gccgE\"\u003e\n        \u003cimg src=\"https://img.youtube.com/vi/JXmg8_gccgE/maxresdefault.jpg\" alt=\"FREE OpenClaw with Claude Opus\" width=\"300\"/\u003e\n      \u003c/a\u003e\u003cbr/\u003e\n      \u003cb\u003e🇺🇸 English\u003c/b\u003e\u003cbr/\u003e\n      \u003csub\u003eFREE OpenClaw + Claude Opus 4.6\u003cbr/\u003eby \u003ca href=\"https://www.youtube.com/@BuildAIWithHamid\"\u003eBuild AI With Hamid\u003c/a\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c/div\u003e\n\n\u003e 🎬 **Made a video about 9Router?** Submit a [Pull Request](https://github.com/decolua/9router/pulls) adding your video to this section — we'll merge it!\n\n---\n\n## 🛠️ Supported CLI Tools\n\n9Router works seamlessly with all major AI coding tools:\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/claude.png\" width=\"60\" alt=\"Claude Code\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eClaude-Code\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/openclaw.png\" width=\"60\" alt=\"OpenClaw\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eOpenClaw\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/codex.png\" width=\"60\" alt=\"Codex\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCodex\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/opencode.png\" width=\"60\" alt=\"OpenCode\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eOpenCode\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/cursor.png\" width=\"60\" alt=\"Cursor\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCursor\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/antigravity.png\" width=\"60\" alt=\"Antigravity\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eAntigravity\u003c/b\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/cline.png\" width=\"60\" alt=\"Cline\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCline\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/continue.png\" width=\"60\" alt=\"Continue\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eContinue\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/droid.png\" width=\"60\" alt=\"Droid\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eDroid\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/roo.png\" width=\"60\" alt=\"Roo\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eRoo\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/copilot.png\" width=\"60\" alt=\"Copilot\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCopilot\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/kilocode.png\" width=\"60\" alt=\"Kilo Code\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eKilo Code\u003c/b\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n---\n\n## 🌐 Supported Providers\n\n### 🔐 OAuth Providers\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/claude.png\" width=\"60\" alt=\"Claude Code\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eClaude-Code\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/antigravity.png\" width=\"60\" alt=\"Antigravity\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eAntigravity\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/codex.png\" width=\"60\" alt=\"Codex\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCodex\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/github.png\" width=\"60\" alt=\"GitHub\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eGitHub\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"120\"\u003e\n        \u003cimg src=\"./public/providers/cursor.png\" width=\"60\" alt=\"Cursor\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCursor\u003c/b\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n### 🆓 Free Providers\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"150\"\u003e\n        \u003cimg src=\"./public/providers/kiro.png\" width=\"70\" alt=\"Kiro\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eKiro AI\u003c/b\u003e\u003cbr/\u003e\n        \u003csub\u003eClaude 4.5 + GLM-5 + MiniMax\u003cbr/\u003eUnlimited FREE\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"150\"\u003e\n        \u003cimg src=\"./public/providers/opencode.png\" width=\"70\" alt=\"OpenCode Free\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eOpenCode Free\u003c/b\u003e\u003cbr/\u003e\n        \u003csub\u003eNo auth • Auto-fetch models\u003cbr/\u003eUnlimited FREE\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"150\"\u003e\n        \u003cimg src=\"./public/providers/gemini.png\" width=\"70\" alt=\"Vertex AI\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eVertex AI\u003c/b\u003e\u003cbr/\u003e\n        \u003csub\u003eGemini 3 Pro + GLM-5 + DeepSeek\u003cbr/\u003e$300 credits free\u003c/sub\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n\u003e **Note:** iFlow, Qwen and Gemini CLI free tiers were discontinued in 2026. Use Kiro / OpenCode Free / Vertex instead.\n\n### 🔑 API Key Providers (40+)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/openrouter.png\" width=\"50\" alt=\"OpenRouter\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eOpenRouter\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/glm.png\" width=\"50\" alt=\"GLM\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eGLM\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/kimi.png\" width=\"50\" alt=\"Kimi\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eKimi\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/minimax.png\" width=\"50\" alt=\"MiniMax\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eMiniMax\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/openai.png\" width=\"50\" alt=\"OpenAI\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eOpenAI\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/anthropic.png\" width=\"50\" alt=\"Anthropic\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eAnthropic\u003c/sub\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/gemini.png\" width=\"50\" alt=\"Gemini\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eGemini\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/deepseek.png\" width=\"50\" alt=\"DeepSeek\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eDeepSeek\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/groq.png\" width=\"50\" alt=\"Groq\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eGroq\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/xai.png\" width=\"50\" alt=\"xAI\"/\u003e\u003cbr/\u003e\n        \u003csub\u003exAI\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/mistral.png\" width=\"50\" alt=\"Mistral\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eMistral\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/perplexity.png\" width=\"50\" alt=\"Perplexity\"/\u003e\u003cbr/\u003e\n        \u003csub\u003ePerplexity\u003c/sub\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/together.png\" width=\"50\" alt=\"Together\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eTogether AI\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/fireworks.png\" width=\"50\" alt=\"Fireworks\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eFireworks\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/cerebras.png\" width=\"50\" alt=\"Cerebras\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eCerebras\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/cohere.png\" width=\"50\" alt=\"Cohere\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eCohere\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/nvidia.png\" width=\"50\" alt=\"NVIDIA\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eNVIDIA\u003c/sub\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"100\"\u003e\n        \u003cimg src=\"./public/providers/siliconflow.png\" width=\"50\" alt=\"SiliconFlow\"/\u003e\u003cbr/\u003e\n        \u003csub\u003eSiliconFlow\u003c/sub\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n  \u003cp\u003e\u003ci\u003e...and 20+ more providers including Nebius, Chutes, Hyperbolic, and custom OpenAI/Anthropic compatible endpoints\u003c/i\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## 💡 Key Features\n\n| Feature | What It Does | Why It Matters |\n|---------|--------------|----------------|\n| 🚀 **RTK Token Saver** ([RTK](https://github.com/rtk-ai/rtk) ⭐40K) | Compress tool outputs (`git diff`, `grep`, `ls`, `tree`...) before sending to LLM | Save **20-40% input tokens** per request |\n| 🪨 **Caveman Mode** ([Caveman](https://github.com/JuliusBrussee/caveman) ⭐52K) | Inject caveman-speak prompt → LLM replies terse, technical substance preserved | Save **up to 65% output tokens** |\n| 🎯 **Smart 3-Tier Fallback** | Auto-route: Subscription → Cheap → Free | Never stop coding, zero downtime |\n| 📊 **Real-Time Quota Tracking** | Live token count + reset countdown | Maximize subscription value |\n| 🔄 **Format Translation** | OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro ↔ Vertex | Works with any CLI tool |\n| 👥 **Multi-Account Support** | Multiple accounts per provider | Load balancing + redundancy |\n| 🔄 **Auto Token Refresh** | OAuth tokens refresh automatically | No manual re-login needed |\n| 🎨 **Custom Combos** | Create unlimited model combinations | Tailor fallback to your needs |\n| 📝 **Request Logging** | Debug mode with full request/response logs | Troubleshoot issues easily |\n| 💾 **Cloud Sync** | Sync config across devices | Same setup everywhere |\n| 📊 **Usage Analytics** | Track tokens, cost, trends over time | Optimize spending |\n| 🌐 **Deploy Anywhere** | Localhost, VPS, Docker, Cloudflare Workers | Flexible deployment options |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📖 Feature Details\u003c/b\u003e\u003c/summary\u003e\n\n### 🚀 RTK Token Saver\n\nTool outputs (`git diff`, `grep`, `find`, `ls`, `tree`, log dumps...) often eat 30-50% of your prompt budget. RTK detects them and applies smart, lossless compression **before** the request hits the LLM:\n\n- **Filters:** `git-diff`, `git-status`, `grep`, `find`, `ls`, `tree`, `dedup-log`, `smart-truncate`, `read-numbered`, `search-list`\n- **Auto-detect:** No config needed — RTK peeks the first 1KB of each `tool_result` and picks the right filter.\n- **Safe by design:** If a filter fails, throws, or makes output bigger, RTK silently keeps the original text. Errors never break your request.\n- **Universal:** Works across all formats (OpenAI, Claude, Gemini, Cursor, Kiro, OpenAI Responses) because it runs **before** any format translation.\n- **Default ON:** Toggle anytime in Dashboard → Endpoint settings.\n\n```\nWithout RTK: 47K tokens sent to LLM\nWith RTK:    28K tokens sent to LLM   (40% saved · same context · same answer)\n```\n\n### 🎯 Smart 3-Tier Fallback\n\nCreate combos with automatic fallback:\n\n```\nCombo: \"my-coding-stack\"\n  1. cc/claude-opus-4-6        (your subscription)\n  2. glm/glm-4.7               (cheap backup, $0.6/1M)\n  3. if/kimi-k2-thinking       (free fallback)\n\n→ Auto switches when quota runs out or errors occur\n```\n\n### 📊 Real-Time Quota Tracking\n\n- Token consumption per provider\n- Reset countdown (5-hour, daily, weekly)\n- Cost estimation for paid tiers\n- Monthly spending reports\n\n### 🔄 Format Translation\n\nSeamless translation between formats:\n- **OpenAI** ↔ **Claude** ↔ **Gemini** ↔ **Cursor** ↔ **Kiro** ↔ **Vertex** ↔ **Antigravity** ↔ **Ollama** ↔ **OpenAI Responses**\n- Your CLI tool sends OpenAI format → 9Router translates → Provider receives native format\n- Works with any tool that supports custom OpenAI endpoints\n\n### 👥 Multi-Account Support\n\n- Add multiple accounts per provider\n- Auto round-robin or priority-based routing\n- Fallback to next account when one hits quota\n\n### 🔄 Auto Token Refresh\n\n- OAuth tokens automatically refresh before expiration\n- No manual re-authentication needed\n- Seamless experience across all providers\n\n### 🎨 Custom Combos\n\n- Create unlimited model combinations\n- Mix subscription, cheap, and free tiers\n- Name your combos for easy access\n- Share combos across devices with Cloud Sync\n\n### 📝 Request Logging\n\n- Enable debug mode for full request/response logs\n- Track API calls, headers, and payloads\n- Troubleshoot integration issues\n- Export logs for analysis\n\n### 💾 Cloud Sync\n\n- Sync providers, combos, and settings across devices\n- Automatic background sync\n- Secure encrypted storage\n- Access your setup from anywhere\n\n#### Cloud Runtime Notes\n\n- Prefer server-side cloud variables in production:\n  - `BASE_URL` (internal callback URL used by sync scheduler)\n  - `CLOUD_URL` (cloud sync endpoint base)\n- `NEXT_PUBLIC_BASE_URL` and `NEXT_PUBLIC_CLOUD_URL` are still supported for compatibility/UI, but server runtime now prioritizes `BASE_URL`/`CLOUD_URL`.\n- Cloud sync requests now use timeout + fail-fast behavior to avoid UI hanging when cloud DNS/network is unavailable.\n\n### 📊 Usage Analytics\n\n- Track token usage per provider and model\n- Cost estimation and spending trends\n- Monthly reports and insights\n- Optimize your AI spending\n\n\u003e **💡 IMPORTANT - Understanding Dashboard Costs:**\n\u003e \n\u003e The \"cost\" displayed in Usage Analytics is **for tracking and comparison purposes only**. \n\u003e 9Router itself **never charges** you anything. You only pay providers directly (if using paid services).\n\u003e \n\u003e **Example:** If your dashboard shows \"$290 total cost\" while using iFlow models, this represents \n\u003e what you would have paid using paid APIs directly. Your actual cost = **$0** (iFlow is free unlimited).\n\u003e \n\u003e Think of it as a \"savings tracker\" showing how much you're saving by using free models or \n\u003e routing through 9Router!\n\n### 🌐 Deploy Anywhere\n\n- 💻 **Localhost** - Default, works offline\n- ☁️ **VPS/Cloud** - Share across devices\n- 🐳 **Docker** - One-command deployment\n- 🚀 **Cloudflare Workers** - Global edge network\n\n\u003c/details\u003e\n\n---\n\n## 💰 Pricing at a Glance\n\n| Tier | Provider | Cost | Quota Reset | Best For |\n|------|----------|------|-------------|----------|\n| **🚀 TOKEN SAVER** | **RTK (built-in)** | **FREE** | Always on | **Save 20-40% tokens on EVERY request** |\n| **💳 SUBSCRIPTION** | Claude Code (Pro/Max) | $20-200/mo | 5h + weekly | Already subscribed |\n| | Codex (Plus/Pro) | $20-200/mo | 5h + weekly | OpenAI users |\n| | GitHub Copilot | $10-19/mo | Monthly | GitHub users |\n| | Cursor IDE | $20/mo | Monthly | Cursor users |\n| **💰 CHEAP** | GLM-5.1 / GLM-4.7 | $0.6/1M | Daily 10AM | Budget backup |\n| | MiniMax M2.7 | $0.2/1M | 5-hour rolling | Cheapest option |\n| | Kimi K2.5 | $9/mo flat | 10M tokens/mo | Predictable cost |\n| **🆓 FREE** | Kiro AI | $0 | Unlimited | Claude 4.5 + GLM-5 + MiniMax free |\n| | OpenCode Free | $0 | Unlimited | No auth, auto-fetch models |\n| | Vertex AI | $300 credits | New GCP accounts | Gemini 3 Pro + DeepSeek + GLM-5 |\n\n**💡 Pro Tip:** RTK + Kiro AI + OpenCode Free combo = **$0 cost + 20-40% token savings**!\n\n---\n\n### 📊 Understanding 9Router Costs \u0026 Billing\n\n**9Router Billing Reality:**\n\n✅ **9Router software = FREE forever** (open source, never charges)  \n✅ **Dashboard \"costs\" = Display/tracking only** (not actual bills)  \n✅ **You pay providers directly** (subscriptions or API fees)  \n✅ **FREE providers stay FREE** (iFlow, Kiro, Qwen = $0 unlimited)  \n❌ **9Router never sends invoices** or charges your card\n\n**How Cost Display Works:**\n\nThe dashboard shows **estimated costs** as if you were using paid APIs directly. This is **not billing** - it's a comparison tool to show your savings.\n\n**Example Scenario:**\n```\nDashboard Display:\n• Total Requests: 1,662\n• Total Tokens: 47M\n• Display Cost: $290\n\nReality Check:\n• Provider: iFlow (FREE unlimited)\n• Actual Payment: $0.00\n• What $290 Means: Amount you SAVED by using free models!\n```\n\n**Payment Rules:**\n- **Subscription providers** (Claude Code, Codex): Pay them directly via their websites\n- **Cheap providers** (GLM, MiniMax): Pay them directly, 9Router just routes\n- **FREE providers** (iFlow, Kiro, Qwen): Genuinely free forever, no hidden charges\n- **9Router**: Never charges anything, ever\n\n---\n\n## 🎯 Use Cases\n\n### Case 1: \"I have Claude Pro subscription\"\n\n**Problem:** Quota expires unused, rate limits during heavy coding\n\n**Solution:**\n```\nCombo: \"maximize-claude\"\n  1. cc/claude-opus-4-7        (use subscription fully)\n  2. glm/glm-5.1               (cheap backup when quota out)\n  3. kr/claude-sonnet-4.5      (free emergency fallback)\n\nMonthly cost: $20 (subscription) + ~$5 (backup) = $25 total\nvs. $20 + hitting limits = frustration\n```\n\n### Case 2: \"I want zero cost\"\n\n**Problem:** Can't afford subscriptions, need reliable AI coding\n\n**Solution:**\n```\nCombo: \"free-forever\"\n  1. kr/claude-sonnet-4.5      (Claude 4.5 free unlimited)\n  2. kr/glm-5                  (GLM-5 free via Kiro)\n  3. oc/\u003cauto\u003e                 (OpenCode Free, no auth)\n\nMonthly cost: $0\nQuality: Production-ready models + RTK saves 20-40% tokens\n```\n\n### Case 3: \"I need 24/7 coding, no interruptions\"\n\n**Problem:** Deadlines, can't afford downtime\n\n**Solution:**\n```\nCombo: \"always-on\"\n  1. cc/claude-opus-4-7        (best quality)\n  2. cx/gpt-5.5                (second subscription)\n  3. glm/glm-5.1               (cheap, resets daily)\n  4. minimax/MiniMax-M2.7      (cheapest, 5h reset)\n  5. kr/claude-sonnet-4.5      (free unlimited)\n\nResult: 5 layers of fallback = zero downtime\nMonthly cost: $20-200 (subscriptions) + $10-20 (backup)\n```\n\n### Case 4: \"I want FREE AI in OpenClaw\"\n\n**Problem:** Need AI assistant in messaging apps (WhatsApp, Telegram, Slack...), completely free\n\n**Solution:**\n```\nCombo: \"openclaw-free\"\n  1. kr/claude-sonnet-4.5      (Claude 4.5 free)\n  2. kr/glm-5                  (GLM-5 free)\n  3. kr/MiniMax-M2.5           (MiniMax free)\n\nMonthly cost: $0\nAccess via: WhatsApp, Telegram, Slack, Discord, iMessage, Signal...\n```\n\n---\n\n## ❓ Frequently Asked Questions\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📊 Why does my dashboard show high costs?\u003c/b\u003e\u003c/summary\u003e\n\nThe dashboard tracks your token usage and displays **estimated costs** as if you were using paid APIs directly. This is **not actual billing** - it's a reference to show how much you're saving by using free models or existing subscriptions through 9Router.\n\n**Example:**\n- **Dashboard shows:** \"$290 total cost\"\n- **Reality:** You're using iFlow (FREE unlimited)\n- **Your actual cost:** **$0.00**\n- **What $290 means:** Amount you **saved** by using free models instead of paid APIs!\n\nThe cost display is a \"savings tracker\" to help you understand your usage patterns and optimization opportunities.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e💳 Will I be charged by 9Router?\u003c/b\u003e\u003c/summary\u003e\n\n**No.** 9Router is free, open-source software that runs on your own computer. It never charges you anything.\n\n**You only pay:**\n- ✅ **Subscription providers** (Claude Code $20/mo, Codex $20-200/mo) → Pay them directly on their websites\n- ✅ **Cheap providers** (GLM, MiniMax) → Pay them directly, 9Router just routes your requests\n- ❌ **9Router itself** → **Never charges anything, ever**\n\n9Router is a local proxy/router. It doesn't have your credit card, can't send invoices, and has no billing system. It's completely free software.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🆓 Are FREE providers really unlimited?\u003c/b\u003e\u003c/summary\u003e\n\n**Yes!** The current FREE providers (Kiro, OpenCode Free, Vertex) are genuinely free with **no hidden charges**.\n\nThese are free services offered by those respective companies:\n- **Kiro AI**: Free unlimited Claude 4.5 + GLM-5 + MiniMax via AWS Builder ID / Google / GitHub OAuth\n- **OpenCode Free**: No-auth passthrough proxy, models auto-fetched from `opencode.ai/zen/v1/models`\n- **Vertex AI**: $300 free credits for new Google Cloud accounts (90 days)\n\n9Router just routes your requests to them - there's no \"catch\" or future billing. They're truly free services, and 9Router makes them easy to use with fallback support.\n\n**Discontinued free tiers (no longer recommended):**\n- ❌ **iFlow**: Was free unlimited, now changed to paid (2026)\n- ❌ **Qwen Code**: Free OAuth tier discontinued by Alibaba on 2026-04-15\n- ❌ **Gemini CLI**: Still works, but using it with non-CLI tools (Claude, Codex, Cursor...) may result in account bans — only use if you stick to Gemini CLI itself\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e💰 How do I minimize my actual AI costs?\u003c/b\u003e\u003c/summary\u003e\n\n**Free-First Strategy:**\n\n1. **Start with 100% free combo:**\n   ```\n   1. gc/gemini-3-flash (180K/month free from Google)\n   2. if/kimi-k2-thinking (unlimited free from iFlow)\n   3. qw/qwen3-coder-plus (unlimited free from Qwen)\n   ```\n   **Cost: $0/month**\n\n2. **Add cheap backup** only if you need it:\n   ```\n   4. glm/glm-4.7 ($0.6/1M tokens)\n   ```\n   **Additional cost: Only pay for what you actually use**\n\n3. **Use subscription providers last:**\n   - Only if you already have them\n   - 9Router helps maximize their value through quota tracking\n\n**Result:** Most users can operate at $0/month using only free tiers!\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📈 What if my usage suddenly spikes?\u003c/b\u003e\u003c/summary\u003e\n\n9Router's smart fallback prevents surprise charges:\n\n**Scenario:** You're on a coding sprint and blow through your quotas\n\n**Without 9Router:**\n- ❌ Hit rate limit → Work stops → Frustration\n- ❌ Or: Accidentally rack up huge API bills\n\n**With 9Router:**\n- ✅ Subscription hits limit → Auto-fallback to cheap tier\n- ✅ Cheap tier gets expensive → Auto-fallback to free tier\n- ✅ Never stop coding → Predictable costs\n\n**You're in control:** Set spending limits per provider in dashboard, and 9Router respects them.\n\n\u003c/details\u003e\n\n---\n\n## 📖 Setup Guide\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔐 Subscription Providers (Maximize Value)\u003c/b\u003e\u003c/summary\u003e\n\n### Claude Code (Pro/Max)\n\n```bash\nDashboard → Providers → Connect Claude Code\n→ OAuth login → Auto token refresh\n→ 5-hour + weekly quota tracking\n\nModels:\n  cc/claude-opus-4-7\n  cc/claude-opus-4-6\n  cc/claude-sonnet-4-6\n  cc/claude-haiku-4-5-20251001\n```\n\n**Pro Tip:** Use Opus for complex tasks, Sonnet for speed. 9Router tracks quota per model!\n\n### OpenAI Codex (Plus/Pro)\n\n```bash\nDashboard → Providers → Connect Codex\n→ OAuth login (port 1455)\n→ 5-hour + weekly reset\n\nModels:\n  cx/gpt-5.5\n  cx/gpt-5.4\n  cx/gpt-5.3-codex\n  cx/gpt-5.2-codex\n```\n\n### GitHub Copilot\n\n```bash\nDashboard → Providers → Connect GitHub\n→ OAuth via GitHub\n→ Monthly reset (1st of month)\n\nModels:\n  gh/gpt-5.4\n  gh/claude-opus-4.7\n  gh/claude-sonnet-4.6\n  gh/gemini-3.1-pro-preview\n  gh/grok-code-fast-1\n```\n\n### Cursor IDE\n\n```bash\nDashboard → Providers → Connect Cursor\n→ OAuth login\n→ Monthly subscription\n\nModels:\n  cu/claude-4.6-opus-max\n  cu/claude-4.5-sonnet-thinking\n  cu/gpt-5.3-codex\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e💰 Cheap Providers (Backup)\u003c/b\u003e\u003c/summary\u003e\n\n### GLM-5.1 / GLM-4.7 (Daily reset, $0.6/1M)\n\n1. Sign up: [Zhipu AI](https://open.bigmodel.cn/)\n2. Get API key from Coding Plan\n3. Dashboard → Add API Key:\n   - Provider: `glm`\n   - API Key: `your-key`\n\n**Use:** `glm/glm-5.1`, `glm/glm-5`, `glm/glm-4.7`\n\n**Pro Tip:** Coding Plan offers 3× quota at 1/7 cost! Reset daily 10:00 AM.\n\n### MiniMax M2.7 (5h reset, $0.20/1M)\n\n1. Sign up: [MiniMax](https://www.minimax.io/)\n2. Get API key\n3. Dashboard → Add API Key\n\n**Use:** `minimax/MiniMax-M2.7`, `minimax/MiniMax-M2.5`\n\n**Pro Tip:** Cheapest option for long context (1M tokens)!\n\n### Kimi K2.5 ($9/month flat)\n\n1. Subscribe: [Moonshot AI](https://platform.moonshot.ai/)\n2. Get API key\n3. Dashboard → Add API Key\n\n**Use:** `kimi/kimi-k2.5`, `kimi/kimi-k2.5-thinking`\n\n**Pro Tip:** Fixed $9/month for 10M tokens = $0.90/1M effective cost!\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🆓 FREE Providers (Recommended)\u003c/b\u003e\u003c/summary\u003e\n\n### Kiro AI (Claude 4.5 + GLM-5 + MiniMax FREE)\n\n```bash\nDashboard → Connect Kiro\n→ AWS Builder ID, AWS IAM Identity Center, Google, or GitHub\n→ Unlimited usage\n\nModels:\n  kr/claude-sonnet-4.5\n  kr/claude-haiku-4.5\n  kr/glm-5\n  kr/MiniMax-M2.5\n  kr/qwen3-coder-next\n  kr/deepseek-3.2\n```\n\n**Pro Tip:** Best free option for Claude. No API key, no payment, fully unlimited.\n\n### OpenCode Free (No auth, auto-fetch models)\n\n```bash\nDashboard → Connect OpenCode Free\n→ No login required (passthrough proxy)\n→ Models auto-fetched from opencode.ai/zen/v1/models\n```\n\n**Pro Tip:** Fastest setup. Just connect and start coding.\n\n### Vertex AI ($300 free credits for new GCP accounts)\n\n```bash\nDashboard → Connect Vertex AI\n→ Upload Google Cloud Service Account JSON\n→ Enable Vertex AI API in your GCP project\n\nModels:\n  vertex/gemini-3.1-pro-preview\n  vertex/gemini-3-flash-preview\n  vertex/gemini-2.5-flash\n\nVertex Partner (Anthropic / DeepSeek / GLM / Qwen via Vertex):\n  vertex-partner/glm-5-maas\n  vertex-partner/deepseek-v3.2-maas\n  vertex-partner/qwen3-next-80b-a3b-thinking-maas\n```\n\n**Pro Tip:** New Google Cloud accounts get $300 credits free for 90 days. Plenty for daily coding.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🎨 Create Combos\u003c/b\u003e\u003c/summary\u003e\n\n### Example 1: Maximize Subscription → Cheap Backup\n\n```\nDashboard → Combos → Create New\n\nName: premium-coding\nModels:\n  1. cc/claude-opus-4-7 (Subscription primary)\n  2. glm/glm-5.1 (Cheap backup, $0.6/1M)\n  3. minimax/MiniMax-M2.7 (Cheapest fallback, $0.20/1M)\n\nUse in CLI: premium-coding\n\nMonthly cost example (100M tokens):\n  80M via Claude (subscription): $0 extra\n  15M via GLM: $9\n  5M via MiniMax: $1\n  Total: $10 + your subscription\n```\n\n### Example 2: Free-Only (Zero Cost)\n\n```\nName: free-combo\nModels:\n  1. kr/claude-sonnet-4.5 (Claude 4.5 free unlimited)\n  2. kr/glm-5 (GLM-5 free via Kiro)\n  3. vertex/gemini-3.1-pro-preview ($300 free credits)\n\nCost: $0 forever (+ 20-40% token savings via RTK)!\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔧 CLI Integration\u003c/b\u003e\u003c/summary\u003e\n\n### Cursor IDE\n\n```\nSettings → Models → Advanced:\n  OpenAI API Base URL: http://localhost:20128/v1\n  OpenAI API Key: [from 9router dashboard]\n  Model: cc/claude-opus-4-7\n```\n\nOr use combo: `premium-coding`\n\n### Claude Code\n\nEdit `~/.claude/config.json`:\n\n```json\n{\n  \"anthropic_api_base\": \"http://localhost:20128/v1\",\n  \"anthropic_api_key\": \"your-9router-api-key\"\n}\n```\n\n### Codex CLI\n\n```bash\nexport OPENAI_BASE_URL=\"http://localhost:20128\"\nexport OPENAI_API_KEY=\"your-9router-api-key\"\n\ncodex \"your prompt\"\n```\n\n### OpenClaw\n\n**Option 1 — Dashboard (recommended):**\n\n```\nDashboard → CLI Tools → OpenClaw → Select Model → Apply\n```\n\n**Option 2 — Manual:** Edit `~/.openclaw/openclaw.json`:\n\n```json\n{\n  \"agents\": {\n    \"defaults\": {\n      \"model\": {\n        \"primary\": \"9router/kr/claude-sonnet-4.5\"\n      }\n    }\n  },\n  \"models\": {\n    \"providers\": {\n      \"9router\": {\n        \"baseUrl\": \"http://127.0.0.1:20128/v1\",\n        \"apiKey\": \"sk_9router\",\n        \"api\": \"openai-completions\",\n        \"models\": [\n          {\n            \"id\": \"kr/claude-sonnet-4.5\",\n            \"name\": \"Claude Sonnet 4.5 (Kiro Free)\"\n          }\n        ]\n      }\n    }\n  }\n}\n```\n\n\u003e **Note:** OpenClaw only works with local 9Router. Use `127.0.0.1` instead of `localhost` to avoid IPv6 resolution issues.\n\n### Cline / Continue / RooCode\n\n```\nProvider: OpenAI Compatible\nBase URL: http://localhost:20128/v1\nAPI Key: [from dashboard]\nModel: cc/claude-opus-4-7\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🚀 Deployment\u003c/b\u003e\u003c/summary\u003e\n\n### VPS Deployment\n\n```bash\n# Clone and install\ngit clone https://github.com/decolua/9router.git\ncd 9router\nnpm install\nnpm run build\n\n# Configure\nexport JWT_SECRET=\"your-secure-secret-change-this\"\nexport INITIAL_PASSWORD=\"your-password\"\nexport DATA_DIR=\"/var/lib/9router\"\nexport PORT=\"20128\"\nexport HOSTNAME=\"0.0.0.0\"\nexport NODE_ENV=\"production\"\nexport NEXT_PUBLIC_BASE_URL=\"http://localhost:20128\"\nexport NEXT_PUBLIC_CLOUD_URL=\"https://9router.com\"\nexport API_KEY_SECRET=\"endpoint-proxy-api-key-secret\"\nexport MACHINE_ID_SALT=\"endpoint-proxy-salt\"\n\n# Start\nnpm run start\n\n# Or use PM2\nnpm install -g pm2\npm2 start npm --name 9router -- start\npm2 save\npm2 startup\n```\n\n### Docker\n\nPublished images (multi-platform `linux/amd64` + `linux/arm64`):\n- Docker Hub: [`decolua/9router`](https://hub.docker.com/r/decolua/9router)\n- GHCR: [`ghcr.io/decolua/9router`](https://github.com/decolua/9router/pkgs/container/9router)\n\n**Quick start (use published image):**\n\n```bash\ndocker run -d \\\n  --name 9router \\\n  -p 20128:20128 \\\n  -v \"$HOME/.9router:/app/data\" \\\n  -e DATA_DIR=/app/data \\\n  decolua/9router:latest\n```\n\n→ Open http://localhost:20128\n\n**Build from source (dev):**\n\n```bash\ngit clone https://github.com/decolua/9router.git\ncd 9router/app\ndocker build -t 9router .\ndocker run -d --name 9router -p 20128:20128 \\\n  -v \"$HOME/.9router:/app/data\" -e DATA_DIR=/app/data 9router\n```\n\n**Container defaults:**\n- `PORT=20128`\n- `HOSTNAME=0.0.0.0`\n\n**Useful commands:**\n\n```bash\ndocker logs -f 9router\ndocker restart 9router\ndocker stop 9router \u0026\u0026 docker rm 9router\ndocker pull decolua/9router:latest   # update to latest\n```\n\n**Data persistence:** `$HOME/.9router/db/data.sqlite` on host ↔ `/app/data/db/data.sqlite` in container.\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `JWT_SECRET` | Auto-generated (`~/.9router/jwt-secret`) | JWT signing secret for dashboard auth cookie (override to share across instances) |\n| `INITIAL_PASSWORD` | `123456` | First login password when no saved hash exists |\n| `DATA_DIR` | `~/.9router` | Main app data location (SQLite at `$DATA_DIR/db/data.sqlite`) |\n| `PORT` | framework default | Service port (`20128` in examples) |\n| `HOSTNAME` | framework default | Bind host (Docker defaults to `0.0.0.0`) |\n| `NODE_ENV` | runtime default | Set `production` for deploy |\n| `BASE_URL` | `http://localhost:20128` | Server-side internal base URL used by cloud sync jobs |\n| `CLOUD_URL` | `https://9router.com` | Server-side cloud sync endpoint base URL |\n| `NEXT_PUBLIC_BASE_URL` | `http://localhost:3000` | Backward-compatible/public base URL (prefer `BASE_URL` for server runtime) |\n| `NEXT_PUBLIC_CLOUD_URL` | `https://9router.com` | Backward-compatible/public cloud URL (prefer `CLOUD_URL` for server runtime) |\n| `API_KEY_SECRET` | `endpoint-proxy-api-key-secret` | HMAC secret for generated API keys |\n| `MACHINE_ID_SALT` | `endpoint-proxy-salt` | Salt for stable machine ID hashing |\n| `ENABLE_REQUEST_LOGS` | `false` | Enables request/response logs under `logs/` |\n| `AUTH_COOKIE_SECURE` | `false` | Force `Secure` auth cookie (set `true` behind HTTPS reverse proxy) |\n| `REQUIRE_API_KEY` | `false` | Enforce Bearer API key on `/v1/*` routes (recommended for internet-exposed deploys) |\n| `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY` | empty | Optional outbound proxy for upstream provider calls |\n\nNotes:\n- Lowercase proxy variables are also supported: `http_proxy`, `https_proxy`, `all_proxy`, `no_proxy`.\n- `.env` is not baked into Docker image (`.dockerignore`); inject runtime config with `--env-file` or `-e`.\n- On Windows, `APPDATA` can be used for local storage path resolution.\n- `INSTANCE_NAME` appears in older docs/env templates, but is currently not used at runtime.\n\n### Runtime Files and Storage\n\n- Main app state: `${DATA_DIR}/db/data.sqlite` (SQLite — providers, combos, aliases, keys, settings, usage history)\n- Auto backups: `${DATA_DIR}/db/backups/`\n- Optional request/translator logs: `\u003crepo\u003e/logs/...` when `ENABLE_REQUEST_LOGS=true`\n- Both `${DATA_DIR}` and `~/.9router` resolve to the same location in a Docker container — the symlink `/root/.9router -\u003e /app/data` is created at build time.\n\n\u003c/details\u003e\n\n---\n\n## 📊 Available Models\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eView all available models\u003c/b\u003e\u003c/summary\u003e\n\n**Claude Code (`cc/`)** - Pro/Max:\n- `cc/claude-opus-4-7`\n- `cc/claude-opus-4-6`\n- `cc/claude-sonnet-4-6`\n- `cc/claude-sonnet-4-5-20250929`\n- `cc/claude-haiku-4-5-20251001`\n\n**Codex (`cx/`)** - Plus/Pro:\n- `cx/gpt-5.5`\n- `cx/gpt-5.4`\n- `cx/gpt-5.3-codex`\n- `cx/gpt-5.2-codex`\n- `cx/gpt-5.1-codex-max`\n\n**GitHub Copilot (`gh/`)**:\n- `gh/gpt-5.4`\n- `gh/claude-opus-4.7`\n- `gh/claude-sonnet-4.6`\n- `gh/gemini-3.1-pro-preview`\n- `gh/grok-code-fast-1`\n\n**Cursor (`cu/`)** - Subscription:\n- `cu/claude-4.6-opus-max`\n- `cu/claude-4.5-sonnet-thinking`\n- `cu/gpt-5.3-codex`\n- `cu/kimi-k2.5`\n\n**GLM (`glm/`)** - $0.6/1M:\n- `glm/glm-5.1`\n- `glm/glm-5`\n- `glm/glm-4.7`\n\n**MiniMax (`minimax/`)** - $0.2/1M:\n- `minimax/MiniMax-M2.7`\n- `minimax/MiniMax-M2.5`\n\n**Kimi (`kimi/`)** - $9/mo flat:\n- `kimi/kimi-k2.5`\n- `kimi/kimi-k2.5-thinking`\n\n**Kiro (`kr/`)** - FREE unlimited:\n- `kr/claude-sonnet-4.5`\n- `kr/claude-haiku-4.5`\n- `kr/glm-5`\n- `kr/MiniMax-M2.5`\n- `kr/qwen3-coder-next`\n- `kr/deepseek-3.2`\n\n**OpenCode Free (`oc/`)** - FREE no-auth:\n- Auto-fetched from `opencode.ai/zen/v1/models`\n\n**Vertex AI (`vertex/`)** - $300 free credits:\n- `vertex/gemini-3.1-pro-preview`\n- `vertex/gemini-3-flash-preview`\n- `vertex/gemini-2.5-flash`\n- `vertex-partner/glm-5-maas`\n- `vertex-partner/deepseek-v3.2-maas`\n\n\u003c/details\u003e\n\n---\n\n## 🐛 Troubleshooting\n\n**\"Language model did not provide messages\"**\n- Provider quota exhausted → Check dashboard quota tracker\n- Solution: Use combo fallback or switch to cheaper tier\n\n**Rate limiting**\n- Subscription quota out → Fallback to GLM/MiniMax\n- Add combo: `cc/claude-opus-4-7 → glm/glm-5.1 → kr/claude-sonnet-4.5`\n\n**OAuth token expired**\n- Auto-refreshed by 9Router\n- If issues persist: Dashboard → Provider → Reconnect\n\n**High costs**\n- Enable RTK in Dashboard → Endpoint settings (default ON, saves 20-40% tokens)\n- Check usage stats in Dashboard\n- Switch primary model to GLM/MiniMax\n- Use free tier (Kiro, OpenCode Free, Vertex) for non-critical tasks\n\n**Dashboard opens on wrong port**\n- Set `PORT=20128` and `NEXT_PUBLIC_BASE_URL=http://localhost:20128`\n\n**First login not working**\n- Check `INITIAL_PASSWORD` in `.env`\n- If unset, fallback password is `123456`\n\n**No request logs under `logs/`**\n- Set `ENABLE_REQUEST_LOGS=true`\n\n---\n\n## 🛠️ Tech Stack\n\n- **Runtime**: Node.js 20+\n- **Framework**: Next.js 16\n- **UI**: React 19 + Tailwind CSS 4\n- **Database**: SQLite (better-sqlite3 / node:sqlite / sql.js fallback)\n- **Streaming**: Server-Sent Events (SSE)\n- **Auth**: OAuth 2.0 (PKCE) + JWT + API Keys\n\n---\n\n## 📝 API Reference\n\n### Chat Completions\n\n```bash\nPOST http://localhost:20128/v1/chat/completions\nAuthorization: Bearer your-api-key\nContent-Type: application/json\n\n{\n  \"model\": \"cc/claude-opus-4-6\",\n  \"messages\": [\n    {\"role\": \"user\", \"content\": \"Write a function to...\"}\n  ],\n  \"stream\": true\n}\n```\n\n### List Models\n\n```bash\nGET http://localhost:20128/v1/models\nAuthorization: Bearer your-api-key\n\n→ Returns all models + combos in OpenAI format\n```\n\n## 📧 Support\n\n- **Website**: [9router.com](https://9router.com)\n- **GitHub**: [github.com/decolua/9router](https://github.com/decolua/9router)\n- **Issues**: [github.com/decolua/9router/issues](https://github.com/decolua/9router/issues)\n\n---\n\n## 👥 Contributors\n\nThanks to all contributors who helped make 9Router better!\n\n[![Contributors](https://contrib.rocks/image?repo=decolua/9router\u0026max=150\u0026columns=15\u0026anon=1\u0026v=20260309)](https://github.com/decolua/9router/graphs/contributors)\n\n---\n\n## 📊 Star Chart\n\n[![Star Chart](https://starchart.cc/decolua/9router.svg?variant=adaptive)](https://starchart.cc/decolua/9router)\n\n\n\n## 🔀 Forks\n\n**[OmniRoute](https://github.com/diegosouzapw/OmniRoute)** — A full-featured TypeScript fork of 9Router. Adds 36+ providers, 4-tier auto-fallback, multi-modal APIs (images, embeddings, audio, TTS), circuit breaker, semantic cache, LLM evaluations, and a polished dashboard. 368+ unit tests. Available via npm and Docker.\n\n---\n\n## 🙏 Acknowledgments\n\nBuilt on the shoulders of giants:\n\n- **CLIProxyAPI** — original Go implementation that inspired this JavaScript port.\n- **[RTK](https://github.com/rtk-ai/rtk)** ![Stars](https://img.shields.io/github/stars/rtk-ai/rtk?style=flat\u0026color=yellow) — Rust token-saver. 9Router ports its compression pipeline to JS → **−20-40% input tokens** on every request.\n- **[Caveman](https://github.com/JuliusBrussee/caveman)** ![Stars](https://img.shields.io/github/stars/JuliusBrussee/caveman?style=flat\u0026color=yellow) by **[@JuliusBrussee](https://github.com/JuliusBrussee)** — viral *\"why use many token when few token do trick\"*. 9Router adapts its prompt → **−65% output tokens**.\n\nHuge thanks to these authors — without their work, 9Router's token-saving features wouldn't exist. ⭐ them on GitHub!\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤️ for developers who code 24/7\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecolua%2F9router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecolua%2F9router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecolua%2F9router/lists"}