About this project
CC Router is a smart reverse proxy designed specifically for routing requests from Claude Code through the Anthropic Messages API to various backend AI models. It enables dynamic selection of models based on detected agent roles (e.g., analyst, debugger, planner), orchestrator tiers (haiku/sonnet/opus), and special handling for topic summarization tasks. The router integrates with oh-my-claudecode for agent detection via SubagentStart hooks and supports configuration via JSONC files that can be edited interactively in a terminal UI (TUI) without restarting. It includes real-time metrics tracking request latency, tokens per second, and routing decisions. Configuration supports multiple LLM providers including Anthropic, OpenRouter, Z.AI, KIMI, Deepseek, MiniMax, Alibaba Qwen, and local llama.cpp instances. Hot reload allows config changes to take effect immediately. The tool is installable via Bun, NPM, or Docker, and exposes environment variables for port customization. Routing logic prioritizes topic summarizer detection first, then agent-specific mapping, then fallback to orchestrator tier-based routing. Users can extend supported models by adding entries to the config file and mapping agents accordingly. MIT licensed.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.