hughminhphan/claudemix
32 stars · Last commit 2026-08-04
One Claude Code session, two subscriptions: Claude orchestrator + GPT executor subagents via a credential-clean loopback splitter
README preview
# claudemix
Run one Claude Code session that mixes models: a Claude model as the orchestrator, GPT subagents as executors. Your Claude subscription login is never proxied, stored, or re-signed; your OpenAI/Codex subscription powers the executor lanes.
```
Claude Code session
|
v
loopback splitter (127.0.0.1:8318, ~110 lines of Node you can read)
|
+-- model claude-* --> api.anthropic.com (byte-for-byte passthrough, your own OAuth headers)
+-- model gpt-* --> CLIProxyAPI :8317 (your Codex OAuth, local API key)
```
## Why this shape
Claude Code's API endpoint is process-global, so per-agent routing needs a gateway in front. Existing mixed-model setups put the Claude subscription login inside the proxy too, which re-originates your Claude traffic under a spoofed client identity. This project does not do that: Anthropic-bound requests pass through untouched with the session's own credentials, which is the same base-URL gateway pattern Anthropic documents for enterprise LLM gateways. Only `gpt-*` requests are re-authed, with a local key, to a CLIProxyAPI instance that holds only your OpenAI/Codex OAuth.
## Quick start (agent setup)