Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

fix(core): TokenDance 分组补上新模型,价格按卖家当下目录重核

lmlihengeb5521653dfb
diff --git a/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.md b/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.md
new file mode 100644
index 00000000..bccbd0d9
--- /dev/null
+++ b/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.md
@@ -0,0 +1,55 @@
+# TokenDance gains the models it has added, and the group's prices are re-read
+
+- **Date:** 2026-10-27
+- **Type:** fix
+- **Scope:** `core`, `docs`
+- **Breaking:** no
+
+[中文](2026-10-27-tokendance-catalog-refresh.zh.md)
+
+The **Models** page's TokenDance group gains four rows: DeepSeek V4.1 Flash 1017, DeepSeek V4 Pro Preview,
+Kimi K3.1 Pro and GLM-5.3 FlashX. All eighteen rows' prices, context windows and promotions were re-read
+against the seller's own catalog as well (the previous read was 2026-09-16, and several rates have moved
+since): **Sync presets** brings the new rows and the corrected prices into an existing Project, and a new
+Project starts with them.
+
+## Details
+
+- **Four new rows** (`core/src/state/model-catalog.ts`):
+ - `deepseek-v4.1-flash-1017` — the seller's catalog says V4.1 Flash's DeepSeek endpoint has been upgraded
+ to the 1017 release, and this is the separately listed id at the same rates: a 1M window, image input,
+ a list of CNY 2 / 8 per million (CNY 0.04 cache hit), 20% off inside DeepSeek's peak windows and half
+ the list outside them. It and `deepseek-v4.1-flash` now store the peak rate the gateway actually bills
+ plus the vendor's schedule, so both tiers land on what the gateway charges.
+ - `deepseek-v4-pro` — the undated id of the same V4 Pro line: a 1,048,576-token window, text only, a CNY
+ 9 / 27 list (CNY 0.3 cache hit) at 10% off, and no peak/off-peak schedule.
+ - `kimi-k3.1-pro` — the first of Moonshot's K3.1 line and the largest model the seller carries: a 1M
+ window, image and video input, undiscounted at CNY 13 / 68 (CNY 1.3 cache hit).
+ - `glm-5.3-flashx` — GLM-5.3 Flash's same-generation sibling: a 1M window, image input, undiscounted at
+ CNY 2 / 7 (CNY 0.57 cache hit).
+- **Corrections.** Kimi K3's 40% promotion and the 10% on `deepseek-v4-flash-0731` and `deepseek-v4-pro-0813`
+ have all lapsed, so those three rows go back to recording the seller's list price with no promotion field;
+ `seed-evolving`'s window is 1M rather than 256K; and two older DeepSeek rows move onto DeepSeek's
+ peak/off-peak schedule (CNY 1.5 / 4.5 and 4.5 / 13.5 off-peak).
+- **One approximation, written down in the code and the docs.** `deepseek-v4-flash-0731` and
+ `deepseek-v4-pro-0813` are billed 20% off the list inside DeepSeek's windows, but half the **list**
+ outside them, and a row holds a single rate (`discount` and `offPeakDiscount` are mutually exclusive).
+ Both therefore store the billed peak rate and halve it, which puts their off-peak records 20% below what
+ the gateway charges; the peak figures are exact. `deepseek-v4.1-flash` and `deepseek-v4.1-flash-1017`
+ promote both tiers, so halving them is exact.
+- **The data source changed.** Prices used to need a signed-in session on the seller's model pages; they now
+ come from `GET https://tokendance.space/portal/api/models/all` (anonymous, carrying the current rate, the
+ list price and both schedule tiers), with windows, modalities and protocols from
+ `GET https://tokendance.space/gateway/v1/models`.
+- Docs: the preset table, the DeepSeek off-peak section and the flat-promotions section of
+ `packages/docs/content/models.zh.md` / `models.en.md` (nine discounted models become seven, eight resold
+ rows become eleven).
+- Tests: the three TokenDance pins in `core/test/model-catalog.test.ts` (the row list, the discounted list,
+ the scheduled list) follow the new facts, and a new assertion pins that a row with neither a promotion nor
+ a schedule bills exactly its published rates.
+
+## Compatibility
+
+- No interface, on-disk format or package-name change. A Project's own rows are not rewritten: both the new
+ rows and the corrected prices arrive with **Sync presets**, and a row whose price the user edited keeps
+ their price.
diff --git a/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.zh.md b/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.zh.md
new file mode 100644
index 00000000..59a578ee
--- /dev/null
+++ b/changelog/unreleased/2026-10-27-tokendance-catalog-refresh.zh.md
@@ -0,0 +1,44 @@
+# TokenDance 分组补齐新模型,价格与促销按卖家当下的目录重核
+
+- **Date:** 2026-10-27
+- **Type:** fix
+- **Scope:** `core`, `docs`
+- **Breaking:** no
+
+[English](2026-10-27-tokendance-catalog-refresh.md)
+
+**模型库**里 TokenDance 分组多出四条模型:DeepSeek V4.1 Flash 1017、DeepSeek V4 Pro Preview、
+Kimi K3.1 Pro、GLM-5.3 FlashX。同时把这一组全部 18 条的价格、上下文窗口与促销重核了一遍(上一次核对是
+2026-09-16,其中几条的价格已经变了):已有项目点一次**同步预置**就拿到新条目与更正后的价格,新建项目直接带着。
+
+## 细节
+
+- **四条新条目**(`core/src/state/model-catalog.ts`):
+ - `deepseek-v4.1-flash-1017` —— 卖家目录里写明 V4.1 Flash 的 DeepSeek 端点已升级到 1017 版本,
+ 这只是同价的独立 id:100 万窗口、可读图,牌价 ¥2 / ¥8 每百万(命中缓存 ¥0.04),峰时 8 折、
+ 谷时按牌价一半。它与 `deepseek-v4.1-flash` 都改用「峰时实际计费价 + DeepSeek 空闲时段」的写法,
+ 两个档位因此都与网关实收一致。
+ - `deepseek-v4-pro` —— 同一条 V4 Pro 的未带日期 id,104.8576 万窗口、纯文本,牌价 ¥9 / ¥27
+ (缓存 ¥0.3)打 9 折,没有峰谷时段。
+ - `kimi-k3.1-pro` —— Moonshot K3.1 系列首个模型、卖家当前最大的一个:100 万窗口、可读图与视频,
+ 无促销,¥13 / ¥68(缓存 ¥1.3)。
+ - `glm-5.3-flashx` —— GLM-5.3 Flash 的同代兄弟,100 万窗口、可读图,无促销,¥2 / ¥7(缓存 ¥0.57)。
+- **更正**:`kimi-k3` 的 6 折、`deepseek-v4-flash-0731` 与 `deepseek-v4-pro-0813` 的 9 折都已停止,
+ 三条的价格改记卖家的当前牌价,去掉促销字段;`seed-evolving` 的窗口从 25.6 万改为 100 万;
+ 两条老 DeepSeek 条目改按 DeepSeek 的空闲时段计费(谷时 ¥1.5 / ¥4.5 与 ¥4.5 / ¥13.5)。
+- **一处只能近似,已写进代码与文档**:`deepseek-v4-flash-0731` 与 `deepseek-v4-pro-0813` 的峰时费率是
+ 促销后的价(牌价省 20%),谷时网关按**牌价**的一半收,而一条记录只放得下一个费率(`discount` 与
+ `offPeakDiscount` 互斥)。两条因此记峰时实收、谷时按它减半,谷时估算比网关实收低 20%;峰时精确。
+ `deepseek-v4.1-flash` 与 `deepseek-v4.1-flash-1017` 两个档位打同一个促销,减半正好吻合。
+- **数据来源换了公开接口**:价格以前要登录卖家详情页才看得到,现在用
+ `GET https://tokendance.space/portal/api/models/all`(匿名可取,带当前费率、牌价与峰谷两档),
+ 窗口、模态与协议取自 `GET https://tokendance.space/gateway/v1/models`。
+- 文档:`packages/docs/content/models.zh.md` / `models.en.md` 的预置模型表、「DeepSeek 空闲时段」与
+ 「固定折扣」两节跟着改(固定折扣从九个减到七个,转售条目从八条增到十一条)。
+- 测试:`core/test/model-catalog.test.ts` 里 TokenDance 那组的三处钉子(条目清单、打折清单、峰谷清单)
+ 跟到新事实,并新增一条「既无促销也无时段的条目,实收就是公布价」的断言。
+
+## 兼容性
+
+- 没有接口、磁盘格式或包名变化。已有 Project 自己的条目不被改写:价格与新增条目都要点一次**同步预置**
+ 才会进去,改过价格的条目(促销已被自己取消)保持用户自己的价。
diff --git a/packages/core/src/state/model-catalog.ts b/packages/core/src/state/model-catalog.ts
index 879636a3..56cf1744 100644
--- a/packages/core/src/state/model-catalog.ts
+++ b/packages/core/src/state/model-catalog.ts
@@ -29,7 +29,11 @@
* (its HTTP doc publishes no price list, and the product page's prices name model families it
* has published no API id for); and the Abliteration group, whose four rows were read from the
* service's own model list on 2026-10-23; and the Volcengine Ark (ByteDance) group, whose rows
- * and prices were read from Ark's own model list and model-pricing pages on 2026-10-25.
+ * and prices were read from Ark's own model list and model-pricing pages on 2026-10-25, and the
+ * TokenDance group re-read whole — its ids, windows, modalities, protocols and prices, four
+ * DeepSeek rows moved onto the vendor's schedule, the K3.1 Pro / V4 Pro / GLM-5.3 FlashX / V4.1
+ * Flash 1017 rows added and the K3 promotion dropped — from the seller's own catalog API on
+ * 2026-10-27.
* Docs: packages/docs/content/models.{zh,en}.md (site path /docs/models) documents the
* provider groups and credential resolution described here.
*
@@ -1682,44 +1686,57 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: SILICONFLOW_BASE_URL,
},
- // -- TokenDance (gateway: OpenAI-compatible protocol, preset base URL). Context windows,
- // vision flags and supported protocols from the public catalog API (GET
- // https://tokendance.space/gateway/v1/models, no credential required; re-read 2026-09-10);
- // prices are the gateway's own CNY rates from each model's detail page, read 2026-08-25
- // and last confirmed by the seller 2026-09-10, or 2026-09-16 for the deepseek-v4-flash-0731,
- // deepseek-v4-pro-0813 and kimi-k3 rows (the detail pages need a signed-in session, so they
- // cannot be re-read anonymously). TokenDance publishes an input price and a cache-hit price
- // with no separate cache-write fee, so cache_write carries the input price.
+ // -- TokenDance (gateway: OpenAI-compatible protocol, preset base URL). Ids, context windows,
+ // vision flags, supported protocols AND prices re-read 2026-10-27 from the seller's own
+ // catalog API (GET https://tokendance.space/portal/api/models/all, no credential required;
+ // the /gateway/v1/models listing beside it carries the modalities but no rates). That payload
+ // states each model's current rate (`pricing.items`), the list price it is discounted FROM
+ // (`pricing.reference`), and, for a row on a weekly schedule, both tiers again under
+ // `pricing.time_pricing` — `options` holds the windows, `items` the peak rate, `base_items`
+ // the rate outside them, `base_reference` the list those come off. TokenDance publishes an
+ // input price and a cache-hit price with no separate cache-write fee, so cache_write carries
+ // the input price.
//
- // Discounts: every row here stores the official LIST price, the convention of the two Qwen
- // groups below, and a promoted row declares its rate in `discount` rather than having its
- // price rewritten — a promotion that lapses is then one field to delete, with the rate to
- // return to still on the row. effectivePricing() applies it; a new Project stores the list
- // price and the fraction as a promotion beside it, which the cost center applies, so it
- // charges what the gateway charges.
- // Nine rows are promoted: deepseek-v4-flash-0731 and deepseek-v4-pro-0813 at 10% off and
- // kimi-k3 at 40% (seller's quote 2026-09-16); glm-5.3, glm-5.3-flash and qwen3.8-max at 10%
- // and the three Doubao Seed rows (seed-2.1-pro, seed-2.1-turbo, seed-evolving) at 50% (rates
- // re-confirmed 2026-09-10). One more row, deepseek-v4.1-flash, carries no flat discount at
- // all and instead follows the vendor's own peak/off-peak schedule (DEEPSEEK_OFF_PEAK),
- // storing the peak price the way the direct DeepSeek rows do; so does the retired
- // deepseek-v4-flash-vision-exp row, which is no longer a preset. The rest carry neither, so
- // for them list price and billed rate coincide.
+ // Discounts: a row stores the price billed INSIDE its peak window — the list price where
+ // nothing is running — and declares what reduces it, a flat gateway promotion in `discount`
+ // or the vendor's own windows in `offPeakDiscount`. effectivePricing() applies whichever one
+ // is declared; a new Project stores the price and, for a flat promotion, the fraction beside
+ // it, which the cost center applies, so it charges what the gateway charges. The two fields
+ // are mutually exclusive. Where a gateway promotion rides ON TOP of DeepSeek's windows the
+ // row keeps the schedule: the windows are the part that changes twice a day, and a flat
+ // fraction in their place would over-state every off-peak record instead.
//
- // A running promotion usually also shows up without a credential: the catalog API opens
- // such a model's `description` with a bracketed 限时 ("limited-time") tag, so the same
- // anonymous request the context windows come from is a cheap first check on whether one is
- // still live. It is neither exhaustive nor authoritative on the rate — the rates above are
- // the ones the seller confirmed. --
- {
- // 10% off a CNY 1.5 input / 4.5 output / 0.15 cache hit list, so the gateway bills
- // 1.35 / 4.05 / 0.135 (seller's quote 2026-09-16).
+ // Seven rows carry a flat promotion (re-read 2026-10-27): glm-5.3, glm-5.3-flash,
+ // qwen3.8-max and deepseek-v4-pro at 10% off, the three Doubao Seed rows (seed-2.1-pro,
+ // seed-2.1-turbo, seed-evolving) at 50%. Five follow DeepSeek's schedule instead — the four
+ // DeepSeek ids this gateway resells (deepseek-v4-flash-0731, deepseek-v4-pro-0813,
+ // deepseek-v4.1-flash, deepseek-v4.1-flash-1017) and the retired
+ // deepseek-v4-flash-vision-exp. The rest carry neither, so for them the stored price is both
+ // the list price and the billed rate.
+ //
+ // Two of the scheduled rows approximate the tier the schema cannot hold: the gateway bills
+ // deepseek-v4-flash-0731 and deepseek-v4-pro-0813 at half their LIST price off-peak while
+ // their peak rate is the promoted one, so a row that stores one rate and halves it lands 20%
+ // under the gateway's own off-peak figure; their peak figures are exact. deepseek-v4.1-flash
+ // and deepseek-v4.1-flash-1017 promote both tiers, so halving is exact for them. The seller's
+ // catalog notes on deepseek-v4.1-flash that its DeepSeek endpoint has been upgraded to the
+ // 1017 release; the dated id is a separate row, priced identically today.
+ //
+ // A running promotion also shows up without a credential: the catalog API opens such a
+ // model's `description` with a bracketed 限时 ("limited-time") tag, so the same anonymous
+ // request the windows come from is a cheap check on whether one is still live. --
+ {
+ // The dated V4 Flash the gateway resells. Re-read 2026-10-27: the list is CNY 3 input /
+ // 9 output / 0.1 cache hit, the gateway bills 2.4 / 7.2 / 0.08 of that inside DeepSeek's
+ // peak windows (20% off) and 1.5 / 4.5 / 0.05 outside them (half the list). One rate fits
+ // on a row, so this one stores the promoted peak figure and halves it; see the group note
+ // on the 20% the off-peak half then misses.
modelId: "deepseek-v4-flash-0731",
displayName: "DeepSeek V4 Flash 0731",
provider: "tokendance",
contextWindow: 1048576,
- pricing: cny(0.15, 1.5, 4.5),
- discount: 0.1,
+ pricing: cny(0.08, 2.4, 7.2),
+ offPeakDiscount: DEEPSEEK_OFF_PEAK,
supportsVision: false,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
@@ -1740,32 +1757,71 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
retired: true,
},
{
- // 10% off a CNY 4.5 input / 13.5 output / 0.45 cache hit list, so the gateway bills
- // 4.05 / 12.15 / 0.405 (seller's quote 2026-09-16).
+ // The undated id of the same V4 Pro line, listed beside the dated one and read 2026-10-27:
+ // a 1,048,576-token window, text only, no peak/off-peak schedule, and a flat 10% off the
+ // CNY 9 input / 27 output / 0.3 cache hit list, so the gateway bills 8.1 / 24.3 / 0.27. Its
+ // only other protocol is anthropic:messages, so this group's openai-chat pin is a
+ // convention here rather than the only shape the id serves.
+ modelId: "deepseek-v4-pro",
+ displayName: "DeepSeek V4 Pro Preview",
+ provider: "tokendance",
+ contextWindow: 1048576,
+ pricing: cny(0.3, 9, 27),
+ discount: 0.1,
+ supportsVision: false,
+ clientType: "openai-chat",
+ baseUrl: TOKENDANCE_BASE_URL,
+ },
+ {
+ // Re-read 2026-10-27: list CNY 9 input / 27 output / 0.3 cache hit, billed 7.2 / 21.6 /
+ // 0.24 inside DeepSeek's peak windows (20% off) and 4.5 / 13.5 / 0.15 outside (half the
+ // list) — the same shape as deepseek-v4-flash-0731 above, and the same 20% the stored
+ // off-peak half misses.
modelId: "deepseek-v4-pro-0813",
displayName: "DeepSeek V4 Pro 0813",
provider: "tokendance",
contextWindow: 1000000,
- pricing: cny(0.45, 4.5, 13.5),
- discount: 0.1,
+ pricing: cny(0.24, 7.2, 21.6),
+ offPeakDiscount: DEEPSEEK_OFF_PEAK,
supportsVision: false,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
},
{
- // Listed 2026-09-10; the dotted id is the seller's spelling of the model DeepSeek serves
- // directly as `deepseek-flash`. 1M context and native multimodality from the catalog
- // API. It follows the vendor's own peak/off-peak schedule rather than a flat gateway
- // discount (seller's quote 2026-09-10): the row stores the peak tier CNY 0.04 / 2 / 8,
- // the direct row's figures, and declares DEEPSEEK_OFF_PEAK, which halves every bucket
- // outside Beijing weekday 09:00-12:00 and 14:00-18:00. Unlike the direct row this one
+ // The dotted id is the seller's spelling of the model DeepSeek serves directly as
+ // `deepseek-flash`. 1M context and native multimodality from the catalog API. It follows
+ // the vendor's own peak/off-peak schedule rather than a flat gateway discount, so the row
+ // stores the peak tier and declares DEEPSEEK_OFF_PEAK, which halves every bucket outside
+ // Beijing weekday 09:00-12:00 and 14:00-18:00. Re-read 2026-10-27, that peak tier is the
+ // gateway's BILLED one — CNY 2 input / 8 output / 0.04 cache hit list less the 20% it is
+ // promoting, so 1.6 / 6.4 / 0.032 — and the off-peak half (0.8 / 3.2 / 0.016) is exactly
+ // what the gateway bills outside the windows, the promotion applying to both tiers. The
+ // seller's own note on this model says its DeepSeek endpoint has been upgraded to the 1017
+ // release, which is the dated id below at the same rates. Unlike the direct row this one
// needs no DeepSeek-specific pin — it is reached through this group's generic openai-chat
// client, which forwards image_url parts.
modelId: "deepseek-v4.1-flash",
displayName: "DeepSeek V4.1 Flash",
provider: "tokendance",
contextWindow: 1000000,
- pricing: cny(0.04, 2, 8),
+ pricing: cny(0.032, 1.6, 6.4),
+ offPeakDiscount: DEEPSEEK_OFF_PEAK,
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: TOKENDANCE_BASE_URL,
+ },
+ {
+ // Listed 2026-10-27: DeepSeek-V4.1-Flash-1017, the release the undated row above now
+ // serves, sold under its own id at the same figures — CNY 2 input / 8 output / 0.04 cache
+ // hit list, 20% off inside DeepSeek's peak windows and half the list outside them (the
+ // row stores the promoted peak tier, as that one does), 1M context, image input. The
+ // seller's description says DeepSeek tuned it for its own harness and for two third-party
+ // agent platforms, shortening task runtime and output length.
+ modelId: "deepseek-v4.1-flash-1017",
+ displayName: "DeepSeek V4.1 Flash 1017",
+ provider: "tokendance",
+ contextWindow: 1000000,
+ pricing: cny(0.032, 1.6, 6.4),
offPeakDiscount: DEEPSEEK_OFF_PEAK,
supportsVision: true,
clientType: "openai-chat",
@@ -1825,6 +1881,21 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
},
+ {
+ // Listed 2026-10-27 beside the Flash above: GLM-5.3 FlashX, the same 1M window and the
+ // same native multimodality (text, image and video in) with no promotion running, at CNY 2
+ // input / 7 output / 0.57 cache hit. Its protocols are openai:chat-completions and
+ // anthropic:messages, so the openai-chat pin is this group's convention rather than the
+ // only shape it serves — unlike glm-5.3-flash above, where it is forced.
+ modelId: "glm-5.3-flashx",
+ displayName: "GLM-5.3 FlashX",
+ provider: "tokendance",
+ contextWindow: 1000000,
+ pricing: cny(0.57, 2, 7),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: TOKENDANCE_BASE_URL,
+ },
{
// The same upstream model as the OpenRouter `tencent/hy4-preview` row above, reached
// through a second seller: each row records what its own seller charges, so the two must
@@ -1846,14 +1917,29 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
baseUrl: TOKENDANCE_BASE_URL,
},
{
- // 40% off a CNY 20 input / 100 output / 1.6 cache hit list, so the gateway bills
- // 12 / 60 / 0.96 (seller's quote 2026-09-16).
+ // Re-read 2026-10-27: the 40% promotion this row carried through 2026-09-16 has lapsed and
+ // nothing replaced it, so the row stores the list price and declares no discount — CNY 20
+ // input / 100 output / 1.6 cache hit, over a 1,048,576-token window.
modelId: "kimi-k3",
displayName: "Kimi K3",
provider: "tokendance",
contextWindow: 1048576,
pricing: cny(1.6, 20, 100),
- discount: 0.4,
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: TOKENDANCE_BASE_URL,
+ },
+ {
+ // Listed 2026-10-27: Kimi K3.1 Pro, the first of Moonshot's K3.1 line and the largest
+ // model the seller carries — 1M context, text / image / video input, text out. Undiscounted
+ // at CNY 13 input / 68 output / 1.3 cache hit. Its protocols are openai:chat-completions,
+ // openai:responses and anthropic:messages, so the openai-chat pin is this group's
+ // convention, as on kimi-k3 above.
+ modelId: "kimi-k3.1-pro",
+ displayName: "Kimi K3.1 Pro",
+ provider: "tokendance",
+ contextWindow: 1000000,
+ pricing: cny(1.3, 13, 68),
supportsVision: true,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
@@ -1929,12 +2015,13 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
},
{
// A rolling id: the catalog API describes it as the newest Seed Coding/Agent model
- // under one stable id — the same model as seed-2.1-pro at the time of reading — and
- // the seller prices it the same.
+ // under one stable id — the same model as seed-2.1-pro at the time of reading. Its window
+ // was read as 256,000 on 2026-09-02 and is 1,000,000 on the 2026-10-27 re-read; the seller
+ // prices it as seed-2.1-pro does.
modelId: "seed-evolving",
displayName: "Seed-Evolving",
provider: "tokendance",
- contextWindow: 256000,
+ contextWindow: 1000000,
pricing: cny(1.2, 6, 30),
discount: 0.5,
supportsVision: true,
diff --git a/packages/core/test/model-catalog.test.ts b/packages/core/test/model-catalog.test.ts
index e6991462..176d886c 100644
--- a/packages/core/test/model-catalog.test.ts
+++ b/packages/core/test/model-catalog.test.ts
@@ -776,18 +776,22 @@ describe("model-catalog", () => {
expect(td.map((m) => [m.modelId, m.contextWindow, m.supportsVision])).toEqual([
["deepseek-v4-flash-0731", 1048576, false],
["deepseek-v4-flash-vision-exp", 1000000, true],
+ ["deepseek-v4-pro", 1048576, false],
["deepseek-v4-pro-0813", 1000000, false],
["deepseek-v4.1-flash", 1000000, true],
+ ["deepseek-v4.1-flash-1017", 1000000, true],
["dots-3-note-preview", 512000, true],
["glm-5.3", 1000000, false],
["glm-5.3-flash", 1000000, true],
+ ["glm-5.3-flashx", 1000000, true],
["hy4-preview", 1024000, false],
["kimi-k3", 1048576, true],
+ ["kimi-k3.1-pro", 1000000, true],
["qwen3.8-flash", 1000000, true],
["qwen3.8-max", 1000000, true],
["seed-2.1-pro", 256000, true],
["seed-2.1-turbo", 256000, true],
- ["seed-evolving", 256000, true],
+ ["seed-evolving", 1000000, true],
]);
for (const m of td) {
expect(m.clientType).toBe("openai-chat");
@@ -813,9 +817,7 @@ describe("model-catalog", () => {
const discounted: Array<[string, number, [number, number, number]]> = [
["glm-5.3-flash", 0.1, [0.72, 2.52, 0.207]],
["glm-5.3", 0.1, [7.2, 25.2, 1.8]],
- ["deepseek-v4-pro-0813", 0.1, [4.05, 12.15, 0.405]],
- ["deepseek-v4-flash-0731", 0.1, [1.35, 4.05, 0.135]],
- ["kimi-k3", 0.4, [12, 60, 0.96]],
+ ["deepseek-v4-pro", 0.1, [8.1, 24.3, 0.27]],
["qwen3.8-max", 0.1, [10.8, 32.4, 1.35]],
["seed-2.1-pro", 0.5, [3, 15, 0.6]],
["seed-2.1-turbo", 0.5, [1.5, 7.5, 0.3]],
@@ -829,10 +831,10 @@ describe("model-catalog", () => {
expect(output, `${modelId} output`).toBeCloseTo(cnyBilled[1], 4);
expect(cacheHit, `${modelId} cache hit`).toBeCloseTo(cnyBilled[2], 4);
}
- // Exactly those nine carry a flat discount; every other row bills its list price
- // unchanged. One of those others declares DeepSeek's peak/off-peak schedule instead, so
+ // Exactly those seven carry a flat discount; every other row bills its list price
+ // unchanged. Four of those others declare DeepSeek's peak/off-peak schedule instead, so
// the rows are compared at a PEAK instant — 2026-09-10 is a Thursday, and 10:00 Beijing is
- // inside the morning window — because effectivePricing halves it off-peak by design.
+ // inside the morning window — because effectivePricing halves them off-peak by design.
expect(
td
.filter((m) => m.discount !== undefined)
@@ -840,20 +842,56 @@ describe("model-catalog", () => {
.sort(),
).toEqual(discounted.map(([id]) => id).sort());
const peakInstant = new Date("2026-09-10T10:00:00+08:00");
- for (const m of td.filter((x) => x.discount === undefined)) {
+ for (const m of td.filter((x) => x.discount === undefined && x.offPeakDiscount === undefined)) {
expect(effectivePricing(m, peakInstant), m.modelId).toEqual(m.pricing);
}
// The rows that follow the vendor's schedule instead of a gateway promotion (one of them
- // retired), at the same peak tier the direct deepseek-flash row stores: CNY 0.04 / 2 / 8.
+ // retired), storing the peak tier the gateway BILLS — the list price where no promotion
+ // runs, and there the list less the promotion where one does. deepseek-v4.1-flash and
+ // deepseek-v4.1-flash-1017 promote both tiers, so CNY 0.04 / 2 / 8 less 20% is exact at
+ // both; the two older DeepSeek ids hold their promoted peak and halve it, which the group
+ // note records as 20% under the gateway's own off-peak figure.
const tdScheduled = td.filter((m) => m.offPeakDiscount !== undefined).map((m) => m.modelId);
- expect(tdScheduled).toEqual(["deepseek-v4-flash-vision-exp", "deepseek-v4.1-flash"]);
+ expect(tdScheduled).toEqual([
+ "deepseek-v4-flash-0731",
+ "deepseek-v4-flash-vision-exp",
+ "deepseek-v4-pro-0813",
+ "deepseek-v4.1-flash",
+ "deepseek-v4.1-flash-1017",
+ ]);
+ const peakStored: Record<string, [number, number, number]> = {
+ "deepseek-v4-flash-0731": [0.08, 2.4, 7.2],
+ "deepseek-v4-flash-vision-exp": [0.04, 2, 8],
+ "deepseek-v4-pro-0813": [0.24, 7.2, 21.6],
+ "deepseek-v4.1-flash": [0.032, 1.6, 6.4],
+ "deepseek-v4.1-flash-1017": [0.032, 1.6, 6.4],
+ };
for (const id of tdScheduled) {
const row = td.find((m) => m.modelId === id)!;
expect(row.offPeakDiscount, id).toBe(DEEPSEEK_OFF_PEAK);
expect(row.discount, id).toBeUndefined();
- expect([row.pricing!.cache_read, row.pricing!.cache_write, row.pricing!.output], id).toEqual([
- 0.005714, 0.285714, 1.142857,
- ]);
+ expect(
+ [row.pricing!.cache_read, row.pricing!.cache_write, row.pricing!.output].map((v) =>
+ Number((v * CNY_PER_USD).toFixed(4)),
+ ),
+ id,
+ ).toEqual(peakStored[id]);
+ }
+ // The rows with neither a promotion nor a schedule bill exactly the rates the seller
+ // publishes (re-read 2026-10-27), which is also what a reader of the row sees.
+ const plain: Array<[string, [number, number, number]]> = [
+ ["dots-3-note-preview", [0, 0, 0]],
+ ["glm-5.3-flashx", [2, 7, 0.57]],
+ ["hy4-preview", [6, 18, 0.3]],
+ ["kimi-k3", [20, 100, 1.6]],
+ ["kimi-k3.1-pro", [13, 68, 1.3]],
+ ["qwen3.8-flash", [0.8, 2.7, 0.1]],
+ ];
+ for (const [modelId, cnyListed] of plain) {
+ const billed = billedCny(modelId);
+ for (const [i, cny] of cnyListed.entries()) {
+ expect(billed[i], `${modelId} bucket ${i}`).toBeCloseTo(cny, 4);
+ }
}
// The one free row of the group: CNY 0 on every bucket, no discount decoration, a 512K
// window, and the seller's own words for the name, its "Free" tag included, as the
@@ -2010,7 +2048,7 @@ describe("off-peak schedules", () => {
it("the DeepSeek rows store the peak price and declare the schedule", () => {
// Every direct row, plus the resold rows whose sellers pass DeepSeek's own windows through:
- // two on Penguin Go, four on OpenCode Go, two on TokenDance, one on OpenRouter and one on
+ // two on Penguin Go, four on OpenCode Go, four on TokenDance, one on OpenRouter and one on
// Volcengine Ark. The retired rows keep the schedule too. A gateway row on the schedule
// carries no flat `discount` — the two are mutually exclusive, pinned by the last case here.
const rows = MODEL_CATALOG.filter((m) => m.offPeakDiscount === S);
@@ -2020,8 +2058,11 @@ describe("off-peak schedules", () => {
"deepseek/deepseek-v4-flash-vision-exp",
"deepseek/deepseek-v4-pro",
"openrouter/deepseek/deepseek-v4.1-flash",
+ "tokendance/deepseek-v4-flash-0731",
"tokendance/deepseek-v4-flash-vision-exp",
+ "tokendance/deepseek-v4-pro-0813",
"tokendance/deepseek-v4.1-flash",
+ "tokendance/deepseek-v4.1-flash-1017",
"penguin-go/deepseek-flash",
"penguin-go/deepseek-v4-pro",
"opencode-go/deepseek-v4.1-flash",
@@ -2031,8 +2072,11 @@ describe("off-peak schedules", () => {
"volcengine/deepseek-v4-1-flash-261017",
]);
for (const m of rows) {
- // Peak is exactly double the off-peak tier DeepSeek publishes. Compared at 1e-5: both
- // sides round to six decimals independently, so the last digit can differ by one.
+ // What a row stores is the peak tier it bills, and the schedule halves exactly that —
+ // compared at 1e-5, since both sides round to six decimals independently and the last
+ // digit can differ by one. On the two TokenDance rows that run a promotion under the
+ // windows the half is the gateway's promoted peak, not its own off-peak figure; the
+ // group note records that gap.
expect(effectivePricing(m, beijing("2026-08-31T22:00"))!.output * 2).toBeCloseTo(
m.pricing!.output,
5,
diff --git a/packages/docs/content/models.en.md b/packages/docs/content/models.en.md
index aaf23030..e1d1b7e6 100644
--- a/packages/docs/content/models.en.md
+++ b/packages/docs/content/models.en.md
@@ -517,13 +517,13 @@ The preset rows carry no price. ModelScope bills for api-inference and its model
The preset catalog includes, among others:
-- `deepseek-flash` / `deepseek-v4-pro`
+- `deepseek-flash` / `deepseek-v4-pro` / `deepseek-v4.1-flash-1017`
- `MiniMax-M3`
- `gemini-3.8-flash`
- `claude-opus-5` / `claude-opus-4-8` / `claude-sonnet-5`
- `gpt-6-astra` / `gpt-5.6` / `gpt-5.5`
-- `glm-5.3` / `glm-5.3-flash` / `glm-4.7-flash` (Z.AI's free tier)
-- `kimi-k3`
+- `glm-5.3` / `glm-5.3-flash` / `glm-5.3-flashx` / `glm-4.7-flash` (Z.AI's free tier)
+- `kimi-k3` / `kimi-k3.1-pro`
- `qwen3.8-max` / `qwen3.8-flash`
- `seed-2.1-pro` / `seed-2.1-turbo` / `seed-evolving`
- `dots-3-note-preview` (free on TokenDance, 512K context)
@@ -545,14 +545,16 @@ The list is not exhaustive.
- **Rows with no price.** The pricing block can be absent altogether, which records "nobody has looked this vendor's price up" rather than "free": such a row shows no price badge on the **Models** page, and the cost center reports its usage as uncosted. ModelScope's preset rows are the catalog's only ones — ModelScope bills for api-inference, but its model pages are client-rendered and carry no read-able rate. Three zeros would be worse than absent: they would read as the free tier and badge a billed gateway "Free".
- **Base tier only.** Where a vendor's prices step up with input size, the catalog records the base tier. MiniMax M3 records MiniMax's standard pay-as-you-go tier at 512K input tokens or below; above that, every rate doubles, and the priority tier is 1.5x, so long-context and priority usage is underestimated. OpenAI (above 272K) and Gemini 3.1 Pro (above 200K) follow the same convention.
- **DeepSeek off-peak.** The direct DeepSeek rows record the official peak prices and declare DeepSeek's off-peak schedule: outside Beijing time 9:00–12:00 and 14:00–18:00 on weekdays, every bucket is halved. The **Models** page shows a `50% off` tag during those hours, and the cost center bills at that rate.
- - Eight resold rows follow the same schedule because their sellers pass DeepSeek's windows through: TokenDance's `deepseek-v4.1-flash`, OpenRouter's `deepseek/deepseek-v4.1-flash`, Penguin Go's `deepseek-flash` and `deepseek-v4-pro`, and OpenCode Go's `deepseek-v4.1-flash`, `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` and `deepseek-v4-pro`.
+ - Eleven resold rows follow the same schedule because their sellers pass DeepSeek's windows through: TokenDance's `deepseek-v4-flash-0731`, `deepseek-v4-pro-0813`, `deepseek-v4.1-flash` and `deepseek-v4.1-flash-1017`; OpenRouter's `deepseek/deepseek-v4.1-flash`; Penguin Go's `deepseek-flash` and `deepseek-v4-pro`; and OpenCode Go's `deepseek-v4.1-flash`, `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` and `deepseek-v4-pro`.
+ - Two of those rows, TokenDance's `deepseek-v4-flash-0731` and `deepseek-v4-pro-0813`, can only be approximated: their peak rate is the promoted one (20% off the list) while the gateway bills half the **list** outside the windows (50% off, no promotion on top), and a row holds one rate — so their off-peak usage is estimated 20% below what the seller charges. `deepseek-v4.1-flash` and `deepseek-v4.1-flash-1017` run the same promotion on both tiers, so halving them lands exactly. Peak is exact on all of them.
- Qwen bills the DeepSeek models it resells on a schedule of its own, half price from 22:00 to 8:00 Beijing time every day. `deepseek-v4.1-flash` in both Qwen groups, and the Token Plan's `deepseek-v4-pro-0813`, declare that one instead, and the tag's tooltip names the windows of whichever schedule the row follows.
- - The stored price is always the peak price, so what is on disk does not depend on the hour a Project was created or synced.
-- **Flat promotions.** Nine TokenDance models are discounted today:
- - `kimi-k3` at 40% off
- - `deepseek-v4-flash-0731`, `deepseek-v4-pro-0813`, `glm-5.3`, `glm-5.3-flash` and `qwen3.8-max` at 10%
+ - The stored price is always the rate the peak window actually bills, so what is on disk does not depend on the hour a Project was created or synced.
+- **Flat promotions.** Seven TokenDance models are discounted today:
+ - `glm-5.3`, `glm-5.3-flash`, `qwen3.8-max` and `deepseek-v4-pro` at 10%
- the three Doubao Seed rows (`seed-2.1-pro`, `seed-2.1-turbo`, `seed-evolving`) at 50%
+ Promotions do end: `kimi-k3`'s 40% and the 10% on `deepseek-v4-flash-0731` and `deepseek-v4-pro-0813` had all stopped by the 2026-10-27 check, so those rows dropped the field and go on recording the seller's list price.
+
Gemini 3.8 Flash, 3.7 Flash and 3.6 Flash are also 50% off, both in the google group and on OpenRouter (`google/gemini-3.8-flash`, `google/gemini-3.7-flash`, `google/gemini-3.6-flash`), because Google halves them through 2026-12-31. A Project is preset with the **list** price: the server keeps the promotion beside it, in its own database rather than in `.project_config.toml`, and takes it off when usage is priced, so the cost center charges what the seller charges. The model card shows the rate being billed right now as a tag, and the model dialog says **These are list prices. A running promotion takes N% off them; changing a price cancels it**.
- **Your own prices.** Editing a row's price cancels its promotion and takes the discount tag off the card: the figure is then yours, not the seller's.
diff --git a/packages/docs/content/models.zh.md b/packages/docs/content/models.zh.md
index 23c40c11..5b7bd2ec 100644
--- a/packages/docs/content/models.zh.md
+++ b/packages/docs/content/models.zh.md
@@ -516,13 +516,13 @@ OpenAI 兼容网关分组(openrouter / fireworks / siliconflow / tokendance /
预置模型目录包含以下模型:
-- `deepseek-flash` / `deepseek-v4-pro`
+- `deepseek-flash` / `deepseek-v4-pro` / `deepseek-v4.1-flash-1017`
- `MiniMax-M3`
- `gemini-3.8-flash`
- `claude-opus-5` / `claude-opus-4-8` / `claude-sonnet-5`
- `gpt-6-astra` / `gpt-5.6` / `gpt-5.5`
-- `glm-5.3` / `glm-5.3-flash` / `glm-4.7-flash`(智谱官方免费档)
-- `kimi-k3`
+- `glm-5.3` / `glm-5.3-flash` / `glm-5.3-flashx` / `glm-4.7-flash`(智谱官方免费档)
+- `kimi-k3` / `kimi-k3.1-pro`
- `qwen3.8-max` / `qwen3.8-flash`
- `seed-2.1-pro` / `seed-2.1-turbo` / `seed-evolving`
- `dots-3-note-preview`(TokenDance 上免费,512K 上下文)
@@ -544,14 +544,16 @@ OpenAI 兼容网关分组(openrouter / fireworks / siliconflow / tokendance /
- **没有价格的条目。** 价格字段可以整体缺席,含义是「没人查过这家的价格」,而不是免费:这类条目在**模型库**页面不显示价格徽标,成本中心把它的用量报为未计价。目录里目前只有 ModelScope 的预置条目是这样——魔搭的 api-inference 是计费的,但它的模型页面是客户端渲染的,读不到费率。写成三个 0 反而更糟:那会被当作免费档,给一个计费网关打上「Free」徽标。
- **仅记录基础档。** 供应商的价格随输入规模上调时,目录只记录基础档。MiniMax M3 记录的是 MiniMax 标准按量付费档在 512K 输入 Token 及以下的价格;超过后每项费率翻倍,priority 档为 1.5 倍,所以长上下文和 priority 用量的成本估算会偏低。OpenAI(272K 以上)和 Gemini 3.1 Pro(200K 以上)遵循同样的约定。
- **DeepSeek 空闲时段。** 直连 DeepSeek 的条目记录官方高峰价格,并声明 DeepSeek 的空闲时段规则:工作日北京时间 9:00–12:00 和 14:00–18:00 以外的时段,三项价格全部减半。**模型库**页面在这些时段显示 `省 50%` 标签,成本中心也按这个费率计费。
- - 八条转售条目遵循同样的时段,因为各自的卖家沿用了 DeepSeek 的时间窗口:TokenDance 的 `deepseek-v4.1-flash`、OpenRouter 的 `deepseek/deepseek-v4.1-flash`、Penguin Go 的 `deepseek-flash` 和 `deepseek-v4-pro`,以及 OpenCode Go 的 `deepseek-v4.1-flash`、`deepseek-v4-flash`、`deepseek-v4-flash-vision-exp` 和 `deepseek-v4-pro`。
+ - 十一条转售条目遵循同样的时段,因为各自的卖家沿用了 DeepSeek 的时间窗口:TokenDance 的 `deepseek-v4-flash-0731`、`deepseek-v4-pro-0813`、`deepseek-v4.1-flash` 和 `deepseek-v4.1-flash-1017`,OpenRouter 的 `deepseek/deepseek-v4.1-flash`,Penguin Go 的 `deepseek-flash` 和 `deepseek-v4-pro`,以及 OpenCode Go 的 `deepseek-v4.1-flash`、`deepseek-v4-flash`、`deepseek-v4-flash-vision-exp` 和 `deepseek-v4-pro`。
+ - 其中 TokenDance 的 `deepseek-v4-flash-0731` 和 `deepseek-v4-pro-0813` 有一处只能近似:这两条的高峰费率是促销之后的价(牌价省 20%),而空闲时段网关按**牌价**的一半收(省 50%,不再打促销),一条记录只放得下一个费率,所以它们空闲时段的成本估计比卖家实际收的低 20%。`deepseek-v4.1-flash` 与 `deepseek-v4.1-flash-1017` 两个档位都打同一个促销,减半正好吻合。高峰时段一律精确。
- Qwen 转售的 DeepSeek 模型按它自己的时段计费:北京时间每天 22:00 至次日 8:00 半价。两个 Qwen 分组的 `deepseek-v4.1-flash` 和 Token Plan 的 `deepseek-v4-pro-0813` 声明的是这一套,折扣标签的悬停说明写的也是该条目所遵循时段的窗口。
- - 存储的价格始终是高峰价格,所以磁盘上的数值与 Project 创建或同步的时间无关。
-- **固定折扣。** 目前有九个 TokenDance 模型在打折:
- - `kimi-k3` 打 6 折
- - `deepseek-v4-flash-0731`、`deepseek-v4-pro-0813`、`glm-5.3`、`glm-5.3-flash` 和 `qwen3.8-max` 打 9 折
+ - 存储的价格始终是高峰时段实际计费的价,所以磁盘上的数值与 Project 创建或同步的时间无关。
+- **固定折扣。** 目前有七个 TokenDance 模型在打折:
+ - `glm-5.3`、`glm-5.3-flash`、`qwen3.8-max` 和 `deepseek-v4-pro` 打 9 折
- 三条 Doubao Seed 条目(`seed-2.1-pro`、`seed-2.1-turbo`、`seed-evolving`)打 5 折
+ 折扣会结束:`kimi-k3` 的 6 折和 `deepseek-v4-flash-0731`、`deepseek-v4-pro-0813` 的 9 折在 2026-10-27 核查时都已停止,这三条的促销字段随之删掉,价格照旧记录卖家的牌价。
+
Gemini 3.8 Flash、3.7 Flash 和 3.6 Flash 也打 5 折,google 分组和 OpenRouter 上(`google/gemini-3.8-flash`、`google/gemini-3.7-flash`、`google/gemini-3.6-flash`)都是如此,因为 Google 在 2026-12-31 之前对它们一律减半。Project 预置的是**牌价**:折扣率由服务端另行保存,存在它自己的数据库里,而不写入 `.project_config.toml`,计算成本时再从牌价中扣除,因此成本中心按卖家实际收取的价格计费。模型卡片用标签标出当前实际计费的费率,模型弹窗则写明**此处为牌价,当前促销在此基础上省 N%;修改价格会取消促销**。
- **你自己的价格。** 修改条目的价格会取消它的促销,卡片上的折扣标签也随之消失:此后这个数字由你自己定,不再代表卖家。