gaztrabisme/claude-sub-proxy
5 stars · Last commit 2026-04-15
Lightweight proxy that reroutes Claude Code subagent calls to cheaper third-party models while keeping your main model on your Anthropic subscription
README preview
# claude-sub-proxy
A lightweight proxy with a built-in CLI that reroutes Claude Code subagent calls to cheaper third-party models while keeping your main model on your Anthropic subscription.
**The problem**: Claude Code routers like [CCR](https://github.com/musistudio/claude-code-router) and [CCM](https://github.com/9j/claude-code-mux) require an Anthropic API key. If you're on a Claude Pro/Max subscription (OAuth), they can't authenticate your main model requests.
**The solution**: This proxy passes through your subscription auth untouched for the main model (Opus), and reroutes subagent requests (Haiku, Sonnet) to a cheaper provider using regex matching on the model name.
```
Claude Code → claude-sub-proxy → Opus requests → api.anthropic.com (your subscription)
→ Haiku requests → third-party API (e.g. MiniMax)
→ Sonnet requests → third-party API (e.g. MiniMax)
```
## Quick start
```bash
# Install the CLI from GitHub
curl -fsSL https://raw.githubusercontent.com/gaztrabisme/claude-sub-proxy/master/install.sh | bash