DeepSeek V4.1 Flash 1017 vs Claude Haiku 5.5: Which Cheap Model for Terminal Coding Agents?

AIHubMix7 min read
DeepSeek V4.1 Flash 1017 vs Claude Haiku 5.5: Which Cheap Model for Terminal Coding Agents?

Ten days apart, the two cheapest serious agent models of October 2026 arrived from opposite directions. Anthropic shipped Claude Haiku 5.5 on October 7 at $0.10 input and $0.50 output per 1M tokens, pitched as the subagent that sits under Sonnet and Opus. DeepSeek answered on October 17 with V4.1 Flash 1017, an update aimed squarely at end-to-end coding work.

The decision comes down to one task: a terminal coding session in Claude Code, where the agent reads files, runs tests, and edits code over dozens of turns. On that task:

  • Capability is close, with a small edge to 1017. The one benchmark both vendors report for it, Terminal-Bench 4.0, has 1017 at 42.3 and Haiku 5.5 at 39.2.
  • Cost depends on context length. Under 100K tokens per request, Haiku 5.5 costs about the same as 1017 off-peak and half of 1017 at peak. Past 100K, Haiku bills the whole request at five times the rate, and 1017 becomes the cheaper model by a wide margin.
  • Haiku wins elsewhere: knowledge questions, PDF input, computer use, and prompt-injection resistance.

Why this pair

Both are the cheapest agent-capable tier from their vendors, both launched in the same fortnight, and both run inside Claude Code. Anthropic positions Haiku 5.5 as a coding subagent and made it Claude Code's default haiku model on its API. DeepSeek ships an Anthropic-format endpoint and measured 1017's Terminal-Bench 4.0 score inside the Claude Code harness. Search interest follows the same line: comparison pages for this exact pair appeared within days of the 1017 release.

Gemini 3.8 Flash is the other name in the conversation, and it appears in DeepSeek's own cost chart. It launched in early September at $0.75 input and $3.75 output, several times the price of either model here, so it stays out of this comparison.

The task: a terminal coding session in Claude Code

The benchmark that matches this task is Terminal-Bench 4.0: long shell sessions with real tools, scored on whether the agent finishes the job. The figures below are vendor-reported: DeepSeek's from its model card, Anthropic's from the Haiku 5.5 announcement. Nobody has run both 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 Claude Code; Anthropic does not state Haiku's effort level in the headline table.

A three-point gap between two vendor numbers with different settings is not a decisive win. Independent Terminal-Bench 4.0 runs of Haiku 5.5 come in lower than Anthropic's figure and disagree with each other, and no independent result for 1017 has been published yet. Read this as "roughly level, 1017 slightly ahead" rather than a ranking. Anthropic's own guidance points the same way: "Sonnet 5.5 and Opus 5.5 remain better choices for complex agentic coding tasks like those measured by Terminal-Bench 4.0." Neither cheap model is the right pick for the hardest shell sessions.

Beyond that one benchmark, the two 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.

Where each one wins

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.

1017 is stronger for long sessions (no long-context surcharge, three times the output ceiling), terminal and program-building work, and teams that want open weights as a fallback.

Haiku 5.5 is stronger for knowledge-heavy steps, PDF and document work, computer use (72.4 on OSWorld 2.1, which DeepSeek does not report), and agents that read untrusted content: ComputingForGeeks cites Gray Swan coding scenarios where prompt-injection success fell from 58.4% on Haiku 4.5 to 0.08%. It also runs on Anthropic's native protocol in Claude Code, with no translation layer for thinking blocks.

What the session costs on each

No published test gives per-task token counts for either model, so this example uses stated assumptions. The session has 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, and produces 1.5K output tokens including thinking. Both models get the same token counts, although their tokenizers differ.

Pricing rules applied, at AIHubMix list prices:

  • 1017: new tokens at the cache-miss rate, cached prefix at the cache-hit rate, peak or off-peak.
  • Haiku 5.5: new tokens written to the 5-minute cache, cached prefix read from it. Any call whose prompt exceeds 100K is billed entirely at the higher tier ($0.50 input, $2.50 output, $0.05 cache read, $0.625 cache write).
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. Arithmetic for 1017 at peak, full session: 176K new × $0.3098 + 3.744M cached × $0.0062 + 60K output × $1.2392 = $0.152.

Two practical levers follow from this:

  • On Haiku 5.5, keep each request under 100K. Claude Code's /compact and short-lived subagents do that. The same 40 calls billed entirely at the short-prompt rate would cost $0.089.
  • On 1017, move 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.

Before you switch, in either direction

  • Moving to Haiku 5.5: the API rejects temperature values other than 1, any top_k, manual budget_tokens thinking, and assistant prefill, all with a 400. ComputingForGeeks' review also notes that it over-refused more than any other model in an automated behavioural audit, and that stricter cyber classifiers block some security work.
  • Moving to 1017: on DeepSeek's API, thinking mode with tools requires every earlier reasoning_content to go back to the API, or the request fails with a 400, so a client that drops it breaks after the first tool call. In a test run through AIHubMix on October 19, the same request returned 200. The migration post in this series covers this and the peak-hour billing rules.

Who should pick which

  • Pick 1017 for main-loop coding agents with long contexts, overnight or batch agent runs you can schedule off-peak, and tasks that build a program from a spec.
  • Pick Haiku 5.5 for short, scoped subagent calls under 100K tokens, document-heavy steps, computer use, and pipelines that read untrusted web or repo content.
  • Use both in one Claude Code setup: a stronger model plans, 1017 does long execution, and Haiku 5.5 handles quick lookups and summaries.

Run both with one key

Both models are on AIHubMix: deepseek-v4.1-flash-1017 and claude-haiku-5-5. To try them in Claude Code, point it at AIHubMix as described in the 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

In AIHubMix's October 19 test, 1017 completed a two-turn tool call over the Anthropic Messages protocol that Claude Code uses. A request with no effort setting came back without thinking, so keep an effort level set (for example CLAUDE_CODE_EFFORT_LEVEL=high). Inside a session, /model claude-haiku-5-5 switches to Haiku on the same key, so you can run the same failing test through both and compare the diffs and the request logs. For specs and prices side by side, see the AIHubMix compare page.

FAQ

Is DeepSeek V4.1 Flash 1017 better than Claude Haiku 5.5 for coding?
On Terminal-Bench 4.0, the one shared coding benchmark, 1017 reports 42.3 and Haiku 5.5 reports 39.2. Both are vendor numbers with different settings, so treat them as roughly level with a small edge to 1017.

Which one is cheaper?
Under 100K tokens per request, Haiku 5.5 costs about the same as 1017 off-peak and about half of 1017 at peak. Above 100K, Haiku bills the whole request at five times the rate, and 1017 becomes the cheaper option.

Does Haiku 5.5 charge more for long prompts?
Yes. When a prompt exceeds 100K tokens, input, output, and cache prices for that whole request rise to five times the short-prompt rate.

Can I use DeepSeek V4.1 Flash 1017 in Claude Code?
Yes. DeepSeek measured its Terminal-Bench 4.0 score in Claude Code, and you can run it through an Anthropic-compatible endpoint such as AIHubMix's by setting the base URL, key, and model name.

Which one is better for subagents?
For short, scoped subagent calls under 100K tokens, Haiku 5.5 is the natural fit and is Claude Code's default haiku model on Anthropic's API. For long-running execution agents, 1017 avoids the long-prompt surcharge.

Where does Haiku 5.5 clearly win?
Knowledge questions (HLE 45.9 vs 42.6), PDF input, computer use, and prompt-injection resistance, by Anthropic's reported figures.

Is either one good enough to replace Sonnet 5.5?
Not for complex agentic coding. Sonnet 5.5 reports 70.6 on Terminal-Bench 4.0, far above both, and Anthropic itself recommends Sonnet or Opus for those tasks.

Keep reading: the DeepSeek V4.1 Flash 1017 series

Sources