Qwen Context Cache: What We Verified in 2026

Alibaba documents implicit Qwen context caching natively, but our 2026-07-28 routed test showed 0 cached tokens. See the measured numbers and what they mean.

Fan Chuanyu's profile

Written by Fan Chuanyu

6 min read

Alibaba documents implicit context caching for Qwen on its native Model Studio endpoint, but our 2026-07-28 routed test could not demonstrate it: both calls reported 0 cached tokens, and the billed drop tracked provider pricing, not caching.

Context caching is an input-side billing and latency optimization that lets an API reuse an already processed prompt prefix instead of recomputing it, so a second request carrying the same long system prompt or document header pays a reduced rate on the repeated part. It changes cost and speed only. It does not change what the model outputs, and no page should tell you otherwise.

The interesting question for Qwen is not whether the feature exists on paper. It is whether you actually receive it on the access path you happen to be using. We tried to answer that with a measurement, and the honest result is a split verdict.

Qwen context cache (verified 2026-07)

Qwen is the model family developed by Alibaba's Qwen team, and Model Studio is the native serving platform Alibaba Cloud operates for it. Our benchmark reached Qwen3-235B-A22B-2507 through an OpenRouter-routed path, not through Model Studio. That distinction turns out to be the whole story.

The two Qwen calls, side by side

MetricCall A (first)Call B (repeat)
Prompt tokens3,5313,532
Cached tokens reported00
Completion tokens2324
Latency2.72 s5.40 s
Billed cost (usage.cost)$0.00072644$0.00033108
Served modelqwen/qwen3-235b-a22b-2507qwen/qwen3-235b-a22b-2507

We sent the same fixed ~1800-token changelog prefix twice on 2026-07-28, two seconds apart, with a different one-line question appended each time, temperature 0 and max_tokens 40. The routed usage object returned prompt_tokens_details.cached_tokens of 0 on both calls. Billed cost still fell from $0.00072644 to $0.00033108.

That pairing is exactly why the row needs care. A 54% billed drop with zero reported cached tokens looks like a cache discount to anyone reading only the invoice. It is not one. Call B's $0.00033108 lines up with Qwen3-235B list pricing for that token mix, roughly $0.00032 computed, while call A was billed at about twice list. The delta therefore tracks provider-price variance on the routed marketplace, where several independent providers serve the same model at different rates, and it is not evidence of a Qwen cache hit.

What Alibaba documents on the native endpoint

According to Alibaba Cloud Model Studio documentation, Qwen offers implicit context caching on its native DashScope and Model Studio endpoint, applied automatically to repeated prompt prefixes. Our routed measurement neither confirms nor contradicts that. It only shows that the discount did not surface on the path we tested, through the fields that path exposes.

This is the access-path lesson of the whole cluster. A caching feature is a property of a specific endpoint and its billing integration, not a property of the model weights. If the documented Qwen cache discount is part of your cost model, the native endpoint is where the documented feature lives, and that is where the saving should be verified before it enters a budget.

How Qwen compares with the rest of the run

EndpointCached tokens on repeatBilled change on repeatWhat it shows
DeepSeek V4-Flash (native)3,328 of 3,403input cost computed at official rates: $0.000476 to $0.0000571 (-88%)implicit cache hit, explicit hit/miss fields
GLM-5 (routed)3,200 of 3,284$0.002388 to $0.000596 (-75%)implicit cache survived routing
MiniMax-M2.5 (routed)3,296 of 3,316$0.000530 to $0.000204 (-62%)implicit cache survived routing
Qwen3-235B (routed)0$0.000726 to $0.000331provider-price variance, not cache evidence
DeepSeek (routed)0$0.000698 to $0.000696 (none)cache lost through the router this run
Kimi K2 (routed)0$0.001901 to $0.001897 (none)no implicit cache visible via this route

Read those six rows together and the tempting generalisation collapses. GLM-5 and MiniMax-M2.5 both returned large cached-token counts and a visible billed discount through the same router that showed nothing for Qwen, so "routers lose caching" is false as a blanket claim. On this run the DeepSeek family lost its cache through the router while hitting 98% natively, and Qwen showed no cached tokens either way. Cache pass-through is a per-provider integration detail.

The DeepSeek native side is the useful contrast because its API exposes the split directly. According to DeepSeek API docs, cache-hit input tokens bill at $0.014 per million against $0.14 per million for a miss, and the caching is automatic. Applying those official rates to our measured 3,328 hit and 75 miss tokens is how the -88% input figure above is computed, not billed. We report it as a computation, because the native endpoint returns no cost field.

The implicit-only caveat that applies to every zero in that table

Our design measured implicit, automatic caching only. Providers that require an explicit marker in the request are expected to report zero here, and that is a finding about defaults, never a claim that caching is unsupported. According to Anthropic's prompt caching documentation, Claude caching is triggered by explicit cache_control breakpoints that our test never sent, so its zero is by design. OpenAI documents automatic prompt caching for prompts at or above 1,024 tokens on its own API, which our routed path did not surface, and Moonshot offers context caching as a managed feature on its native platform. The Qwen zero sits in the same category: a default-behaviour observation on one route, on one day.

Practical read for buyers

Choose the native Model Studio endpoint if repeated long prefixes are a large share of your Qwen spend and the documented implicit cache is material to your unit economics. Choose a routed path if breadth of model access and single-invoice billing matter more, but do not assume a cache discount that our measurement could not observe. In either case, the billing dashboard is the wrong place to detect caching, because provider-price variance can move the same-looking number by 2x.

The general rule from this run: verify cache behaviour in the usage object, not the invoice. A cached-token count is a measurement. A cost delta is an inference, and on a multi-provider marketplace it is often an inference about routing, not about caching. Our Qwen row is the clearest example in the dataset.

Methodology and limits: DeepSeek native was measured on api.deepseek.com; every other endpoint in this run was reached through an OpenRouter-routed path, disclosed as such, with needs_native_reverify set to true. Seventeen of seventeen calls succeeded, total routed spend was $0.051, and this is a single-region snapshot taken on 2026-07-28. Cache TTLs and minimum prefix lengths follow each vendor's own documentation.

FAQ

Does Qwen support context caching? Alibaba documents implicit context caching on the native DashScope and Model Studio endpoint. Our routed test on 2026-07-28 could not demonstrate it, reporting 0 cached tokens on both calls, so we treat the native behaviour as documented but not yet independently verified by us.

Why did the second Qwen call cost half as much if nothing was cached? Because call B was billed at roughly Qwen3-235B list price, about $0.00032 computed for that token mix, while call A was billed at about twice list. That gap reflects provider-price variance on a routed marketplace, not a cache discount.

Does a routed path always lose caching? No. In the same run, GLM-5 showed a 75% billed drop and MiniMax-M2.5 a 62% drop through the same router, both with large cached-token counts. DeepSeek lost its cache through the router on this run while hitting 98% natively. It depends on the provider integration.

Does caching change model output quality? No. Caching affects input cost and latency only. Every number on this page is a cost, token or latency measurement, and we make no accuracy or quality claim anywhere in this cluster.

How should I verify Qwen caching for my own workload? Send your real prefix twice on the native endpoint and read the usage fields the response returns rather than the billed total. We plan to re-run this test natively, which is why the evidence artifact carries needs_native_reverify.

For the full cross-vendor picture, including the DeepSeek native versus routed gap, start at our LLM prompt caching benchmark hub. The pricing mechanics of a cache hit are broken out in DeepSeek cache discount, and Qwen's overall standing against its peers is covered in best Chinese LLM API.

Author: Kevin Fan, Customer Success Manager. Last verified: 2026-07-28.

Share: