DEV Community

XHuoAPI
XHuoAPI

Posted on Originally published at xhuoapi.ai

deepseek-v4.1-flash-1017 fixing a real bug in Claude Code and OpenCode, and what each run cost

DeepSeek's October 17 snapshot of V4.1 Flash is the model behind the deepseek-flash name on DeepSeek's API, and it is now callable under its pinned ID deepseek-v4.1-flash-1017 on XHuoAPI. Pinning the snapshot matters for agents: the behaviour you tested is the behaviour you keep.

Disclosure: I run XHuoAPI. DeepSeek's own prices are listed next to ours, with the source, so you can compare.

The test: fix a failing test, six times

A tiny Node project with one bug: orders of $50 or more should have no shipping fee, but total > 50 charges a $50 order. Each tool got the same prompt, "The test in shipping.test.js fails. Find the bug in shipping.js and fix it", and a run counted only if node --test passed afterwards.

Tool Version Passed Time per run
Claude Code (Anthropic Messages format) 2.1.310 3 / 3 25–43 s
OpenCode 2 (OpenAI Chat Completions format) 2.1.3 3 / 3 20–49 s

Every run found the > vs >= mistake and made a one-character edit.

What a run cost

Claude Code sent about 58k–71k input tokens per run (most of it Claude Code's own system prompt and tool definitions) and got 550–750 output tokens back. At XHuoAPI's Standard price that is about $0.02 per run at peak hours and about half that off-peak, before any cache discount.

Prices (USD per 1M tokens, checked 2026-10-26)

DeepSeek bills peak hours (01:00–04:00 and 06:00–10:00 UTC, Monday to Friday) at twice the off-peak rate. XHuoAPI uses the same hours for DeepSeek models.

Where Model ID Peak in / out Off-peak in / out
DeepSeek API (source) deepseek-flash $0.30 / $1.20 $0.15 / $0.60
XHuoAPI Standard, the default tier (source) deepseek-v4.1-flash-1017 $0.24 / $0.96 $0.12 / $0.48
XHuoAPI Saver same $0.15 / $0.60 $0.075 / $0.30
XHuoAPI Spot same $0.09 / $0.36 $0.045 / $0.18

Cheaper tiers trade stability for price. The same key also calls Qwen, GLM, Kimi, GPT and Claude.

Setup

Claude Code (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-1017
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4.1-flash-1017
Enter fullscreen mode Exit fullscreen mode

OpenCode 2, opencode.jsonc:

{
  "$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-1017": { "name": "DeepSeek V4.1 Flash 1017" } }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Run it with opencode run -m xhuoapi/deepseek-v4.1-flash-1017 "...".

Thinking is on by default; thinking: {"type": "disabled"} turns it off on our endpoint. Batch jobs are cheaper off-peak on both DeepSeek and XHuoAPI.

Full comparison (DeepSeek, DeepInfra, OpenRouter, XHuoAPI): https://xhuoapi.ai/en/guides/deepseek-api-outside-china.html?utm_source=devto&utm_medium=article&utm_campaign=deepseek-1017
Per-tool test results: https://xhuoapi.ai/en/guides/chinese-models-in-coding-agents.html?utm_source=devto&utm_medium=article&utm_campaign=deepseek-1017

Top comments (0)