Use DeepSeek V4 in a coding agent

Set DEEPSEEK_API_KEY and run oharness -m deepseek/deepseek-v4-flash (or deepseek-v4-pro). Both models have a 1M-token context and tool calling, and V4 Flash costs $0.15 per million input tokens at list price.

Updated

Deze pagina is in het Engels geschreven. De termen die erin worden uitgelegd zijn de termen waarop in het Engels wordt gezocht, en een vertaalde vakterm is een andere term.

The two models

deepseek-v4-flashdeepseek-v4-pro
Context / max output1M / 384K1M / 384K
Tool calling, reasoningYes, yesYes, yes
Input / cached / output ($/M)0.15 / 0.003 / 0.600.435 / 0.0036 / 0.87

Source: List prices in USD per million tokens, from the models.dev snapshot shipped with OHarness (fetched 2026-09-19). Vendors change prices; check theirs before relying on a number.

Set it up

npm install -g oharness
export DEEPSEEK_API_KEY="..."
oharness -m deepseek/deepseek-v4-flash

Or oharness auth login deepseek to store the key instead of exporting it. Mid-session, /model deepseek/deepseek-v4-pro moves the conversation to Pro without converting anything, and /cost shows the spend.

Which one to use

Flash for the bulk of agent work — reading, searching, routine edits — where its cache-read price makes long sessions nearly free. Pro when a step needs more reasoning. Both bill reasoning tokens at the output price, so a long think on Pro is still cheap next to frontier models.

What we have not measured

How V4 compares with other models on agentic coding benchmarks in this harness. The leaderboard collects published scores; the fastest way to judge a model for your code is to switch to it on a real task in the same session.

Common questions

Can I use DeepSeek V4 as a Claude Code alternative?

Yes. OHarness runs the same agent architecture — loop, tools, permissions, MCP — on DeepSeek V4. Set DEEPSEEK_API_KEY and run oharness -m deepseek/deepseek-v4-flash.

What is the context window of DeepSeek V4?

One million tokens for both deepseek-v4-flash and deepseek-v4-pro, with up to 384K output tokens, according to the models.dev snapshot OHarness ships.

How much does DeepSeek V4 Flash cost for coding?

$0.15 per million input tokens, $0.003 per million cached input tokens and $0.60 per million output tokens at list price. A session of 3M input (mostly cached) and 60K output costs about $0.12.

Related