Claude Code Model Rotator
BheeshamKS/ClaudeCode-Model-Rotator
Use qualquer modelo com o Claude Code oficial, sem estar preso ao provedor
Ver no GitHubWrapper que liberta o Claude Code TUI oficial dos limites de um único provedor, permitindo usar modelos gratuitos do OpenRouter e modelos locais/cloud do Ollama. Funciona através de um proxy LiteLLM dinâmico que intercepta requisições mantendo sua sessão Anthropic segura.
Instalação
npx convez-ai BheeshamKS/ClaudeCode-Model-Rotator1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Testar múltiplos modelos de código com a mesma IDE
- Rodar Claude Code com modelos locais via Ollama
- Acessar modelos gratuitos do OpenRouter no TUI oficial
- Economizar custos usando modelos alternativos mantendo a experiência nativa
Veredito

Solução técnica bem arquitetada para quem quer liberdade de modelo sem abandonar a UX do Claude Code oficial. Instalação automatizada e suporte a Ollama/OpenRouter tornam acessível, mas requer conforto com terminal e gerenciamento de chaves API.
README
A tradução para o português deste README ainda está na fila.
🔄 Claude Code Multi-Provider Rotator
A lightweight, automated wrapper for the official Claude Code TUI.
By default, Anthropic's Claude Code locks you into their ecosystem. This tool uses a dynamic LiteLLM proxy and "Ghost Config" authentication to completely bypass the Anthropic firewall, allowing you to seamlessly code using free local models via Ollama Cloud and high-context free models via OpenRouter.
✨ Features
-
Zero-Touch Proxy: Automatically builds and spins up a hidden Python translation server in the background and kills it when you exit.
-
Ghost Config: Safely hides your official Anthropic web session so you don't lose your login when switching to free APIs.
-
Native Ollama Support: Direct routing to Ollama Cloud for high-speed local models.
-
Noob-Friendly Installer: Sets up everything, including the virtual environment and global terminal aliases, with one command.
💻 OS Support
| OS | Status | Notes |
|---|---|---|
| Linux (Ubuntu/Debian) | Native | Works out of the box |
| macOS | Native | Works out of the box |
| Windows | Via WSL2 | Run inside a WSL terminal |
Windows Setup (WSL2)
Your script is bash-based and won't run in a regular Windows terminal (CMD or PowerShell). The fix is WSL — it gives you a real Linux terminal inside Windows.
- Open PowerShell as Administrator and run:
wsl --install - Restart your PC, then open the Ubuntu app from the Start Menu.
- Run the installer command below inside that Ubuntu terminal — everything works identically to Linux.
🚀 Installation
Linux & macOS
Open your terminal and paste:
curl -sSL https://raw.githubusercontent.com/BheeshamKS/ClaudeCode-Model-Rotator/main/install.sh | bash
Windows
Open your WSL/Ubuntu terminal and paste the same command:
curl -sSL https://raw.githubusercontent.com/BheeshamKS/ClaudeCode-Model-Rotator/main/install.sh | bash
During installation:
- The script downloads core files and checks for Ollama.
- It will ask for your OpenRouter API Key (get one free at openrouter.ai).
- It builds the translation proxy and sets up the
claude-rotatorcommand.
🖥️ How to Use
Type this in any project folder:
claude-rotator
Auth Warning: If you see a warning about "sk-ant-dummy" or authentication on first run, ignore it — this is expected. The proxy intercepts the request and everything works fine.
First-Time Setup: When using a new provider, Claude may ask you to confirm a custom API key. Select 1. Yes and you'll be dropped into the terminal.
🤖 Supported Models
Pre-configured with the best free coding models that can handle Claude Code's massive background tool payloads.
Ollama Cloud:
qwen3.5:cloudkimi-k2.5:cloudglm-5:cloudminimax-m2.7:cloud
OpenRouter (Free Tier):
qwen/qwen3.6-plus:freenvidia/nemotron-3-super-120b-a12b:freestepfun/step-3.5-flash:freearcee-ai/trinity-large-preview:free
🛠️ Troubleshooting
"I keep getting Auth Conflicts!"
If you force-quit the terminal before the rotator could clean up, your official Anthropic login might still be hidden. Run claude-rotator and select Option 4 (Fix Auth Conflict) to instantly restore it.
"Where are my API keys saved?"
Your API keys are stored in ~/.claude-rotator/.env. Edit this file anytime to update your OpenRouter key.
🗑️ Uninstall
curl -sSL https://raw.githubusercontent.com/BheeshamKS/ClaudeCode-Model-Rotator/main/uninstall.sh | bash