Repository navigation
Alibaba: most Qwen models are missing cache prices #9268
Description
47 of the 56 Qwen models under providers/alibaba/models have no cache_read, so anything pricing from models.dev bills cached input at the full input price. For some of these that's right, since Alibaba doesn't cache every model, but 12 of them are on Alibaba's supported lists.
Alibaba's context cache page lists the supported models per region, and for Singapore the rules are below. Singapore is what alibaba prices: its provider.toml points at dashscope-intl.aliyuncs.com, which Alibaba's regions page gives as the Singapore endpoint.
- implicit cache (automatic, no setup): a hit costs 20% of input
- explicit cache (opt-in): creating the cache costs 125% of input, a hit costs 10%
- a few models are exceptions with console-only prices (qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b)
Here's what that gives for the 12 that are on the Singapore lists, per 1M tokens, using each file's current input price:
| model | input | cache_read (20%, or 10% if explicit only) | cache_write (explicit, 125%) |
|---|---|---|---|
| qwen-flash | 0.05 | 0.01 | 0.0625 |
| qwen-max | 1.6 | 0.32 | not supported |
| qwen-plus | 0.4 | 0.08 | 0.5 |
| qwen-plus-character-ja | 0.5 | 0.1 | not supported |
| qwen-turbo | 0.05 | 0.01 | not supported |
| qwen-vl-max | 0.8 | 0.16 | not supported |
| qwen-vl-plus | 0.21 | 0.042 | not supported |
| qwen3-coder-flash | 0.3 | 0.06 | 0.375 |
| qwen3-coder-plus | 1.0 | 0.2 | 1.25 |
| qwen3-max | 1.2 | 0.24 | 1.5 |
| qwen3-vl-plus | 0.2 | 0.04 | 0.25 |
| qwen3.5-plus | 0.4 | 0.04 (explicit only, so 10%) | 0.5 |
The cache page prices hits as a share of the input_token unit price, so for tiered models (qwen-plus, qwen3-max, the coder models, etc.) the same percentages apply to each tier's input price.
One thing to settle first: Alibaba has two hit prices and cache_read holds one. A request uses one mode or the other, since the page says "Explicit cache and implicit cache are mutually exclusive", so the choice only matters for who gets billed a bit wrong. I'd go with 20% for models that support implicit caching, since it's on by default and covers most traffic, and 10% for models that only support explicit caching, since every hit there is explicit. cache_write is 125% either way, since only explicit caching writes. That's what the table uses. The alternative is 10% everywhere, which matches explicit pricing and what qwen3.7-plus and qwen3.7-flash already use even though both support implicit caching, while qwen3.7-max uses 20%. Either way it's 10% of input on cached tokens. (qwen3.6-plus's 10% is already right, since it's explicit only.) If this works for you, I'll send a PR that also brings qwen3.7-plus and qwen3.7-flash in line.
I'm already applying this version as corrections in model-prices, which builds on models.dev's history.
Activity