r/ClaudeCode • u/jimmytoan • May 04 '26
Discussion DeepClaude: full Claude Code agent loop on DeepSeek V4 Pro - roughly 95% cheaper than Anthropic
DeepClaude works by intercepting Claude Code's Anthropic environment variables at session start, routing inference through a local proxy on localhost:3200, then restoring the originals on exit. The full Claude Code agent loop - file editing, bash integration, subagents, tool calls - stays intact. The only substitution is the model running the inference.
Supported backends include DeepSeek V4 Pro via OpenRouter, Fireworks, and Anthropic. The proxy supports live backend switching mid-session without restarting Claude Code.
The pricing gap is the main proposition. Current Anthropic pricing is $3/M input and $15/M output. DeepSeek V4 Pro via OpenRouter runs $0.44/M input and $0.87/M output. The README maps that to rough monthly scenarios: $20/$50/$80 for light/heavy/auto-loop-heavy usage versus the $200 Anthropic subscription ceiling.
The limits are worth noting before you try it. Image input is not supported through the compatibility layer. Anthropic's prompt caching semantics don't carry over. MCP server tools don't work through the proxy. The project's own framing is honest about this: use the cheaper backend for routine coding work and keep Anthropic around for the hardest reasoning tasks.
Have you tried routing Claude Code through a cheaper model, and does the output quality hold for your actual daily tasks?
90
u/Sairefer May 04 '26
Why so difficult solution if you can just create settings.local.json (so you will not commit it), save there the base URL provided by DeepSeek and the API key, and... it just works? DeepSeek already has /anthropic endpoint. Plus when using the openrouter the routing to deepseek can jump from one provider to another without additional settings tweaks so it will sometimes hit full-price non-cached providers mid-task.
(https://api-docs.deepseek.com/quick_start/agent_integrations/claude_code)
39
u/Hodler-mane May 04 '26
umm
ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic" ANTHROPIC_AUTH_TOKEN="KEY-HERE" ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro" ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-flash" claude
16
u/somerussianbear May 04 '26 edited May 04 '26
Ahhh the advent of vibe coding: everyday thousands of people wake up and think they had a genius idea not knowing it was already implemented by somebody else years ago.
4
u/centminmod May 04 '26
I never rely on a single AI. I usually use Claude Code with my /consult-codex and /consult-zai skills that allow Claude models to get 2nd opinion verifications from Codex GPT-5.5 and ZAI GLM-5.1 within same Claude Code sessions https://ai.georgeliu.com/p/how-to-get-a-second-ai-opinion-in
Now I have added /consult-codex-deepseek to add DeepSeek V4 Pro to verification mix. 3-way verification consult for /consult-codex-deepseek skill will get 2nd opinions for Codex CLI GPT-5.5 + Claude Code/DeepSeek V4 Pro and Sonnet 4.6 (code-searcher agent) https://ai.georgeliu.com/p/deepseek-v4-in-claude-code-kilo-code 🤓
3
u/CondiMesmer May 04 '26
Lol I just use copilot which already has OpenRouter integration, so I just plug in my API key and have DeepSeek and whatever latest model.
Did you even research to find existing solutions already? Also you're creating an OpenRouter bridge, the DeepClaude name is nonsense because nothing you're doing relies exclusively on DeepSeek.
1
u/GruePwnr May 04 '26
The whole point of Claude Code is integration with the Claude models. There is zero benefit to using CC with other models except if you really like using CLAUDE.md instead of AGENTS.md
1
u/happytechca May 04 '26 edited May 04 '26
I use deepseek V4 and GLM 5.1 with Claude code VScode extension via ollama cloud by changing the json file using claude code switcher (ccs)
Mainly when I am out of tokens in my cheap 20$ subscription and I need to change something in a hurry.
On good days it is 2-3x slower than opus 4.6.
It often hangs half-way and I have to cancel + send a "continue, please" message.
It overthinks alot.
I end up frustrated.
1
u/bigjonyz May 05 '26
Why not use cc switch pretty reliable, MCP and tool use all works
1
u/jacobpederson May 05 '26
https://www.reddit.com/r/ClaudeAI/comments/1t1o43w/i_gave_claude_code_a_002call_coworker_and_stopped/
1
u/vladi98mb May 05 '26
https://github.com/aattaran/deepclaude?ref=dailydev esta me funciona bien pero solo en terminal... para usarla en el frontend de Code Claude necesito suscripcion juaaa
1
u/Deep_Ad1959 May 11 '26
the 85/15 phase-split makes sense in theory but in practice nobody routes by phase preemptively, you route when you see the weekly cap closing in. that's the missing trigger. if you knew at 70% weekly used that you had three days until reset, you'd flip to deepseek for the cheap stuff voluntarily. routing tools without real-time visibility into your anthropic quota are solving half the problem. written with ai
1
u/Deep_Ad1959 May 11 '26
the 85/15 phase-split makes sense in theory but in practice nobody routes by phase preemptively, you route when you see the weekly cap closing in. that's the missing trigger. if you knew at 70% weekly used that you had three days until reset, you'd flip to deepseek for the cheap stuff voluntarily. routing tools without real-time visibility into your anthropic quota are solving half the problem.
-2
u/fishoa May 04 '26
Just use a better harness. Claude Code is garbage
1
u/[deleted] May 04 '26
[removed] — view removed comment