Claude Code Router 中文版 A powerful tool to route Claude Code requests to different models and customize any request. ✨ Features Model Routing : Route requests to different models based on your needs (e.g., background tasks, thinking, long context). : Route requests to different models based on your needs (e.g., background tasks, thinking, long context). Multi-Provider Support : Supports various model providers like OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow. : Supports various model providers like OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow. Request/Response Transformation : Customize requests and responses for different providers using transformers. : Customize requests and responses for different providers using transformers. Dynamic Model Switching : Switch models on-the-fly within Claude Code using the /model command. : Switch models on-the-fly within Claude Code using the command. GitHub Actions Integration : Trigger Claude Code tasks in your GitHub workflows. : Trigger Claude Code tasks in your GitHub workflows. Plugin System: Extend functionality with custom transformers. 🚀 Getting Started 1. Installation First, ensure you have Claude Code installed: npm install -g @anthropic-ai/claude-code Then, install Claude Code Router: npm install -g @musistudio/claude-code-router 2. Configuration Create and configure your ~/.claude-code-router/config.json file. For more details, you can refer to config.example.json . The config.json file has several key sections: PROXY_URL (optional): You can set a proxy for API requests, for example: "PROXY_URL": "http://127.0.0.1:7890" . LOG (optional): You can enable logging by setting it to true . The log file will be located at $HOME/.claude-code-router.log . APIKEY (optional): You can set a secret key to authenticate requests. When set, clients must provide this key in the Authorization header (e.g., Bearer your-secret-key ) or the x-api-key header. Example: "APIKEY": "your-secret-key" ....
First seen: 2025-07-28 03:31
Last seen: 2025-07-28 12:32