Route Claude Desktop (and Claude Code CLI) through DeepSeek — pay DeepSeek API rates instead of Anthropic's subscription tier.
Setup guide: docs/GUIDE.md | Team guide (Claude Code / VS Code / Cursor): docs/TEAM-GUIDE.md
npx deepclaude-mixed-setupPaste your DeepSeek API key when prompted. Claude Desktop restarts with DeepSeek routing active.
Get a key: platform.deepseek.com/api_keys
Requirements: Node.js 18+, Claude Desktop installed. macOS / Windows 10+ / Linux (systemd).
| Picker | Backend | Notes |
|---|---|---|
| Opus 4.6 | DeepSeek V4 Pro | Matches reasoning quality |
| Sonnet 4.6 | DeepSeek V4 Pro | Default workhorse |
| Haiku 4.5 | DeepSeek V4 Flash | Fast + cheap |
Switch mid-chat via picker — no restart needed.
The proxy supports two modes. Switch any time, no reinstall needed.
claude-mode 3p # route through DeepSeek (default after install)
claude-mode 1p # use your Anthropic Pro subscription directly
claude-mode toggle # flip current mode
claude-mode status # show current modeWhat changes:
3p— Claude Desktop sends requests to your local proxy → DeepSeek API1p— Claude Desktop talks directly to Anthropic servers (your Pro plan)
Restart Claude Desktop after switching mode for it to take effect.
Existing installs: re-run the installer to deploy the latest proxy script.
npx deepclaude-mixed-setup@latestYour API key is not re-asked if already set in the auto-start config.
v0.1.2 fix: Thinking blocks were incorrectly stripped on DeepSeek routes, causing 400 errors on multi-turn conversations with extended thinking enabled. Fixed — existing users must upgrade.
# Mode switching
claude-mode 3p | 1p | toggle | status
# Proxy health
curl -s http://127.0.0.1:3200/_proxy/status
# Uninstall
npx deepclaude-mixed-uninstall- Installer writes a Claude Desktop gateway profile under
Claude-3p/configLibrary/ - Sets
deploymentMode = "3p"in Claude's config — activates third-party inference - Installs auto-start service (LaunchAgent / systemd / Task Scheduler) running local proxy on
127.0.0.1:3200 - Proxy intercepts Claude's API calls, remaps model names to DeepSeek equivalents
- Thinking blocks from DeepSeek are preserved and echoed back on multi-turn (required by DeepSeek API); stripped only when forwarding to Anthropic
| Path | Purpose |
|---|---|
~/.deepclaude-mixed/mixed-proxy.mjs |
Proxy script (auto-started) |
Claude-3p/configLibrary/<uuid>.json |
Gateway profile |
Claude-3p/claude_desktop_config.json |
deploymentMode: "3p" |
macOS: ~/Library/LaunchAgents/com.deepclaude.proxy.plist |
Auto-start |
Linux: ~/.config/systemd/user/deepclaude-proxy.service |
Auto-start |
Windows: Task Scheduler DeepclaudeProxy |
Auto-start |
curl -s http://127.0.0.1:3200/_proxy/statusExpected:
{
"mode": "mixed",
"deepseekKey": "set",
"routes": {
"opus": "deepseek-v4-pro",
"sonnet": "deepseek-v4-pro",
"haiku": "deepseek-v4-flash"
}
}Proxy not running.
macOS:
launchctl list | grep deepclaude
tail /tmp/com.deepclaude.proxy.err.log
# Restart:
launchctl unload ~/Library/LaunchAgents/com.deepclaude.proxy.plist
launchctl load ~/Library/LaunchAgents/com.deepclaude.proxy.plistLinux:
systemctl --user status deepclaude-proxy
journalctl --user -u deepclaude-proxy -fWindows:
schtasks /Query /TN DeepclaudeProxy
type %TEMP%\deepclaude-proxy.err.logIn 1p mode. Run claude-mode 3p then restart Claude Desktop.
Outdated proxy script. Run npx deepclaude-mixed-setup@latest.
Run npx deepclaude-mixed-setup@latest for latest model names.
Three sandbox layers exist. v0.1.6+ writes all three. If still blocked:
-
Verify managed-settings.json present (Cowork honors only this):
sudo cat "/Library/Application Support/ClaudeCode/managed-settings.json"Must contain
sandbox.network.allowedDomainswith target hosts. -
Full quit Claude Desktop, not window close:
pkill -9 -f "Claude.app"; pkill -9 -f "Claude Helper"; sleep 2; open /Applications/Claude.app
Sandbox config loads at process start.
-
Re-run installer to regenerate all three layers:
npx deepclaude-mixed-setup@latest
Provide sudo password when prompted.
Stale ~/.zshrc exports from manual setup phase override the gateway. Check:
grep -E "ANTHROPIC_BASE_URL|ANTHROPIC_DEFAULT|CLAUDE_CODE_SUBAGENT_MODEL|ANTHROPIC_AUTH_TOKEN" ~/.zshrcIf anything matches, remove those lines. They predate the npm package and bypass the local proxy. After cleaning:
source ~/.zshrc
pkill -9 -f "Claude.app"; sleep 2; open /Applications/Claude.appSame applies to ~/.bashrc, ~/.zprofile, /etc/launchd.conf, and launchctl getenv ANTHROPIC_BASE_URL. Clean them all.
Different problem. Sandbox is not blocking — the destination server requires auth. Provide the bearer token to the subagent or unblock its credential source. Not a deepclaude-mixed bug.
Set ANTHROPIC_API_KEY in the auto-start config. Opus picker routes to api.anthropic.com; Sonnet and Haiku stay on DeepSeek.
- macOS: edit
~/Library/LaunchAgents/com.deepclaude.proxy.plist→ add toEnvironmentVariables - Linux: edit
~/.config/systemd/user/deepclaude-proxy.service→ addEnvironment=ANTHROPIC_API_KEY=sk-ant-... - Windows: re-run installer with
ANTHROPIC_API_KEYenv var set
Restart proxy service after edit.
npx deepclaude-mixed-uninstallRemoves proxy script and auto-start service. Claude-3p profiles remain — delete via Claude Desktop UI if desired.
- API key stored in OS auto-start config, never in plaintext files elsewhere
- Proxy listens on
127.0.0.1only — no external network access - No telemetry, no phoning home
- Thinking blocks from DeepSeek preserved in-flight (required by API); stripped only before forwarding to Anthropic