Router for Claude Code requests
Top 5.7% on sourcepulse
This project provides a framework for routing requests to different coding models, aiming to reduce costs and improve efficiency by leveraging specialized models for specific tasks. It's designed for developers and researchers experimenting with LLM-based coding infrastructure who want to integrate Anthropic's Claude Code capabilities with potentially more cost-effective or specialized open-source models.
How It Works
The router operates in two modes: Normal and Router. Router mode, the primary focus, dispatches tasks to distinct models: a lightweight "router" model (e.g., qwen2.5-coder-3b) for initial request classification, a "tool invoker" model (e.g., qwen-max-0125) for function calling, a "coder" model (e.g., deepseek-v3), and a "reasoning" model (e.g., deepseek-r1). This separation allows for the use of models without function-calling capabilities for coding tasks, while leveraging KV-Cache support to minimize token consumption and costs.
Quick Start & Requirements
npm install -g @anthropic-ai/claude-code
git clone https://github.com/musistudio/claude-code-reverse.git
npm i
node index.mjs
.env
file.Highlighted Details
Maintenance & Community
Licensing & Compatibility
@anthropic-ai/claude-code
, which implies potential dependencies on Anthropic's terms of service.Limitations & Caveats
This project is explicitly stated to be for testing purposes and may consume significant tokens, fail to complete tasks, or incur high costs. The "Normal Mode" requires a single model that supports function calling and a large tool description length.
1 day ago
Inactive