Cheap models are no longer limited to autocomplete. DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Qwen3.8-Flash all offer million-token API context windows, reasoning, tool calling, multimodal input, and output prices below $1.20 per million tokens.
That makes them interesting for coding agents, but it also makes the usual “which model wins?” question dangerously easy to answer badly. Published scores use different agent harnesses, context windows, sample counts, and reasoning settings. A model can look first in one provider’s table and lose badly when you run it with your own repository, tools, and budget.
This comparison covers the practical differences, the published evidence that is safe to quote, and how I would evaluate these models before routing production coding work to them.
The Short Answer
- Choose DeepSeek-V4.1-Flash when you need the strongest published agentic results in this group, very cheap cache hits, and long coding trajectories. Its published results use maximum reasoning effort, so validate its real token consumption.
- Choose GLM-5.3-Flash when low output cost, multimodal input, and visual-agent workflows matter. It has credible provider-published coding-agent scores, but less evaluation detail than DeepSeek.
- Choose Qwen3.8-Flash when you want a low-cost, multimodal model with built-in tools and QwenCloud compatibility.
- Choose Qwen3.8-Flash-Next when you want the open-weight checkpoint behind the Flash service and can manage its 262K native context or configure YaRN yourself. Its public release material supports testing it for coding agents, but does not expose a text-based score table that can be compared with DeepSeek or GLM.
There is no universal winner. For a real coding agent, cost per accepted change is a better decision metric than cost per token or a single benchmark score.
API Pricing and Capability Snapshot
All prices below are USD per 1M tokens and were checked on September 15, 2026. Providers can change them, and Qwen pricing varies by region.
| Model | API ID | Input | Cached input | Output | Context |
|---|---|---|---|---|---|
| DeepSeek-V4.1-Flash | deepseek-flash |
$0.15 off-peak / $0.30 peak | $0.003 off-peak / $0.006 peak | $0.60 off-peak / $1.20 peak | 1M |
| GLM-5.3-Flash | glm-5.3-flash |
$0.15 | $0.03 | $0.50 | 1M |
| Qwen3.8-Flash | qwen3.8-flash |
$0.113 | Provider-specific discount | $0.382 | 1M |
Qwen’s prices are Model Studio global list prices at the time of writing. Its pricing page confirms a cache discount but does not expose a model-specific cached-input amount in the pricing row, so I would not put an invented cache price into a cost spreadsheet.
DeepSeek is cheaper outside its peak window. The provider currently defines peak time as 01:00-04:00 and 06:00-10:00 UTC on weekdays. For a coding agent with a stable repository prompt, its cache-read price can change the effective economics much more than the uncached input rate.
All three can use tools and structured outputs. The meaningful difference is the surrounding platform:
| Model | Relevant agent features |
|---|---|
| DeepSeek-V4.1-Flash | Thinking and non-thinking modes, function calling, JSON output, Responses API, FIM completion, OpenAI- and Anthropic-compatible APIs |
| GLM-5.3-Flash | Required thinking, function calling, structured output, context caching, image/video/file input, streaming tool output |
| Qwen3.8-Flash | Thinking, function calling, structured output, built-in web search, code interpreter, and web-scraping tools |
Vision Is Part of the Coding Workflow
All three API models accept visual input. This is not only useful for OCR. A coding agent can inspect a reference screenshot, compare a rendered page with the target design, read a browser error state, or review a diagram before changing code.
- DeepSeek-V4.1-Flash supports vision alongside text. Its API documentation lists vision, tool calls, JSON output, and the Responses API for the same model ID.
- GLM-5.3-Flash accepts images, video, and files. Z.AI positions its native multimodality specifically for visual coding loops that inspect rendered output and iterate.
- Qwen3.8-Flash accepts text and images. The QwenCloud API also exposes official built-in tools, which can reduce the integration work for web-backed agent tasks.
Vision does not make an agent reliable by itself. It does make visual verification possible, provided the harness gives the model screenshots or an image-capable browser tool and evaluates the resulting UI.
What the Published Benchmarks Actually Say
The table below is a source map, not a leaderboard. Every numeric result is provider-published, and the evaluations are not controlled head-to-head tests.
| Model | Terminal-Bench 2.1 | DeepSWE v1.1 | AutomationBench |
|---|---|---|---|
| DeepSeek-V4.1-Flash | 90.6 | 74.2 | 54.8 |
| GLM-5.3-Flash | - | 63.4 | 48.8 |
| Qwen3.8-Flash | Not published as accessible text | Not published as accessible text | Not published as accessible text |
DeepSeek-V4.1-Flash: Strong Results, Maximum Effort
DeepSeek publishes the most detailed evaluation setup of the three. At reasoning_effort=100, it reports 90.6 on Terminal-Bench 2.1, 74.2 on DeepSWE v1.1, 64.0 on NL2Repo-Bench, 20.3 on ProgramBench, and 54.8 on AutomationBench.
For its coding-agent benchmarks, DeepSeek uses temperature=1.0, top_p=0.95, a 1M-token context, and max_steps=500. Terminal-Bench 2.1 runs through DeepSeek Harness Minimal with three samples per task and no network access. DeepSWE uses mini-SWE-agent with eight samples per task.
That is useful transparency, but it also sets an important expectation: these are maximum-reasoning results. A cheaper reasoning setting may have a very different success rate and total token bill. DeepSeek publishes instructions to reproduce its DeepSWE result, which makes it a promising candidate for a local evaluation rather than a score to accept on faith.
GLM-5.3-Flash: Good Signals, Fewer Details
Z.AI reports 63.4 on DeepSWE v1.1 and 48.8 on AutomationBench for GLM-5.3 Flash. It also reports 29.0 on its own Z.ai Code Bench v1.0 at maximum effort.
Those are useful signals, particularly given the $0.50 output rate and the model’s multimodal workflow support. But the model page does not expose the detailed harness, context, timeout, and sampling configuration needed to compare its 63.4 directly with DeepSeek’s 74.2.
Treat GLM as a serious evaluation candidate, not as a proven second-place model. It may be the better choice when screenshots, visual browser tasks, or file-heavy workflows are part of the job.
Qwen3.8-Flash: API Service and Open-Weight Checkpoint
qwen3.8-flash is the QwenCloud/Model Studio API model. It is the production service based on the open-weight Qwen3.8-Flash-Next checkpoint, which Qwen calls an early preview of its Qwen4 architecture. This is not Qwen3.8-Max, a separate flagship API model.
The open checkpoint has a native 262,144-token context and can be extended to 1M with YaRN. QwenCloud serves qwen3.8-flash with a 1M context window by default and official built-in tools. The API supports low, medium, and xhigh reasoning effort, as well as text and image input.
Qwen’s release material says Qwen3.8-Flash is competitive on agentic coding and lists SWE-bench Pro among its evaluations, but the accessible results are published as images rather than a text table with harness details. I will not infer or repeat a score from a different Qwen model. Test qwen3.8-flash directly with the same harness and budget used for the other two models.
Qwen3.8-Flash-Next: The Open Model Behind Flash
Qwen3.8-Flash-Next is the open-weight checkpoint. It has a 125B-parameter main model, 51B additional N-gram embedding parameters, and activates 6B parameters per token. Qwen uses a hybrid Gated DeltaNet and Qwen Sparse Attention design to reduce the cost of long-context attention.
The distinction from the API matters in practice. Flash-Next natively supports 262,144 tokens; it can extend to 1M with YaRN, but that is a deployment configuration you own. QwenCloud serves the production qwen3.8-flash model with 1M context by default, built-in tools, OpenAI-compatible Chat Completions and Responses APIs, and an Anthropic-compatible interface.
The open checkpoint is the option to evaluate if you need control over deployment, quantization, or inference stack. The managed API is the option to evaluate when you want the provider to operate the 1M-context service and agent integrations. They are related, but an API result should always identify the service and configuration used.
External Baselines: GPT-5.6 Luna and Mistral Small 4
An impartial comparison needs reference points outside the three Flash models. GPT-5.6 Luna is a hosted low-cost API baseline with published coding-agent results. Mistral Small 4 is an Apache 2.0 open-weight/API baseline that combines coding, reasoning, and multimodality, but it does not publish the same agentic benchmark suite.
| Model | Input | Cached input | Output | Context | Deployment |
|---|---|---|---|---|---|
| GPT-5.6 Luna | $0.20 | $0.02 | $1.20 | 1.05M | OpenAI API |
| Mistral Small 4 | $0.15 | $0.015 | $0.60 | 256K | Mistral API or self-hosted weights |
Published Coding and Agent Benchmarks
| Model | AA Coding Agent Index v1.1 | SWE-bench Pro | DeepSWE v1.1 | Terminal-Bench 2.1 |
|---|---|---|---|---|
| GPT-5.6 Luna | 74.6 | 62.7% | 67.2% | 84.7% |
| Mistral Small 4 | Not published | Not published | Not published | Not published |
OpenAI publishes all four Luna results in its GPT-5.6 release. Luna is more expensive on output than the Flash APIs, but it supports image input, function calling, structured outputs, web search, file search, hosted shell, apply_patch, computer use, MCP, and other Responses API tools. That managed tool surface can be worth the extra output cost for teams already using OpenAI’s platform.
Mistral publishes a different kind of evidence: 0.72 on AA LCR while generating an average of 1.6K characters. It also reports that Small 4 outperforms GPT-OSS 120B on LiveCodeBench while using 20% less output, but does not expose the exact LiveCodeBench score in accessible text. AA LCR and LiveCodeBench measure coding/reasoning capability; they are not substitutes for a full coding-agent benchmark such as DeepSWE or Terminal-Bench.
The distinction is important. Reporting an empty cell is more honest than borrowing a score from another benchmark or a different harness. Luna is the external baseline when comparing published coding-agent scores; Mistral is the external baseline for a low-cost open model that still needs the same local agent evaluation as Qwen3.8-Flash.
Why Token Price Is the Wrong Finish Line
A coding agent spends tokens on much more than the final diff: repository context, planning, tool calls, test output, retries, and sometimes hidden reasoning. A low output-token price is excellent only if the model completes the task without repeated failures or expensive human intervention.
I would track these metrics for each model:
- Task success rate: tests pass and the requested behavior is actually delivered.
- Human rework: review changes, rollback rate, and time spent correcting the agent.
- Total cost: input, output, reasoning, cache writes and reads, and tool charges.
- Time to a working change: wall-clock latency, number of turns, and failed tool calls.
- Context behavior: quality and cost on a small task versus a long-lived repository session.
An inexpensive model that resolves 75% of well-scoped test-writing tasks may be the right worker. A stronger model that resolves ambiguous bugs with fewer attempts may be cheaper per accepted change even with a higher output price.
A Practical Evaluation Plan
Do not start with a public benchmark clone. Start with the work your team actually does.
- Assemble 25-50 representative tasks: focused bug fixes, test additions, small refactors, dependency upgrades, multi-file changes, and UI fixes with screenshots.
- Freeze repository snapshots, tool permissions, timeouts, and a maximum cost budget. Changing the harness changes the result.
- Run every task at least three times for each model. Agentic workflows are stochastic; one impressive run is not evidence.
- Record pass rate, token usage, cache-hit rate, tool-call errors, wall-clock time, and human rework.
- Test long-context work separately. A 1M-token limit does not mean loading a whole repository is economical or useful.
- Route by task type after the data exists. Use the cheapest model that clears your quality threshold, with a fallback for ambiguous or high-risk work.
This approach is more work than copying a benchmark table, but it is the only way to know whether a low-cost Flash model is genuinely saving money in your environment.
The Bottom Line
DeepSeek-V4.1-Flash has the most persuasive published agentic-coding evidence in this specific comparison, backed by unusually detailed evaluation conditions. GLM-5.3-Flash is attractive for low-cost, multimodal, and visual-agent workflows, but requires direct testing because its published setup is less detailed. Qwen3.8-Flash has the lowest listed output price and a capable platform, but the accessible sources do not publish a directly comparable numeric coding-agent scorecard for it.
If you are optimizing a coding agent, start with DeepSeek and GLM for benchmark-backed candidates, add Qwen3.8-Flash for its price and tools, then decide with your own task set. The winning model is the one that produces the most accepted changes inside your quality, latency, and cost limits.
For another API cost comparison, see Kimi K2.7 Code vs GPT-5.4 vs GPT-5.5.
References
- DeepSeek V4.1 Flash model card and benchmark setup
- DeepSeek API pricing
- GLM-5.3 Flash model page
- Z.AI API pricing
- Alibaba Cloud Qwen text-model capabilities
- Alibaba Cloud Model Studio pricing
- Qwen3.8-Flash-Next release and API mapping
- Qwen3.8-Flash release
- GPT-5.6 release and benchmark tables
- GPT-5.6 Luna model page and current API pricing
- Mistral Small 4 announcement and AA LCR result
- Mistral Small 4 model page