Qwen3.8-27B completed all eight trials in our small test; DeepSeek V4.1 Flash completed seven and had the lower bill. DeepSeek’s miss was a tool-cursor mistake, while both models passed the coding and chart tasks.
We ran four original tasks twice on each model: two Python repairs, a chart-to-JSON task and an invoice-ledger tool workflow with a retryable error. That produces eight trials per model, not eight different benchmarks. The useful findings are the recorded bills, response times and exact outputs. A sample this small cannot establish which model is generally more intelligent.
Tested September 10, 2026 through Vercel AI Gateway. Both models used hosted endpoints. We did not run a fresh local Qwen or DeepSeek inference test for this article.
The result in one table
| Model | Passing trials | Total charge (USD) | Cost per passing trial | Median API waiting time / task |
|---|---|---|---|---|
| DeepSeek V4.1 Flash | 7/8 | $0.01092 | $0.00156 | 6.27s |
| Qwen3.8-27B | 8/8 | $0.02008 | $0.00251 | 12.33s |
“Cost per passing trial” means the model’s entire bill divided by the number of trials that passed. Failures remain in the bill. API waiting time is the sum of the HTTP response times for a trial; it includes network and provider processing, but excludes our billing lookups and local grading. The median covers all eight attempts.
The complete DeepSeek/Qwen subset cost $0.03100—about three US cents. DeepSeek’s observed cost per passing trial was 37.8% lower. Qwen completed the full set twice; DeepSeek’s lower cost came with one unfinished tool trial.
Which DeepSeek and which Qwen?
Model names have become easy to blur. This comparison uses DeepSeek V4.1 Flash and Qwen3.8-27B. It does not test Qwen3.8-Max, DeepSeek V4 Pro or the older V4 Flash checkpoint.
| Specification | DeepSeek V4.1 Flash | Qwen3.8-27B |
|---|---|---|
| Architecture | MoE; 552B backbone plus Engram conditional memory | Dense 27B language model with vision encoder |
| Active parameters | 8B during prefill; 16B during decode | Dense architecture; not an “8B active” comparison |
| Official weight-file download we audited | 510.30GB | 55.56GB |
| Documented input | Text and images | Text, images and video |
| Documented context | Up to 1M tokens | 262,144 native; extensible to 1M |
| Weight license | MIT | Apache 2.0 |
| Exact gateway model ID tested | deepseek/deepseek-v4.1-flash |
alibaba/qwen3.8-27b |
| Pinned serving provider | DeepSeek | Alibaba |
Sources: the DeepSeek model card, Qwen model card, official repository manifests and Vercel’s model catalog. Download sizes are sums of the official safetensors files, not measured serving-memory allocations. The Qwen manifest was captured at revision 1d4bf0f2; DeepSeek at df42c109.
What we asked the models to do
Repair maintenance-window merging. The broken Python function mutated its input, mishandled nested ranges and failed to combine touching windows. A passing replacement had to handle empty and negative ranges, reject reversed intervals and return fresh lists. We checked nine cases per answer.
Allocate a discount exactly. The model had to replace a floating-point rounding implementation with proportional integer allocation using the largest-remainder method. Ties had to favor the lower original index, and inputs above 253 had to remain exact. Thirteen checks covered normal, zero-total, invalid and precision-sensitive cases.
Read a campaign graphic and return strict JSON. The image contained campaign spending, qualified-lead counts and a pilot exclusion. Passing required the right included campaigns, the cheapest campaign per lead, correct totals and a response that parsed directly as JSON.

Recover a tool workflow. A local mock ledger tool returned a retryable error on its first call. The model then needed both pages, had to exclude void and refunded invoices, and had to count a duplicated paid invoice once. Passing meant returning the three paid IDs, 2,650 cents and a truthful completion flag.
| Task | DeepSeek V4.1 Flash | Qwen3.8-27B |
|---|---|---|
| Window-merging repair | 2/2 | 2/2 |
| Exact discount allocation | 2/2 | 2/2 |
| Chart reading + strict JSON | 2/2 | 2/2 |
| Tool retry + pagination + deduplication | 1/2 | 2/2 |
Where DeepSeek’s second tool run stopped
In the failed run, the returned tool call supplied {"cursor":"null"}: the string “null,” rather than the JSON null value needed to start the ledger. After the initial retryable error, the tool rejected that cursor. The route repeated the string and eventually tried an empty string. It never obtained either page or returned a final answer within the four-response limit.
The first DeepSeek run used the correct null value and passed. Qwen passed both runs. This is an observed failure of the tested gateway route and configuration; we did not isolate the base model from every adapter in the serving stack. A longer retry allowance might change the outcome, but we did not add one after seeing the result.
For the coding tasks, we required directly usable Python source. For the data tasks, we required directly usable JSON. We did not repair answers or pay another model to judge them. Code was checked with restricted built-ins in a separate process with a timeout; the ledger tool used synthetic data and had no external side effects.
The cost finding needs the reasoning-token detail
Across its 14 calls, DeepSeek reported 8,214 output tokens, of which 7,174 were identified as reasoning tokens. Qwen reported 5,331 output tokens, including 4,260 reasoning tokens. DeepSeek also reported 3,712 cached input tokens; Qwen reported none. Those are properties of these runs, not universal caching or reasoning guarantees.
That is why price per million tokens is only the starting point. Two correct answers can have different bills because one model spends many more tokens reasoning before producing its final answer. Caching and provider routing also affect the bill.
The first interval-repair attempt is a useful counterexample to a blanket “DeepSeek is always cheaper” claim. DeepSeek’s recorded charge was $0.0022587; Qwen’s was $0.002054. DeepSeek produced more reasoning tokens on that attempt. The aggregate comparison still favored DeepSeek, but individual tasks can reverse the cost order.
| Route | Uncached input / 1M tokens | Output / 1M tokens |
|---|---|---|
| DeepSeek Flash, off peak | $0.15 | $0.60 |
| DeepSeek Flash, peak | $0.30 | $1.20 |
| Qwen3.8-27B through the tested Alibaba route | $0.50 | $3.00 |
These were the listed rates at the test date, before cache effects; other Qwen providers can charge differently. DeepSeek’s peak windows are weekdays 01:00–04:00 and 06:00–10:00 UTC. Sources: DeepSeek pricing and gateway endpoint pricing. The results table uses recorded generation charges rather than multiplying every request by an assumed uncached rate.
Qwen’s local advantage survives a hosted price comparison
A hosted Qwen bill does not tell you the economics of running Qwen on hardware you already own. This fresh test used Alibaba’s endpoint to keep the experiment small and to compare the same tasks through one API interface.
For a local deployment, the difference in checkpoint size is decisive. Qwen’s official files total about 55.56GB; quantized distributions can be smaller. DeepSeek’s official files total about 510.30GB, with additional runtime and memory-placement constraints. Our V4.1 hardware guide explains the Engram host-memory option and the preview server configurations.
For desktop Qwen planning, use our Qwen3.8-27B hardware guide and the earlier 27B-class local comparison. Those are separate investigations. Their quantization, context and hardware settings are not the settings behind today’s hosted scores.
Choose a local route when keeping prompts on your machine, operating without a hosted dependency or adapting the weights is central to the job. Include electricity, hardware utilization and your maintenance time in the cost calculation. “No API bill” does not mean “no cost.”
How much should you trust eight trials?
Enough to reproduce these examples and inspect these costs. Not enough to declare a coding, vision or reasoning champion.
Each model saw the same task instructions, the same image and the same tool behavior. We requested low reasoning effort and capped each response at 3,072 output tokens. We left sampling settings at provider defaults, pinned each provider and reversed model order on the second repeat. “Low” is a provider-specific setting; it does not equalize compute.
The tests used short inputs, small functions and one chart. They did not cover a large repository, long-context retrieval, sustained concurrency, video, private deployment, adversarial robustness or the quality impact of local quantization. The serving providers did not disclose their exact hardware or weight precision in the checked endpoint metadata. Both models’ published evaluations use much larger budgets than this experiment.
For hosted work, DeepSeek deserves a small trial with an acceptance check because its measured bill was low. Qwen is the cleaner result on this particular set and remains the more practical model to investigate for ordinary local hardware. For tool workflows, test argument values and recovery explicitly before making either route a default.
For the same tasks against GPT-6 Astra and Claude Fable 5.1, see our frontier comparison with benchmarks and failures.
Download the test materials
The reproducibility bundle includes the prompts, image, predetermined checks, requests, responses, per-generation billing records and trial summaries. It also contains the GPT and Claude runs used in our companion article; this is one shared campaign, not a second independent dataset.
The DeepSeek/Qwen subset contains 16 task trials. The complete four-model campaign contains 32 trials. You can inspect the saved results without making any API calls. Rerunning the supplied runner requires your own gateway key and incurs usage charges.
