DeepSeek V4.1 Flash, Qwen3 Coder and four more: low-cost coding models, tested

Six coding models from $0.035 per million input tokens, now on SparrowCodes. We gave them the same ten programming tasks and an agent repair job. Here's how each did and what it cost.

· 5 min read · SparrowCodes team

A day of agentic coding sends a lot of tokens. On a frontier model that adds up fast, and much of the work (reading files, small edits, running tests) doesn't need one. We added six low-cost coding models to SparrowCodes and tested them before writing a word about them.

The models

ModelInput / output, per 1M tokensContext
DeepSeek V4.1 Flash$0.15 / $0.601M tokens
Qwen3 Coder 30B$0.15 / $0.60262K tokens
Qwen 3.7 Flash$0.035 / $0.151M tokens
Qwen 3.7 Plus$0.32 / $1.281M tokens
MiMo V2.6 Flash$0.14 / $0.281.05M tokens
GLM 4.7 Flash$0.07 / $0.40200K tokens
Prices on SparrowCodes on 10 November 2026. Every model supports tool calling. Live prices are on each model's page.

The test

Two parts, the same for every model:

  • Ten programming tasks in Python, each checked by hidden tests: merging intervals, Roman numerals both ways, an LRU cache, an expression calculator, topological sort, word ladder, a CSV parser, a rate limiter, longest substring with k distinct characters, and Dijkstra's shortest path.
  • An agent repair job: a small repository with six failing tests. The model gets tools to read files, edit them and run the tests, and has to make all six pass without touching the tests, in at most 15 turns.

For reference we ran Claude Haiku 5.5, the lowest-cost Claude model, through the same test.

Results

ModelTasks passedAgent jobCost of the whole run
DeepSeek V4.1 Flash10 / 106 / 6 in 5 turns$0.0092
Qwen3 Coder 30B10 / 105 / 6 (ran out of turns)$0.0077
Qwen 3.7 Plus10 / 106 / 6 in 6 turns$0.0316
GLM 4.7 Flash9 / 106 / 6 in 12 turns$0.0156
Qwen 3.7 Flash8 / 106 / 6 in 6 turns$0.0081
MiMo V2.6 Flash8 / 106 / 6 in 5 turns$0.0060
Claude Haiku 5.5 (reference)10 / 106 / 6 in 3 turns$0.0043
Cost is what the run was charged on SparrowCodes, all eleven calls and the agent job together.

What stood out

  • DeepSeek V4.1 Flash was the all-rounder: every task passed, the agent job done in five turns, and fast. If you pick one low-cost model for coding, pick this one.
  • Qwen3 Coder 30B wrote correct code for every task and was the cheapest model on the ten tasks, but as an agent it took small steps and hit the 15-turn limit one test short. Good for writing code, less so for long agent loops.
  • Qwen 3.7 Flash and MiMo V2.6 Flash are the cheapest per token and each failed two tasks. Three of those four failures had the same cause: the model reasoned at length and ran out of output before finishing the code (GLM 4.7 Flash lost its one task the same way). Fine for small, well-defined edits; give them a higher max_tokens for bigger ones.
  • GLM 4.7 Flash got there, but slowly: it was the slowest model on the tasks and needed 12 turns for the agent job.
  • Claude Haiku 5.5 was the fastest and needed the fewest agent turns. It isn't open-weight, but at $0.10 / $0.50 per million tokens it belongs in the same price class.

Use them

In the SparrowCodes CLI, pick the model with /models. Through the API, put the id in the model field of any OpenAI-compatible client:

Python
from openai import OpenAI

client = OpenAI(base_url="https://api.sparrowcodes.com/v1", api_key="YOUR_SPARROWCODES_KEY")
r = client.chat.completions.create(
    model="deepseek/deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Write a function that merges overlapping intervals."}],
)
print(r.choices[0].message.content)

DeepSeek V4.1 Flash, Qwen3 Coder 30B, Qwen 3.7 Flash, MiMo V2.6 Flash and GLM 4.7 Flash are included in the Developer plan; Qwen 3.7 Plus is on Pro.

DeepSeek V4.1 Flash, Qwen3 Coder and four more: low-cost coding models, tested · SparrowCodes