> ## Content Index
> Fetch the complete content index at: https://www.llmbits.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cost per Correct Answer: DeepSeek V4.1 Flash vs Kimi K3
- URL: https://www.llmbits.com/deepseek-v4-1-flash-vs-kimi-k3-cost-per-task/
- Published: 2026-10-24T23:51:46.000Z
- Updated: 2026-10-25T00:40:52.000Z
- Description: Kimi K3 and glm-5.3-flash both got all 10 of my home lab tasks right. One cost $0.03234 per correct answer, the other $0.00297. I ran 7 Ollama Cloud model setups through qm, Containerlab, nftables, awk, subnetting and Modelfile tasks with automated checkers.
- Author: Jaime
- Tags: Models, Home Lab

Kimi K3 got all 10 of my home lab tasks right. So did glm-5.3-flash, at $0.00297 per correct answer against Kimi's $0.03234, about 11 times less. DeepSeek V4.1 Flash with thinking off was faster than both, with a median of 0.9 seconds per task, and it got 8 of 10 in each of three runs.

The strangest result was the same DeepSeek model with thinking on. On a Python ping parser it never answered. Its thinking stream repeated one line of ping output 3,718 times until my 120 second cap stopped it, and it looped again when I reran it. With thinking off, the same model passed that task in 0.9 seconds.

Everything in this post ran on Ollama Cloud on Saturday, Oct 24, 2026\. The tasks, checkers and test harness were built in my home lab and ran from a Linux box. None of it ran on the old Xeon VM. For local CPU numbers, see my [tiny model CPU shootout](https://www.llmbits.com/tiny-ollama-models-cpu-shootout/) and the [Nemotron 3.5 Bolt vs Gemma 4 E4B test](https://www.llmbits.com/nemotron-3-5-bolt-vs-gemma-4-e4b-cpu-ollama/).

## Why cost per correct answer

Price per million tokens tells you little on its own. glm-5.3-flash lists output at $0.50 per million tokens and DeepSeek V4.1 Flash at $1.20, yet glm cost about 9 times more per task in this test, because it wrote 58,359 completion tokens to DeepSeek's 1,894 with thinking off. A wrong answer also costs you the retry and the time to spot the mistake.

So I counted what each model cost in total for 10 tasks, then divided by the number it got right. Code graded every answer, with no LLM judge.

## The 10 tasks

Each task is something I'd hand a model while working in my home lab. Each one asks for a single code block and nothing else.

| Task                   | What the model had to produce                                                                   | How it was checked                                                          |
| ---------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| t01 qm create          | One qm create command for VM 210 on Proxmox VE 9 with disk, VLAN, start at boot and guest agent | Parsed with shlex, every option checked against the qm man page option list |
| t02 Containerlab       | Topology YAML: 3 SR Linux routers, 1 Alpine client, 4 exact links                               | YAML parsed, nodes, kinds, images and links compared                        |
| t03 nftables           | Full inet filter ruleset for a Proxmox host, SSH and 8006 only from 192.168.88.0/24             | Loaded with nft -f in a network namespace, then the listed ruleset checked  |
| t04 Python ping parser | parse\_ping() for every iputils summary line variant                                            | 7 unit tests, including errors, duplicates and total loss                   |
| t05 regex              | IPv4 with optional /0 to /32, no leading zeros                                                  | 12 valid and 23 invalid strings                                             |
| t06 bash log count     | One pipeline counting POSTs to /api/chat that took 10 s or more in an Ollama Gin log            | Run against a larger log than the sample, expected 12                       |
| t07 WireGuard to JSON  | Config converted to a fixed schema, null where unset                                            | Exact JSON diff, plus a check for an invented endpoint or keepalive         |
| t08 syslog facts       | 13 facts from a Proxmox syslog excerpt                                                          | Exact compare, plus 4 extra fields the log can't answer                     |
| t09 subnetting         | IPv4 and IPv6 subnet math, summaries, a wildcard mask                                           | Python ipaddress answers                                                    |
| t10 Modelfile          | Ollama Modelfile with parameters, system prompt and one example exchange                        | Instructions and parameters parsed and checked                              |

Code ran with no network access and a timeout. I tested every checker against a known-good and a known-bad answer before any model saw a task.

## The models and settings

I tested 7 setups on 6 models: `gemma4:31b`, `deepseek-v4.1-flash` with thinking off and on, `glm-5.3-flash`, `minimax-m3.1-flash`, `minimax-m3` and `kimi-k3`. Every request used temperature 0, seed 42, one user message and no system prompt.

Prices come from [ollama.com/pricing](https://ollama.com/pricing?ref=llmbits.com), fetched Oct 24, 2026 at about 3:45 PM PT. All dollar figures use standard list prices, with cached input billed at the cached rate. The pricing page also lists an off-peak rate for DeepSeek (half price, all day on weekends), so the DeepSeek rows were probably billed at half of what I show.

## Results

![Bar chart of cost per correct answer on a log scale: gemma4:31b $0.00021, deepseek-v4.1-flash think off $0.00042, glm-5.3-flash $0.00297, minimax-m3.1-flash $0.00370, minimax-m3 $0.00783, deepseek-v4.1-flash think on $0.01124, kimi-k3 $0.03234](https://www.llmbits.com/content/images/2026/10/deepseek-v4-1-flash-vs-k-01-cost-per-correct.webp)

Run 1, standard list prices. Green bars passed all 10 tasks.

These are the run 1 numbers for all 7 setups:

| Model                          | Passed | Median s | Completion tokens | $ per task | $ per correct |
| ------------------------------ | ------ | -------- | ----------------- | ---------- | ------------- |
| gemma4:31b                     | 7/10   | 1.0      | 2,197             | $0.00015   | $0.00021      |
| deepseek-v4.1-flash, think off | 8/10   | 0.9      | 1,894             | $0.00034   | $0.00042      |
| glm-5.3-flash                  | 10/10  | 3.2      | 58,359            | $0.00297   | $0.00297      |
| minimax-m3.1-flash             | 8/10   | 7.0      | 48,340            | $0.00296   | $0.00370      |
| minimax-m3                     | 7/10   | 7.2      | 21,793            | $0.00548   | $0.00783      |
| deepseek-v4.1-flash, think on  | 9/10   | 3.2      | 83,347\*          | $0.01011\* | $0.01124\*    |
| kimi-k3                        | 10/10  | 5.3      | 20,794            | $0.03234   | $0.03234      |

\*Includes an estimate of 62,637 completion tokens for the t04 timeout, which returned no token counts. That estimate is streamed characters divided by 4\. The stream had 13,502 chunks, so the true count may be closer to 13.5k. Without t04, DeepSeek with thinking on cost $0.0259 for its 9 correct answers.

Here is every task for every model, from run 1:

| Task               | ds off | ds on          | kimi-k3 | minimax-m3 | m3.1-flash | glm-5.3-flash | gemma4:31b |
| ------------------ | ------ | -------------- | ------- | ---------- | ---------- | ------------- | ---------- |
| t01 qm create      | pass   | pass           | pass    | pass       | fail       | pass          | pass       |
| t02 Containerlab   | pass   | pass           | pass    | pass       | pass       | pass          | pass       |
| t03 nftables       | pass   | pass           | pass    | pass       | pass       | pass          | pass       |
| t04 ping parser    | pass   | fail (timeout) | pass    | pass       | pass       | pass          | fail       |
| t05 regex          | pass   | pass           | pass    | fail       | pass       | pass          | pass       |
| t06 bash log count | fail   | pass           | pass    | fail       | fail       | pass          | fail       |
| t07 WireGuard JSON | pass   | pass           | pass    | pass       | pass       | pass          | pass       |
| t08 syslog facts   | pass   | pass           | pass    | pass       | pass       | pass          | pass       |
| t09 subnetting     | fail   | pass           | pass    | pass       | pass       | pass          | fail       |
| t10 Modelfile      | pass   | pass           | pass    | fail       | pass       | pass          | pass       |

Kimi K3 cost about 75 times more per correct answer than DeepSeek V4.1 Flash with thinking off ($0.03234 in its one run vs $0.00043 over DeepSeek's three runs) and got 2 more tasks right. Its single most expensive task was t06, the awk log count: 99.2 seconds and 8,135 completion tokens, which came to $0.123 of its $0.323 total.

## The DeepSeek thinking loop

My first harness sent non-streaming requests with no time limit. For t04 with thinking on, the server closed the connection at 270.25 seconds, then again at 270.13 seconds on the retry, both with "Remote end closed connection without response". A streaming attempt then ran for about 10 minutes with no final chunk before I stopped it.

I switched the harness to streaming with a 120 second cap per request and no retries, and saved whatever came back. This is that saved stream:

![Terminal output from jq on the saved DeepSeek response: 120.01 seconds, 13,502 chunks, client deadline exceeded, content length 0, thinking length 250,549, and the line about 4 packets transmitted repeated 3,718 times](https://www.llmbits.com/content/images/2026/10/deepseek-v4-1-flash-vs-k-02-thinking-loop.webp)

The saved t04 stream for deepseek-v4.1-flash with thinking on

The thinking started out sensible, listing ping summary line variants to handle. Then it wrote the line `- "4 packets transmitted, 4 received, 0% packet loss, time 3004ms"` and kept writing it: 3,718 times, 250,549 characters of thinking and an empty answer. With `"think": false`, the same model passed all 7 unit tests for that task in 0.9 seconds.

In run 3 the loop came back on the same task. The stream hit the 120 second cap after 13,036 chunks with no answer and 263,725 characters of thinking. This time the repeated line was different: `Need handle "N packets transmitted, M received, 0% packet loss, time 3004ms" with "packet loss" maybe "packet loss" no issue.` It appears 2,013 times, about 97% of the thinking text. Both loops sat on the same ping summary line text.

In run 1, thinking on passed the two tasks DeepSeek missed with thinking off (t06 and t09). In run 3 it passed t09 again but failed t06\. Its run 1 median was 3.2 seconds against 0.9 with thinking off, and on t04 it never stopped in either run. I'd put a hard time cap on any thinking request.

## The wrong answers

These are the specific mistakes, from the raw answers:

- **Subnet math.** DeepSeek with thinking off and gemma4:31b both said 192.168.88.200 is inside 192.168.88.128/26\. That block runs from .128 to .191, so the answer is false. Gemma also gave `10.1.0.0/21` as the smallest prefix holding 10.1.6.0/24 and 10.1.9.0/24\. A /21 stops at 10.1.7.255\. The answer is `10.1.0.0/20`. Both models made the same mistakes in run 2, and DeepSeek with thinking off said .200 was inside the block again in run 3.
- **Go durations in awk (t06).** The expected count was 12\. DeepSeek with thinking off printed 18, then 16 in run 2, then 18 again in run 3\. Its run 1 code split on "m" for any duration containing an m, so `845.120334ms` became 845 minutes. Gemma printed 0 because `awk -F ' | '` split on single spaces. minimax-m3.1-flash printed 0 after treating method and path as separate fields. minimax-m3 printed 21: after `sub()` the value was a string, so `x>=10000` compared as text. In run 3, DeepSeek with thinking on printed 16: its awk called `match()` a second time inside the loop, which overwrote the match position, so it counted four lines under 10 seconds (9.999999s, 9.999s, 9.5s and 3.2s) as 10 seconds or more.
- **Ping parser (t04).** Gemma's regex didn't match summary lines with `+4 errors` or `+1 duplicates`, so it returned zeros there and passed 4 of 7 tests, in both runs.
- **Proxmox flags (t01).** minimax-m3.1-flash used `--boot 1 --agent enabled`. `--boot` sets boot order. Start at boot is `--onboot 1`, and the agent option wants `1`.
- **Modelfile (t10).** minimax-m3 wrote `USER """What does STP do?"""` and `ASSISTANT """..."""`. Neither is a Modelfile instruction. The example exchange goes in `MESSAGE user` and `MESSAGE assistant` lines.
- **Regex (t05).** minimax-m3's prefix part accepted `/33` to `/99`.

## Invented facts

Two tasks checked for made-up values. t08 had 4 fields the syslog can't answer (host RAM, NAS IP, attacker country, pool capacity), and every answer string was checked against the log text. t07 checked for an endpoint or keepalive invented for the laptop peer, which sets neither.

Every run of every model returned 0 invented values, including 5 DeepSeek runs: thinking off in runs 1, 2 and 3, and thinking on in runs 1 and 3.

In run 3 I added three harder fact tasks, t11 to t13\. Each gives a log excerpt with 8 or 9 fields the log can answer and 5 it can't, which must come back null. One of those 5 is a near miss: the migration time for VM 120 when only VM 122 has one, the serial and firmware of sdb when only sda and sdc have them, and gemma's num\_ctx when only qwen's is logged. DeepSeek with thinking off, DeepSeek with thinking on and glm-5.3-flash all got 3/3, with 0 invented values and no near miss taken. These tasks did not separate the models.

One grader fix: on t12, DeepSeek with thinking on gave the UPS name as `eaton5p` and my checker wanted `eaton5p@localhost`. In NUT, `eaton5p` is the UPS name and `@localhost` is the host, so I changed the checker to accept both and regraded the saved answer.

## Reruns and determinism

In run 2 I ran the two cheapest setups again with the same settings. In run 3 I ran both DeepSeek setups again. DeepSeek with thinking off scored 8/10 in all three runs and failed t06 and t09 every time: 24/30 at $0.00043 per correct answer. gemma4:31b scored 7/10 in both of its runs, failing the same tasks, at $0.00021 per correct answer. DeepSeek with thinking on scored 9/10 in run 1 and 8/10 in run 3, so 17/20 at $0.01216 per correct answer, with both t04 timeouts counted at their estimates.

Temperature 0 with a fixed seed did not give byte-identical output on Ollama Cloud. Compared with run 1, completion token counts matched on 8 of 10 tasks for DeepSeek with thinking off in run 2 and 6 of 10 in run 3, 9 of 10 for Gemma in run 2, and only 1 of 10 for DeepSeek with thinking on in run 3\. Pass and fail changed once: thinking on went from pass to fail on t06.

## Caveats

- One run per setup for 4 of the 7 setups, so a single task flipping moves a score by 10 points.
- The first 46 task requests ran without a time cap. With a 120 second cap applied to every row, minimax-m3.1-flash drops from 8/10 to 7/10, because t04 took 191.0 seconds (it passed) and t06 took 195.4 seconds. Every other setup is unchanged.
- The DeepSeek thinking-on token counts for t04 are estimates in runs 1 and 3 (62,637 and 65,931 tokens, streamed characters divided by 4), as described under the table.
- Ten tasks from my own work is a small, specific set. It says how these models handle my kind of task, not every kind.

## What this test cost

The metered estimate for every task and probe request across all three runs is $0.6653 at standard prices, or $0.5535 with DeepSeek at the off-peak rate. Run 3 alone was $0.1168\. Four DeepSeek thinking-on requests in run 1 returned no token counts: the two 270 second disconnects and two requests I stopped while switching harnesses. At the t04 rate they could add up to about $0.90 at standard price. By stream chunk count it's closer to $0.19\. So the worst case is about $1.57, and I had capped the test at $3.00.

## What I'd pick for which job

For quick scripted work where I check the output anyway (log processing, format conversion, first drafts of config), I'd use DeepSeek V4.1 Flash with `"think": false`. It answered in under a second, cost $0.00042 per correct answer in run 1 and got 8 of 10 right in all three runs. I wouldn't trust it with subnet math without a check.

When I need the answer right the first time and can wait a few seconds, glm-5.3-flash is my pick. It got 10/10 for $0.00297 per correct answer. It does burn thinking tokens: 26,295 of them on the ping parser alone, which took 97.1 seconds.

gemma4:31b was the cheapest per correct answer at $0.00021, but it missed 3 of 10 the same way twice. I already use it for vision work in the [bird test post](https://www.llmbits.com/hinton-how-ai-sees-image-vision-models-ollama/). For text I'd only use it where a checker sits behind it.

Kimi K3 was 10/10 too. At about 11 times the cost of glm-5.3-flash per correct answer on these tasks, I'd keep it for long writing work, where I've already been using it.

## How to reproduce

The setup is plain Python against the Ollama Cloud chat API. Each request looks like this. Only the two DeepSeek setups sent `think` (`false` or `true`):

```bash
curl -s https://ollama.com/api/chat \
  -H "Authorization: Bearer $OLLAMA_API_KEY" \
  -d '{"model": "deepseek-v4.1-flash", "think": false, "stream": true,
       "options": {"temperature": 0, "seed": 42},
       "messages": [{"role": "user", "content": "<task prompt>"}]}'

```

The rest is the method:

1. Write each task as one prompt that asks for exactly one fenced code block and no explanation.
2. Write a checker per task that pulls out the first code block and grades it with real tools: `nft -f`, unit tests, a YAML parser, Python's `ipaddress`, a real log file. Run anything executable with `unshare -rn` (no network) and a timeout.
3. Test each checker against a known-good and a known-bad answer before any model runs.
4. Stream every request with a hard time cap, and save the raw response, including partial thinking, to a JSON file per task.
5. Log prompt, cached and completion tokens per request, multiply by the list prices on the pricing page, then divide the total by the number of passes.

The API doesn't return a cost, so every dollar figure here is tokens times list price. If a request times out with no token counts, write down how you estimated it.