Claude Code model router

Claude Code Model Router

A lightweight API gateway that lets you switch to third-party AI models when using Claude Code.

Install

Install
npx claude-code-model-router@latest setup

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/luwill/Claude-Code-Model-Router.git

From the README

๐Ÿ”€ ccmr โ€” Claude Code Model Router

Switch between 40+ third-party models mid-conversation โ€” no restarts, no config editing.

ccmr is a lightweight gateway that runs on your machine: Claude Code talks to it, and it forwards every request verbatim to whichever model you pick โ€” DeepSeek, Kimi, Qwen, GLM, MiniMax, Step, MiMo or Doubao Seed, 44 models across 8 vendors, all prewired. Type /model kimi in a session and the very next message runs on Kimi. When a key dies, the error tells you exactly which env var to fix, where to get a new key, and the command that verifies it. Config edits hot-reload in about a second. Loopback-only by default; everything stays local.

English ยท ็ฎ€ไฝ“ไธญๆ–‡

Why ccmr

For most setups, switching models means editing env vars or config files and restarting Claude Code. ccmr is a live gateway: switching happens inside the session (/model, effective on the next message, context preserved), because Claude Code always faces one stable local address โ€” the change happens behind it.

Honest scope: ccmr is an Anthropic-protocol passthrough gateway โ€” it does no protocol conversion and only talks to vendors' official Anthropic-compatible endpoints (that's why Zhipu CN is supported via its Coding Plan only: its pay-as-you-go side offers no Anthropic endpoint). Streaming, tool calls and thinking blocks are forwarded as-is; your context is never parsed or rewritten.

Quick start
You can also run the gateway in the foreground with ccmr start (logs in your terminal); gateways auto-started by ccmr claude log to ~/.ccmr/gateway.log.
Plain claude still uses your official subscription โ€” the two modes have fully isolated configs.

Commands
Config discovery: -c path > ./models.yaml > ./config/models.yaml > ./.claude-router.yaml > ~/.ccmr/models.yaml. An explicit -c thatโ€ฆ
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
19 October 2026

FAQ

What is Claude Code Model Router?

A lightweight API gateway that lets you switch to third-party AI models when using Claude Code. It is a model router for Claude Code, from luwill/Claude-Code-Model-Router on GitHub.

How do I install Claude Code Model Router?

Run npx claude-code-model-router@latest setup, then follow the setup in the README.

Is Claude Code Model Router popular?

luwill/Claude-Code-Model-Router has 35 GitHub stars and 3 forks. It was last updated on 19 October 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.