DeepClaude – Claude Code agent loop with DeepSeek V4 Pro

523 points - yesterday at 10:13 PM

Source

Comments

aftbit yesterday at 11:16 PM

    #!/bin/sh
    export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
    export ANTHROPIC_AUTH_TOKEN=sk-secret
    export ANTHROPIC_MODEL=deepseek-v4-flash
    export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
    exec claude $@
vitaflo yesterday at 11:07 PM
I'm not exactly sure what the point of this is. Deepseek already has instructions to use its API with many CLI's including Claude Code directly:

https://api-docs.deepseek.com/quick_start/agent_integrations...

rsanek today at 9:01 AM
>DeepSeek V4 Pro scores 96.4% on LiveCodeBench and costs $0.87/M output tokens

This is a heavily subsidized price and will only last until the end of the month: "The deepseek-v4-pro model is currently offered at a 75% discount, extended until 2026/05/31 15:59 UTC." [0]

The "supported backends" table is also deceiving -- while OpenRouter's server's may be in the US, the only way to get the $0.44/$0.87 pricing is to pass through to the DeepSeek API, which of course is China-based. [1]

I do think the model is quite good, I myself use it through Ollama Cloud for simple tasks. But I think some folks have bought in a little too much to the marketing hype around it.

[0] https://api-docs.deepseek.com/quick_start/pricing [1] https://openrouter.ai/deepseek/deepseek-v4-pro/providers

justech yesterday at 11:36 PM
If you're looking for Claude Code alternatives, I would first suggest looking into pi.dev or opencode for your harness. And then for models, you can choose from OpenCode Go (IMO most cost effect at this moment), OpenRouter, or direct from DeepSeek. Better if you go the Kimi route IMO and just buy a subscription from kimi.com
syntex today at 8:39 AM
Not sure you can replace Claude with DeepSeek V4 that easily and have same results.

From what I see while building my own agentic system in Elixir, the problem is in training for your specific harness/contracts. Claude/GPT-style models seem to be trained around very specific contracts used by the harness like tool call formats, planning structure, patching, reading files, recovering from errors, and knowing when to stop.

In practice, you either need a very strong general model that can infer and follow those contracts (expensive), or a weaker model that has been fine-tuned / trained specifically on your own agent contracts. Otherwise, the whole thing becomes flaky very quickly. And I suspect with Deepseek V4 you may get last options.

isege today at 7:22 AM
> Claude Code is the best autonomous coding agent.

If you look at the terminal-bench@2.0 leaderboard, you'll quickly see it's actually one of the weakest agentic harnesses. Anthropic's own models score lower with Claude Code than with virtually any other harness.

So it's quite the opposite. Claude Code is arguably the worst harness to run models with.

l5870uoo9y today at 7:25 AM
> DeepSeek V4 Pro scores 96.4% on LiveCodeBench and costs $0.87/M output tokens.

Yes and this is a temporary discount which increases to 3.48 USD on 2026/05/31 15:59 UTC.

Source: https://api-docs.deepseek.com/quick_start/pricing

TheServitor today at 5:36 AM
It's surprisingly easy to hit $200 worth of tokens even at ~$1/M token though. No matter how many times I do the math the coding plans are the better value.
izietto today at 8:12 AM
Just want to say that I faced this very problem the last week, I discovered OpenCode agent and it works great, with DeepSeek and other models. Try it out guys.
_345 yesterday at 11:02 PM
If you're okay with sonnet level performance, this sounds like a straight upgrade. But I find that sonnet messes up too much, that it ends up not being worth cost optimizing down to using it or another sonnet-level model. Glad to have this as an option though
dopeepsreaddocs today at 1:34 AM
Did... Did you just ask an AI to one-shot something that normally amounts to no more than setting two env variables?
diamondosas today at 11:08 AM
I have a question. does anyone have a problem with switihng context between AI and your terminal
lukaslalinsky today at 6:37 AM
I've been using DeepSeek v4 pro as an alternative to Claude models and for the first time I can see it as a real replacement. With the other Chinese models, I was missing something, but DeepSeek seems good enough for the kind of development I want to do.
zkmon today at 10:08 AM
Next claude news (trump style): Recent versions of Claude code no longer allow talking to other models, or helping with any code that has the goal of moving away from anthropic models.
alexdns yesterday at 11:06 PM
obviously vibe coded ( co authored ) + the prices dont even match
jay1996523 today at 6:35 AM
Claude code can already use the DeepSeek API, so what are the advantages of this tool?
nclin_ today at 2:15 AM
Is claude code the best coding harness? Anyone running evals on that?
shay1607m today at 9:23 AM
Interesting setup

do you have any benchmarks on: - token usage over time - failures/retry rates

would be great to see how it behaves in production

orliesaurus yesterday at 10:55 PM
Is there a way to do this directly by using claudecode CLI (which I already have installed) and openrouter??
999900000999 today at 3:15 AM
I just spent half my day getting CUDA and LLAMA to work with my 5070TI.

I was able to use it in agent mode with Roo, I stopped after having it write out a plan, but I'll continue when I have more time.

Deepseek feels less likely to do a straight up rug pull since you can self host with enough money, but I'm still more excited about local solutions.

Usually I just need grunt work done. I'm not solving difficult problems.

sowild_fun today at 4:00 AM
Using a bunch of CLIs to work with DeepSeek V4, I've found that Langcli is the best fit for DeepSeek V4. For programming tasks, the cache hit rate is above 95%.

Not only can it seamlessly and dynamically switch between DeepSeek V4 Flash, V4 Pro, and other mainstream models within the same context, but it is also 100% compatible with Claude Code.

langitbiru today at 3:16 AM
I'm wondering why DeepSeek didn't create an AI coding agent like Kimi Code.
vagab0nd today at 12:28 AM
This has become a problem for me. I like trying new things. But I also know that in about a week, there's going to be a better/cheaper setup. And a week after that. And ideally I'd like to get some coding done when I'm not tinkering with the tools.

So I think I'll stay with CC for now.

deleted yesterday at 10:57 PM
deleted yesterday at 11:44 PM
Copenjin today at 7:08 AM
I wonder if openrouter will replicate that 120x caching, I suppose they will?
DeathArrow today at 5:53 AM
You don't need Deep Claude. Claude Code is working with any model that exposes an endpoint for an Anthropic compatible API.

I am using Claude Code with GLM 5.1, MiniMax M2.7, Kimi K2.6 and Xiaomi MiMo V2.5 Pro.

dbeley today at 3:28 AM
Honestly with the likes of Opencode / pi / hermes I don't really find the "Claude Code agent loop" part particularly interesting.

The edge Anthropic has on others lies on its models performance. CLI tooling (and obviously pricing) is definitely not better than others.

akartit today at 10:23 AM
why not opencode with deepseek?
itrunsdoomguy today at 9:22 AM
Does it play Doom?
tgautot today at 7:57 AM
Nice, it's quite usefull to have a project like this which streamlines the setup necessary to use other "brains" in claude code "body". I personally will give this a try, but Ijust find the message on pricing a bit disingenuous, the deepseek price of "$0.87/M output tokens" is a discount, and this setup anyways needs a calude.ai subscription offering claude code, which now is 100$/month min.
Lihh27 yesterday at 11:55 PM
the wrapper is basically env var glue. You’re still betting the whole loop on Anthropic's closed client.
game_the0ry today at 12:00 AM
Cost engineering [1] will be the next hot topic for AI.

[1] A fancier way of saying "reducing cost."

karel-3d today at 8:59 AM
Can I... somehow run this locally? DeepSeek is opensource? Do I even need their API key?

(I have no experience with running anything locally, maybe it's a stupid question)

Tanxsinxlnx today at 7:56 AM
does it support aws bedrock provider
triyambakam today at 4:00 AM
And if I don't care about cost, what about actual performance?
dukeofdoom today at 2:59 AM
Is there some way to make claude/codex beep when it finishes a task.
esafak yesterday at 10:59 PM
Why wouldn't you use something open source like OpenCode, which already support DSv4 and has more features than CC?
deleted yesterday at 10:56 PM
portsentinel today at 3:43 AM
I am now thinking how far can agentic AI can go how far we can achieve
fHr today at 1:30 AM
layer on layer on layer to refactor bunch of lines xD
deleted today at 12:11 AM
2ndorderthought yesterday at 11:04 PM
Oh shoot now the next CC upgrade will blow your subscription for doing this
morpheos137 yesterday at 11:26 PM
anthropic messed up big time harness works with any muh commodity LLM, meanwhile VCs were duped on the myth of FOOM AGI, probably not a cooincidence Anthropic is enmeshed with the scifi fan fic forum known as lesswrong. The world wants useful tools. The bay area bubble in contrast thrives on Mythos.
claud_ia today at 10:04 AM
[dead]
dividendflow today at 9:20 AM
[flagged]
alattaran yesterday at 10:13 PM
[flagged]
aliljet today at 4:27 AM
[dead]
kk_mors today at 3:06 AM
[dead]
volume_tech today at 12:34 AM
[flagged]
deadbabe today at 12:19 AM
I had a call with our CTO and we are pivoting away from Claude Code to DeepClaude because the cost savings are too substantial to ignore.