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
| Model | Input / output, per 1M tokens | Context |
|---|---|---|
| DeepSeek V4.1 Flash | $0.15 / $0.60 | 1M tokens |
| Qwen3 Coder 30B | $0.15 / $0.60 | 262K tokens |
| Qwen 3.7 Flash | $0.035 / $0.15 | 1M tokens |
| Qwen 3.7 Plus | $0.32 / $1.28 | 1M tokens |
| MiMo V2.6 Flash | $0.14 / $0.28 | 1.05M tokens |
| GLM 4.7 Flash | $0.07 / $0.40 | 200K tokens |
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
| Model | Tasks passed | Agent job | Cost of the whole run |
|---|---|---|---|
| DeepSeek V4.1 Flash | 10 / 10 | 6 / 6 in 5 turns | $0.0092 |
| Qwen3 Coder 30B | 10 / 10 | 5 / 6 (ran out of turns) | $0.0077 |
| Qwen 3.7 Plus | 10 / 10 | 6 / 6 in 6 turns | $0.0316 |
| GLM 4.7 Flash | 9 / 10 | 6 / 6 in 12 turns | $0.0156 |
| Qwen 3.7 Flash | 8 / 10 | 6 / 6 in 6 turns | $0.0081 |
| MiMo V2.6 Flash | 8 / 10 | 6 / 6 in 5 turns | $0.0060 |
| Claude Haiku 5.5 (reference) | 10 / 10 | 6 / 6 in 3 turns | $0.0043 |
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_tokensfor 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:
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.