cd /news/large-language-models/deepseek-v4-1-flash-in-claude-code-a… · home › topics › large-language-models › article
[ARTICLE · art-156621] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

DeepSeek V4.1 Flash in Claude Code and OpenCode: setup, test runs, and what it costs on four platforms

A developer tested DeepSeek's V4.1 Flash 1017 snapshot as the model behind two coding agents, finding it passed a simple file-creation task 3/3 in both Claude Code 2.1.310 (16–27 s per run) and OpenCode 2.1.3 (9–11 s per run). The writeup compares pricing across four providers — DeepSeek's own API at $0.30/$1.20 per million input/output tokens, DeepInfra at $0.14/$0.42 promotional, OpenRouter's cheapest of 33 providers at $0.07/$0.15, and XHuoAPI at $0.24/$0.96 — noting that Claude Code runs sent roughly 32k–55k input tokens each, making input price the dominant cost for agent use.

by read2 min views4 publishedOct 24, 2026

DeepSeek's newest Flash snapshot (V4.1 Flash 1017) is now what you get behind the deepseek-flash model name on DeepSeek's API. I wanted two answers: does it hold up as the model behind a coding agent, and what does it actually cost depending on where you call it?

Disclosure: I run XHuoAPI, one of the four places compared below. Prices for all four are listed with sources so you can check them yourself.

I ran the same small task three times in each tool: in an empty folder, "Create a file hello.py that prints 'hello from xhuo'", and counted a run as passed only if the file existed with the right content.

Tool Version Passed
Claude Code (Anthropic Messages format) 2.1.310 3 / 3
OpenCode 2 (OpenAI Chat Completions format) 2.1.3 3 / 3

Claude Code runs took 16–27 s; OpenCode 9–11 s. Each Claude Code run sent roughly 32k–55k input tokens, almost all of it Claude Code's own system prompt and tool definitions, so the input price matters more than the output price for agent use.

Where Model ID Input / Output Notes
DeepSeek's own API deepseek-flash $0.30 / $1.20 Peak hours (01:00–04:00 and 06:00–10:00 UTC, Mon–Fri). Off-peak: $0.15 / $0.60. source
DeepInfra deepseek-ai/DeepSeek-V4.1-Flash $0.14 / $0.42 Promotional price, fp8; $0.20 / $0.60 without the promotion. source
OpenRouter deepseek/deepseek-v4.1-flash-1017 $0.30 / $1.20 DeepSeek's own endpoint on OpenRouter; the cheapest of 33 providers is $0.07 / $0.15, mostly fp4 / fp8 quantized. source
XHuoAPI deepseek-v4.1-flash $0.24 / $0.96 Standard tier (default). Saver $0.15 / $0.60, Spot $0.09 / $0.36; cheaper tiers are less stable. source

How I'd pick:

Claude Code (any Anthropic-compatible endpoint works the same way; leave /v1 off the base URL):

export ANTHROPIC_BASE_URL=https://api.xhuoapi.ai
export ANTHROPIC_AUTH_TOKEN=YOUR_KEY
export ANTHROPIC_MODEL=deepseek-v4.1-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4.1-flash

OpenCode 2, opencode.jsonc in your project:

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "xhuoapi": {
      "name": "XHuoAPI",
      "env": ["XHUOAPI_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": { "baseURL": "https://api.xhuoapi.ai/v1" },
      "models": { "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" } }
    }
  }
}

Then opencode run -m xhuoapi/deepseek-v4.1-flash "...".

Two things worth knowing:

thinking: {"type": "disabled"} (or reasoning_effort: "none") turned it off, and reasoning_effort low / max changed how much it reasons. The full price table (including V4 Pro) and the per-tool test results are here: https://xhuoapi.ai/en/guides/deepseek-api-outside-china.html?utm_source=devto&utm_medium=article&utm_campaign=deepseek-v41-flash and https://xhuoapi.ai/en/guides/chinese-models-in-coding-agents.html?utm_source=devto&utm_medium=article&utm_campaign=deepseek-v41-flash

── more in #large-language-models 4 stories · sorted by recency
── more on @deepseek 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/deepseek-v4-1-flash-…] indexed:0 read:2min 2026-10-24 · —