Take one Claude Code session: 40 model calls, a prompt that grows from 20K to 176K tokens. At AIHubMix list prices, DeepSeek V4.1 Flash 1017 runs it for $0.152 at peak hours ($0.076 off-peak) and Claude Haiku 5.5 for $0.288. Stop the same session after 21 calls, before the prompt crosses 100K tokens, and the order flips: Haiku 5.5 costs $0.040, 1017 costs $0.077 at peak and $0.039 off-peak. On capability, the one benchmark both vendors report for this kind of work, Terminal-Bench 4.0, has them roughly level: 42.3 for 1017 and 39.2 for Haiku 5.5, both vendor-reported.
That is the engineering problem. You have a cheap slot in your agent setup, either the main loop for long runs or a subagent for short calls, and two candidates released ten days apart: Haiku 5.5 on October 7 and 1017 on October 17, 2026. Their cost curves cross at Haiku's 100K-token price tier. Their benchmark numbers come from different harnesses and settings. Each one returns 400s if you migrate carelessly. This post gives the published numbers, a script to redo the cost math with your own token counts, a one-key setup for running both in Claude Code, and the failure modes on each side.
What you need
- An AIHubMix API key exported as
AIHUBMIX_API_KEY. Both models are on AIHubMix:deepseek-v4.1-flash-1017andclaude-haiku-5-5. - Claude Code installed.
- One failing test or small task from your own repo, to run through both models.
Run both models in Claude Code with one key
Point Claude Code at AIHubMix, as in the AIHubMix Claude Code guide:
export ANTHROPIC_BASE_URL="https://aihubmix.com"
export ANTHROPIC_AUTH_TOKEN="$AIHUBMIX_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4.1-flash-1017"
claude
Two things to do once it's running:
-
Keep an effort level set, for example
CLAUDE_CODE_EFFORT_LEVEL=high. In AIHubMix's October 19 test over the Anthropic Messages protocol (the one Claude Code uses), 1017 completed a two-turn tool call, but the request with no effort setting came back with text and a tool call and no thinking block. A request with an effort level returned one. -
Switch models inside the session with
/model claude-haiku-5-5. Same key, same repo state. Run the same failing test through both, then compare the diffs and the request logs.
For specs and prices side by side, the AIHubMix compare page lists both models.
The benchmark picture
Terminal-Bench 4.0 scores long shell sessions with real tools on whether the agent finishes the job, which is the closest public match to a Claude Code session. DeepSeek's figures come from its model card and Anthropic's from the Haiku 5.5 announcement. Nobody has run both models under the same harness and settings yet.
| Model | Terminal-Bench 4.0 | Reported by |
|---|---|---|
| Claude Sonnet 5.5 | 70.6 | Anthropic |
| DeepSeek V4.1 Flash 1017 | 42.3 | DeepSeek |
| Claude Haiku 5.5 | 39.2 | Anthropic |
| DeepSeek V4.1 Flash (Sept) | 31.2 | DeepSeek |
DeepSeek ran Terminal-Bench 4.0 in the Claude Code harness. Anthropic does not state Haiku's effort level in the headline table.
Three points between two vendor numbers with different settings is not a decisive win; read it as "roughly level, 1017 slightly ahead". The independent Haiku 5.5 runs published so far come in below Anthropic's figure and disagree with each other, and AIHubMix has not found an independent Terminal-Bench 4.0 result for 1017 yet. Anthropic's own guidance puts both cheap models below the top tier for this work: "Sonnet 5.5 and Opus 5.5 remain better choices for complex agentic coding tasks like those measured by Terminal-Bench 4.0."
Beyond Terminal-Bench, the vendors publish almost no shared numbers. DeepSeek reports DeepSWE v1.1 (77.0) and ProgramBench (29.1); Anthropic reports FrontierCode 1.1 (46.4) and OSWorld 2.1 (72.4). None of those has a published score for the other model. What the spec sheets do let you compare:
| Area | V4.1 Flash 1017 | Claude Haiku 5.5 |
|---|---|---|
| Terminal-Bench 4.0 | 42.3 | 39.2 |
| HLE, no tools | 42.6 | 45.9 |
| Context window | 1M | 1M |
| Max output | 384K | 128K |
| Input types | Text, images | Text, images, PDF |
| Price above 100K prompt | Unchanged | 5x |
| Effort levels | 3 | 5 |
| Open weights | Yes, MIT | No |
Vendor-reported benchmark figures. DeepSeek's effort levels are low, high, and max; Haiku's are low, medium (default), high, xhigh, and max.
The cost model
No published test gives per-task token counts for either model, so the numbers above come from stated assumptions:
- 40 model calls. The prompt starts at 20K tokens and grows by 4K per call (tool output plus the previous answer), ending at 176K.
- Each call reads the earlier prompt from cache and adds 4K new tokens.
- Each call produces 1.5K output tokens, thinking included.
- Both models get the same token counts, although their tokenizers differ.
- AIHubMix list prices. 1017: new tokens at the cache-miss rate, the cached prefix at the cache-hit rate, peak or off-peak. Haiku 5.5: new tokens written to the 5-minute cache, the prefix read from it, and any call whose prompt exceeds 100K billed entirely at the higher tier ($0.50 input, $2.50 output, $0.05 cache read, $0.625 cache write per 1M tokens).
| Session | 1017 peak | 1017 off-peak | Haiku 5.5 |
|---|---|---|---|
| First 21 calls, prompt up to 100K | $0.077 | $0.039 | $0.040 |
| Full 40 calls, prompt up to 176K | $0.152 | $0.076 | $0.288 |
On Haiku 5.5, the 19 calls above 100K cost $0.248 of the $0.288. For 1017 at peak, the full session is 176K new × $0.3098 + 3.744M cached × $0.0062 + 60K output × $1.2392 = $0.152 (prices per 1M tokens).
The script below reproduces the table. Replace the call count, prompt growth, and output size with numbers from your own request logs; your real token counts will differ between the two models because the tokenizers do.
# Cost of one Claude Code session at AIHubMix list prices (USD per 1M tokens).
# Assumptions: 40 calls; the prompt starts at 20K tokens and grows 4K per call;
# each call reads the earlier prompt from cache, adds 4K new tokens, and writes 1.5K output.
M = 1_000_000
FLASH = {"peak": (0.3098, 0.0062, 1.2392), "off-peak": (0.155, 0.0031, 0.62)} # miss, hit, out
HAIKU = {"short": (0.125, 0.01, 0.50), "long": (0.625, 0.05, 2.50)} # 5-min write, read, out
def calls(n):
prompt = 20_000
for i in range(n):
new = prompt if i == 0 else 4_000
yield prompt, prompt - new, new, 1_500 # prompt, cached, new, output
prompt += 4_000
def flash(tier, n):
miss, hit, out = FLASH[tier]
return sum(new * miss + cached * hit + o * out for _, cached, new, o in calls(n)) / M
def haiku(n):
total = 0.0
for prompt, cached, new, o in calls(n):
write, read, out = HAIKU["long" if prompt > 100_000 else "short"] # whole request
total += new * write + cached * read + o * out
return total / M
for n in (21, 40):
print(f"{n} calls: 1017 peak ${flash('peak', n):.3f}, "
f"off-peak ${flash('off-peak', n):.3f}, Haiku 5.5 ${haiku(n):.3f}")
21 calls: 1017 peak $0.077, off-peak $0.039, Haiku 5.5 $0.040
40 calls: 1017 peak $0.152, off-peak $0.076, Haiku 5.5 $0.288
Two levers move these numbers:
-
On Haiku 5.5, keep each request under 100K. Claude Code's
/compactand short-lived subagents do that. The same 40 calls billed entirely at the short-prompt rate would cost $0.089. - On 1017, schedule batch and overnight agent runs outside 01:00–04:00 and 06:00–10:00 UTC on weekdays, which halves the bill. AIHubMix is also running a limited-time 30% discount on 1017, not included above.
Failure modes and fixes
Haiku 5.5 returns 400 on parameters that worked before
The API rejects temperature values other than 1, any top_k, manual budget_tokens thinking, and assistant prefill, all with a 400. Strip them from the request and control depth with the effort level instead.
The Haiku 5.5 bill jumps once sessions get long
Past 100K prompt tokens, input, output, and cache prices for the whole request rise to five times the short-prompt rate. In the example above, the 19 calls over the line cost $0.248 of the session's $0.288. Compact or hand work to short-lived subagents before the prompt reaches 100K, or put long-running loops on 1017.
1017 fails after the first tool call on DeepSeek's own API
DeepSeek's thinking mode guide requires every earlier assistant turn's reasoning_content to go back to the API when tools are in use; otherwise the request fails with a 400. Public GitHub reports quote the error as [invalid_request_error] The `reasoning_content` in the thinking mode must be passed back to the API. A client that drops the field breaks right after its first tool call. Keep the whole assistant message, reasoning_content included, when you append it to the history. In AIHubMix's October 19 test, the same turn sent without reasoning_content returned 200. The migration post in this series covers this error and the peak-hour billing rules in detail.
1017 answers without thinking
Over the Messages protocol, a request with no effort setting returned no thinking block in AIHubMix's test. Set CLAUDE_CODE_EFFORT_LEVEL (or the effort field in your own requests) so 1017 reasons before acting.
Haiku 5.5 refuses security work
ComputingForGeeks' review notes that Haiku 5.5 over-refused more than any other model in an automated behavioural audit, and that stricter cyber classifiers block some security work. If your agent does security tooling, test those steps first and keep another model available for them. The same review reports the upside: in Gray Swan coding scenarios, prompt-injection success fell from 58.4% on Haiku 4.5 to 0.08%.
What this comparison can't verify
- Benchmarks: every score here is vendor-reported, under different harnesses and settings. A same-harness run of both models doesn't exist yet.
- Token counts: the session is a model, not a measurement. Neither vendor publishes per-task token counts, and the two tokenizers count the same text differently.
-
The AIHubMix test: one run per check on October 19, 2026. The channel that served each request isn't visible, so the 200 on the missing-
reasoning_contentturn shows what happened in that run, not a guarantee for every route.
Which one goes where
- 1017: main-loop coding agents with long contexts, overnight or batch runs you can schedule off-peak, and tasks that build a program from a spec.
- Haiku 5.5: short, scoped subagent calls under 100K tokens, document-heavy steps, computer use, and pipelines that read untrusted web or repo content.
- Both: in one Claude Code setup, a stronger model plans, 1017 does long execution, and Haiku 5.5 handles quick lookups and summaries. Neither replaces Sonnet 5.5 or Opus 5.5 for the hardest shell sessions.
Keep reading: the DeepSeek V4.1 Flash 1017 series
- Before 1017 takes the main-loop slot, see what the October checkpoint changed and how much shorter its outputs made each task: DeepSeek V4.1 Flash 1017: Same Price, Shorter Outputs. Should You Switch?
- The
reasoning_contentfailure mode above gets the full treatment there, with fixes for your own code and for agent frameworks, plus the peak-hour billing rules: Migrating to DeepSeek V4.1 Flash 1017: The reasoning_content 400, the Silent Alias Swap, and Peak-Hour Billing - If 1017 wins your side-by-side run, the same test can tell you whether DeepSeek's pricier tier still earns its place: DeepSeek V4.1 Flash 1017 vs V4 Pro: Is the Flash Enough Now?
Sources
- DeepSeek-V4.1-Flash-1017 model card (Hugging Face)
- Introducing Claude Haiku 5.5 (Anthropic)
- DeepSeek V4.1 Flash 1017 vs Claude Haiku 5.5 (AIHubMix)
- Claude Haiku 5.5: Pricing, Benchmarks, Tested (ComputingForGeeks)
- DeepSeek V4.1 Flash 1017 Tested: Specs, Benchmarks & Price (Kingy.ai)
Top comments (0)