---
id: "lib-2026-11-19-13-python-tasks-in-opencode-deepseek-flash-cost-0"
type: "library"
title: "13 Python tasks in OpenCode: DeepSeek Flash cost $0.67, Claude Opus $8.76 (13 задач на Python в OpenCode: DeepSeek Flash обошёлся в $0,67, Claude Opus — в $8,76)"
lang: "RU"
org: "Habr author (zach88)"
source_type: "Practitioner post"
date: "2026-11-19"
week: "2026-W47"
url: "https://nosov.ai/library/lib-2026-11-19-13-python-tasks-in-opencode-deepseek-flash-cost-0/"
original_url: "https://habr.com/ru/articles/1109658/"
tier: "A"
tier_name: "Strong evidence"
tier_reason: "Independent developer's benchmark with pre-registered criteria, hidden tests, billing exports, per-task costs and disclosed fixes to the checker; small tasks, but the method is shown and the numbers are checkable."
summary_basis: "full-text"
original_minutes: "10"
tags: ["ai technology", "software delivery", "inference cost"]
---

# 13 Python tasks in OpenCode: DeepSeek Flash cost $0.67, Claude Opus $8.76 (13 задач на Python в OpenCode: DeepSeek Flash обошёлся в $0,67, Claude Opus — в $8,76)

Tier A (Strong evidence): Independent developer's benchmark with pre-registered criteria, hidden tests, billing exports, per-task costs and disclosed fixes to the checker; small tasks, but the method is shown and the numbers are checkable.

Summary based on the full text.

## In short

A Habr post (19 November 2026) comparing what four models cost to complete the same 13 Python tasks in the OpenCode agent: ten specified functions and three small repositories (87-299 lines). Every model passed every hidden test, so the comparison becomes one of cost, steps, time and working style. DeepSeek V4.1 Flash was cheapest and fastest; Claude Opus cost 13 times more as billed. Claude models left many extra tests in the repository; DeepSeek verified with throwaway scripts and deleted them.

## Key numbers

- $0.67 vs $8.76: billed cost for 39 runs, DeepSeek V4.1 Flash versus Claude Opus 5.5, both passing 39 of 39
- 156: agent runs: 13 Python tasks, 4 models, 3 attempts each
- $30.67: Opus cost recalculated at the vendor's list prices, versus $8.76 billed through the router
- 40%: share of Opus list-price cost that went to cache writes (48% for Sonnet)
- 28 to 44 vs 5: tests left in the key-value repo by Claude runs versus DeepSeek runs (5 was the original count)

## What it reports

- Billed through one router: Flash $0.67, DeepSeek V4 Pro $2.89, Sonnet 5.5 $3.65, Opus 5.5 $8.76; $15.98 for all 156 runs. At list prices the same tokens come to $47.64, with Opus at $30.67 and Flash at $0.79 (38.6x).
- Median time, functions / repos: Flash 42 s / 80 s, V4 Pro 99 s / 128 s, Sonnet 80 s / 293 s, Opus 75 s / 440 s.
- Output tokens including reasoning: Opus 776k (469k reasoning), Flash 287k. Cache reads covered 73-94% of input for all models; cache writes were 40% of Opus and 48% of Sonnet list-price cost.
- Run-to-run spread: the most expensive of three attempts cost a median 1.5x the cheapest, up to 4.2x in the largest outlier.
- Style: on the transactions task Sonnet left 28, 44 and 42 tests and Opus 33, 28 and 30; both DeepSeek models left the original 5.
- A too-literal check failed a valid Opus run that had added a regression test for a removed function; the rule was refined and re-applied to all 12 runs of that task, changing only that one result.
- Sandbox gap: in one run Flash listed directories above its workspace. A log review of 1,763 tool calls found no access to hidden tests or reference solutions.
- Claude models hit 102 permission refusals versus 30 for DeepSeek under the same allow-list.

## How they got it

OpenCode 1.19.6 in non-interactive mode with default model settings; agent allowed to edit files and run python, ls and cat only. Fresh copy of each task per run; hidden tests (17-34 checks per task) stored outside the workspace, plus each repo's own tests. Criteria written before each series. Costs from the router's billing export; list-price recalculation from logged tokens at 18 November 2026 prices. Four parallel streams.

## Limits

- All tasks are small and well specified; every model hit the ceiling, so the set does not separate capability.
- One router; caching, steps and cost could differ when calling vendors directly or in Claude Code. The router's discount may be promotional.
- Three attempts per task is too few for confident claims on small price differences.
- Isolation relied on a command allow-list, not a container; repository tasks and hidden tests were prepared with help from another Claude model.

## Why it matters for companies

For routine, well-specified coding work the price per million tokens says little: total cost depends on steps, reasoning volume and cache writes, and routing changed Claude's bill by more than three times. Teams choosing a default coding model can copy the method: hidden tests outside the workspace, billing exports, and a look at what the agent leaves behind in the repo, which equal pass rates hide.

## Key passages in translation

> После исправления ошибки в моём скрипте проверки у каждой модели получилось 39 из 39.

After fixing a bug in my checking script, every model scored 39 out of 39.

> Одинаковые «39 из 39» в таблице не значат, что модели сдавали одинаковый код и одинаковый объём работы.

The identical "39 of 39" in the table does not mean the models submitted the same code or the same amount of work.

> Это недоработка моей изоляции: скрытые тесты лежали вне рабочей папки, но держалось это на урезанном списке команд, а не на полноценной песочнице.

That is a gap in my isolation: the hidden tests sat outside the working folder, but this relied on a trimmed command list, not a proper sandbox.

Original: https://habr.com/ru/articles/1109658/
