Skip to main content
All articles

DeepSeek V4-Flash instead of Opus: where it holds

Three weeks on the preview inside Claude Code, and this morning the 0731 weights under MIT

AIDevOps

7 min read

The invoice, not the benchmark

One agent session, the kind where it reads half a repository and then rewrites twenty files, burns roughly two million input tokens and three hundred thousand output. On Claude Opus 4.8, at $5 per million in and $25 out, that is $17.50. For one session. Run three a day and the model costs more than the infrastructure serving what it wrote.

When the agent is deciding something hard, I do not mind the number. I mind it when I am handing it mechanical work, which is most of the time.

What shipped on July 31

This morning DeepSeek published the V4-Flash-0731 weights on Hugging Face, MIT licensed, 167 GB. I have been on the preview for three weeks. This checkpoint only reruns the post-training: same architecture, 284 billion total parameters, 13 billion active per token, hybrid CSA plus HCA attention, a 1M-token input window and 384K out.

The line that matters is the price list.

Per 1M tokensInputOutputCached input
V4-Flash$0.14$0.28$0.0028
Opus 4.8$5.00$25.00n/a

35x cheaper on input, 89x on output. And $0.0028 is not a discount, it is a different order of magnitude: 1785x under Opus. For an agent that resends the system prompt and the conversation on every tool call, that column is most of the bill.

A price list does not tell you whether the work comes out done, though. To find that out I had to put it where I work.

Two environment variables, and Claude Code talks to Ollama Cloud

What got me to try it properly is that I did not have to open a new account. I already pay for Ollama Cloud, and the model is sitting in there.

ollama signin
ollama run deepseek-v4-flash:cloud

That works straight away, but a bare chat was not the point. I wanted the agent, with its tools and its permissions. Claude Code speaks the Anthropic Messages format. Ollama exposes an OpenAI-compatible endpoint. So something has to translate in between. I used LiteLLM, which serves /v1/messages and forwards to whatever provider you point it at.

config.yaml
model_list:
  - model_name: flash
    litellm_params:
      model: openai/deepseek-v4-flash:cloud
      api_base: https://ollama.com/v1
      api_key: os.environ/OLLAMA_API_KEY
litellm --config config.yaml --port 4000
 
export ANTHROPIC_BASE_URL=http://localhost:4000
export ANTHROPIC_AUTH_TOKEN=anything
export ANTHROPIC_MODEL=flash
claude

Four lines, and the CLI I open every day is talking to a different model with the same prompt and the same tools. It is the only honest way to compare them. Swap the harness too and you are no longer measuring the model.

One note on billing: Ollama Cloud charges GPU time, not tokens, so inside the subscription you never see the numbers in that table. Three weeks of daily use and I did not hit the ceiling on the $20 plan.

Where it held: refactors and whole features

I gave it the work I would have given the other model anyway. A refactor crossing twelve files, the kind where each edit is trivial and the difficulty is remembering at file nine what you decided at file two. Then a feature end to end: provider, component, translations in both locales, tests.

What I did not expect is that it followed the thread. It opened files in a sensible order, did not invent functions that are not in the repository, and got to the end with something that compiled. On that kind of work, building rather than deciding, the gap to Opus 4.8 felt small. Small enough that I am not paying 89x to close it.

The habit before a big rework did not change either: I have it draw the map of the system first, then let it work. It handled that the way I expected.

Where it sent me back

Then there is the place it breaks, and it is always the same one: long tasks.

I saw the pattern three times. I set a constraint up front, something like do not touch the translation files until I say so. It holds for ten, twelve tool calls. Around the twentieth it touches them. The code is not wrong. The instruction is gone. In an agent that is worse than a syntax error, because a syntax error shows up immediately and a dropped constraint shows up in the diff, if you look.

DeepSeek's own table has the same shape

I ran those three weeks without numbers, because there were none. This morning, alongside the weights, DeepSeek published its own. The row I care about is not the one where it wins. It is where it loses.

DeepSeek table with nine agentic benchmarks as rows and five models as columns: V4-Flash-0731, V4-Flash-Preview, V4-Pro-Preview, GLM-5.2 and Opus-4.8. Flash-0731 scores 82.7 on Terminal Bench 2.1 against 85.0 for Opus, and 54.2 on NL2Repo against 69.7Full size
Nine agentic benchmarks: this morning's weights, the preview I actually ran, V4-Pro-Preview, GLM-5.2 and Opus 4.8.

Read the distance from Opus row by row. Terminal Bench 2.1 is 2.3 points. DeepSWE is 3.6. Agents' Last Exam is half a point, which is noise. Then DSBench-Hard is 12.1, and NL2Repo is 15.5. NL2Repo is the one where you start from a description in plain English and have to produce an entire repository: nothing tells you which files exist, and nothing stops you when you wander off.

That jump is a chart of the thing I had felt with the diff open. Where the target is given and the steps are few, the gap is noise. Where you build the target as you go, it opens up. I did not infer that from the table. I found it there after already paying for it in hours.

There is a second column worth reading, and it is the one that concerns me. V4-Flash-Preview is what I ran for three weeks, and it is a different animal: 7.3 on DeepSWE against 54.4 for this morning's checkpoint, 38.7 on Cybergym against 76.7. Same architecture, post-training redone, and the numbers are not related.

So everything above, the refactors that held and the constraint dropped at tool call twenty, describes the weaker of the two. I have had the 0731 weights for a few hours. I will put the same tasks through the same CLI, but I have nothing to report yet, and I would rather say so than pass the preview's impressions off as these.

The table also carries GLM-5.2, the other open checkpoint people actually run, and Flash is ahead of it on every row. That is a fight between open weights, though, and it is not the one that shows up on my invoice.

How the work is split now

I did not replace anything. I moved a line.

  • On Flash: reading repositories, first-pass refactors, tests over code that already exists, translations, and anything with an output I can check in thirty seconds.
  • On Opus: the long session, the architectural call, debugging something I do not understand yet.

The rule is not how hard the task is. It is how many steps it has, and how expensive it is to notice late that it went wrong. I drew that line on the preview, and this morning's table gives me no reason to move it today: the two big gaps still land exactly on the work I keep on Opus.

Next time you open a session for mechanical work, the kind where you already know what has to come out and you just need someone to type it, check what it cost you. If you already pay for Ollama Cloud, trying the alternative is two commands.

Got a project in mind?

I have been building software for companies and startups since 2018. If your product needs a hand, write to me. Worst case, you walk away with a free opinion.

Let's talk

Read next

A single crisp line runs through two unlit code blocks into a glowing sphere, and comes out the other side frayed into four dashed strands that fade away
ArchitectureAI

You are paying an LLM to do an if

Code where there is one right answer, reasoning where there is not: the diagram nobody draws anymore

7 min read

A glowing dark terminal window at the centre of a black-to-blue field, with the light block cursor from the brainless logo blinking on the prompt line
ReactNext.js

brainless: agent terminals as React components

Claude Code, Codex and Grok taken apart into components: the terminal UI built for your Next.js projects

6 min read