Skip to content

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

feat(model-catalog): refresh DeepSeek, TokenDance, OpenRouter, Fireworks, SiliconFlow and both Qwen groups (#749)

Yaowei Zheng11c8cd05cf7e
diff --git a/changelog/unreleased/2026-09-16-backward-compatibility.md b/changelog/unreleased/2026-09-16-backward-compatibility.md
new file mode 100644
index 00000000..2f7b3d36
--- /dev/null
+++ b/changelog/unreleased/2026-09-16-backward-compatibility.md
@@ -0,0 +1,28 @@
+# Backward compatibility
+
+- **Date:** 2026-09-16
+- **Type:** process
+- **Scope:** `model-catalog`
+- **PR:** [#749](https://github.com/Prism-Shadow/penguin-harness/pull/749)
+
+[中文版](2026-09-16-backward-compatibility.zh.md)
+
+The [model catalog refresh](2026-09-16-model-catalog-refresh.md) stopped offering three rows that existing Projects still carry: `deepseek/deepseek-v4-flash`, the default model of new Projects from 0.2.0 to 0.2.8; `deepseek/deepseek-v4-flash-vision-exp`, the default in 0.2.9; and `tokendance/deepseek-v4-flash-vision-exp`. **Sync presets** never deletes a row, so those Projects keep them.
+
+## What deleting them would have broken
+
+Cost is priced when it is read, and a row's off-peak tier comes from its catalog entry. Deleting the three entries would have priced every off-peak record on them, past records included, at the peak rate (up to double what DeepSeek bills), dropped their off-peak badge, and shown the raw model id where their name was.
+
+## What was done
+
+The three rows stay in the catalog marked `retired`. A retired row is not a preset: a new Project never gets it, and **Sync presets** never adds it. A Project that already carries one keeps it maintained: **Sync presets** still updates the row like any preset, and the preset-update badge counts that update, so a price an older release stored is put back to the catalog's. Lookups still find the row, so the Project keeps its name and vision flag, and usage on it is priced on the off-peak schedule whenever the row stores the catalog price, the only price that tier applies to. Nothing on disk changed.
+
+## What users need to do
+
+Run **Sync presets** when the preset-update badge offers it. On a Project whose retired row stores an out-of-date price, that is what puts the row back on the catalog price and its off-peak pricing. Beyond that, a Project can keep the old ids for as long as DeepSeek accepts them, or switch to `deepseek-flash` (DeepSeek V4.1 Flash) and delete the old rows.
+
+## When it can be removed
+
+A retired row comes out only after its seller stops accepting the id, and only with a release note saying that usage recorded on it is priced without its off-peak tier from then on. The catalog refresh that finds the id rejected makes that call.
+
+The upkeep **Sync presets** gives retired rows (core's `catalogModelEntries` and the retired check in the web's `catalog-sync.ts`) goes with them: it can be removed at the catalog refresh that deletes these three rows, unless another row has been retired by then.
diff --git a/changelog/unreleased/2026-09-16-backward-compatibility.zh.md b/changelog/unreleased/2026-09-16-backward-compatibility.zh.md
new file mode 100644
index 00000000..f251f3ea
--- /dev/null
+++ b/changelog/unreleased/2026-09-16-backward-compatibility.zh.md
@@ -0,0 +1,28 @@
+# 向后兼容
+
+- **Date:** 2026-09-16
+- **Type:** process
+- **Scope:** `model-catalog`
+- **PR:** [#749](https://github.com/Prism-Shadow/penguin-harness/pull/749)
+
+[English](2026-09-16-backward-compatibility.md)
+
+[模型目录刷新](2026-09-16-model-catalog-refresh.zh.md)不再提供三条既有 Project 仍带着的条目:`deepseek/deepseek-v4-flash`(0.2.0 到 0.2.8 新建 Project 的默认模型)、`deepseek/deepseek-v4-flash-vision-exp`(0.2.9 的默认模型)与 `tokendance/deepseek-v4-flash-vision-exp`。**同步预置**从不删除条目,所以这些 Project 会一直留着它们。
+
+## 直接删除会坏在哪里
+
+成本在读取时计算,条目的空闲时段档位来自它在目录里的条目。直接删掉这三条,会让它们上面每一条空闲时段的用量记录(包括过去的记录)都按高峰价计价(最多是 DeepSeek 实收的两倍),空闲时段徽标消失,名称处显示成原始模型 id。
+
+## 做了什么
+
+三条条目留在目录中并标记为 `retired`。退役条目不是预置条目:新建 Project 不会带上,**同步预置**也从不补入。已经带着它的 Project 则继续得到维护:**同步预置**仍像对待预置条目一样更新这一行,预置更新角标也会计入这次更新,旧版本写入的过时价格因此会改回目录价。按键查询仍能查到这一行,所以这些 Project 照旧显示其名称与视觉标注;行上存的是目录价时,其用量按空闲时段计价——空闲时段档位只对目录价生效。磁盘上的数据没有任何改动。
+
+## 用户需要做什么
+
+预置更新角标出现时运行**同步预置**。退役条目存着过时价格的 Project,正是靠这一步回到目录价、重新按空闲时段计价。除此之外,只要 DeepSeek 仍接受这些旧 id,Project 就可以继续使用;也可以换成 `deepseek-flash`(DeepSeek V4.1 Flash)并删掉旧条目。
+
+## 何时可以移除
+
+退役条目只有在卖家不再接受该 id 之后才能删除,并且必须在发布说明里写明:从此以后,记在它上面的用量不再按空闲时段档位计价。由发现该 id 已被拒绝的那次目录刷新决定。
+
+**同步预置**对退役条目的维护(core 的 `catalogModelEntries` 与 Web 端 `catalog-sync.ts` 中的退役判断)随这些条目一并移除:删除这三条条目的那次目录刷新即可移除,除非届时又有其他条目退役。
diff --git a/changelog/unreleased/2026-09-16-model-catalog-refresh.md b/changelog/unreleased/2026-09-16-model-catalog-refresh.md
new file mode 100644
index 00000000..1260cfc1
--- /dev/null
+++ b/changelog/unreleased/2026-09-16-model-catalog-refresh.md
@@ -0,0 +1,55 @@
+# Model catalog refresh: DeepSeek's two listed models, Qwen's own off-peak schedule, new gateway rows
+
+- **Date:** 2026-09-16
+- **Type:** feature
+- **Scope:** `model-catalog`, `web`, `docs`, `skills`
+- **PR:** [#749](https://github.com/Prism-Shadow/penguin-harness/pull/749)
+
+[中文版](2026-09-16-model-catalog-refresh.zh.md)
+
+The built-in model catalog was re-read against its providers on 2026-09-16. The direct DeepSeek group was cut down to the two models DeepSeek's pricing page lists, three TokenDance promotions were re-rated, OpenRouter, Fireworks AI, SiliconFlow and both Qwen groups gained rows, and the DeepSeek models Qwen sells were put on Qwen's own peak/off-peak schedule, the catalog's second one. Prices below are per million tokens, as cache hit / input / output.
+
+## DeepSeek
+
+- Retired `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp` as presets. DeepSeek still accepts both names and serves them from V4.1 Flash at the Flash price, but its pricing page lists only `deepseek-flash` and `deepseek-v4-pro`. Both stay in the catalog as retired rows (see [backward compatibility](2026-09-16-backward-compatibility.md)).
+- `deepseek-v4-pro` is now named **DeepSeek V4 Pro 0813**, the release DeepSeek names behind the id. Its peak price stays CNY 0.30 / 9 / 27 on DeepSeek's off-peak schedule, and DeepSeek keeps V4 Pro available after 2026-09-14 with its billing unchanged.
+- `deepseek-flash` and the default model were left as they were.
+
+## TokenDance
+
+- Retired `deepseek-v4-flash-vision-exp` as a preset; it stays in the catalog as a retired row, like the DeepSeek pair.
+- Re-rated three promotions from the seller's 2026-09-16 quote. `deepseek-v4-flash-0731` lists at CNY 0.15 / 1.5 / 4.5 with 10% off, billed 0.135 / 1.35 / 4.05. `deepseek-v4-pro-0813` lists at CNY 0.45 / 4.5 / 13.5 with 10% off, billed 0.405 / 4.05 / 12.15. `kimi-k3` lists at CNY 1.6 / 20 / 100 with 40% off, billed 0.96 / 12 / 60.
+
+## OpenRouter
+
+- Added `qwen/qwen3.8-27b` (**Qwen 3.8 27B**) at USD 0.15 / 0.214 / 2.55, with a 1,000,000-token context window and image input.
+
+## Fireworks AI
+
+- Added `accounts/fireworks/models/deepseek-v4p1-flash` (**DeepSeek V4.1 Flash**, image input) at USD 0.007 / 0.22 / 0.66 and `accounts/fireworks/models/deepseek-v4-pro-0813` (**DeepSeek V4 Pro 0813**) at USD 0.044 / 1.32 / 3.96, both with a 1,048,576-token context window.
+- Added `accounts/fireworks/models/glm-5p3` (**GLM-5.3**) at USD 0.26 / 1.4 / 4.4 and `accounts/fireworks/models/glm-5p3-flash` (**GLM-5.3 Flash**, image input) at USD 0.03 / 0.15 / 0.5, both with a 1,048,576-token context window.
+- Added `accounts/fireworks/models/qwen3p8-max` (**Qwen 3.8 Max**, image input) at USD 0.25 / 2 / 6 with a 1,000,000-token context window.
+
+## SiliconFlow
+
+- Added `tencent/Hy4-preview` (**Hy4 preview**) at CNY 0.3 / 6 / 18 with a 1,024,000-token context window, and `zai-org/GLM-5.3` (**GLM-5.3**) at CNY 2 / 8 / 28 with a 1,000,000-token context window. Both are text only.
+
+## Qwen Pay-As-You-Go
+
+- Added `deepseek-v4.1-flash` (**DeepSeek V4.1 Flash**, image input) on Qwen's off-peak schedule, `kimi/kimi-k2.8-preview` (**Kimi K2.8 Preview**, image input) at CNY 1.7 / 6.5 / 27 with a 1,048,576-token context window, and `ZHIPU/GLM-5.3-Flash` (**GLM-5.3 Flash**, image input) at CNY 0.23 / 0.8 / 2.8.
+- Removed `deepseek-v4-flash-0731` and `ZHIPU/GLM-5.2`.
+- Re-priced `qwen3.8-flash` to Qwen's new list price, CNY 0.1 / 0.8 / 2.7 (it was 0.1 / 1 / 3).
+
+## Qwen Token Plan
+
+- Added `deepseek-v4.1-flash` (**DeepSeek V4.1 Flash**, image input) and `deepseek-v4-pro-0813` (**DeepSeek V4 Pro 0813**, text only), both on Qwen's off-peak schedule; `glm-5.3` (**GLM-5.3**) at CNY 2 / 8 / 28 with a 1,048,576-token context window; and `qwen3.8-flash` (**Qwen 3.8 Flash**, image input) at CNY 0.1 / 0.8 / 2.7.
+- Removed `deepseek-v4-flash-0731`, `deepseek-v4-pro` and `glm-5.2`.
+
+## Qwen's off-peak schedule
+
+- The catalog gained a second time-based schedule, `QWEN_OFF_PEAK`: half price from 22:00 to 08:00 Beijing time on every day of the week, read from the peak and off-peak price tabs of each Qwen model page. The three rows on it store their peak price: `deepseek-v4.1-flash` at CNY 0.2 / 2 / 8 (off-peak 0.1 / 1 / 4) in both Qwen groups, and `deepseek-v4-pro-0813` at CNY 0.9 / 9 / 27 (off-peak 0.45 / 4.5 / 13.5) in the Token Plan group. The cost center prices their usage by each record's own timestamp against these windows, as it does for DeepSeek's schedule.
+- The tooltip on the models page's off-peak badge named DeepSeek's weekday windows for every scheduled row. Both dictionaries now spell the windows out of the row's own schedule, so a Qwen row reads 08:00–22:00 Beijing time, every day, while a DeepSeek row keeps its weekday text.
+
+## Existing Projects
+
+Presets are copied into a Project when it is created, and the models page's **Sync presets** brings in the added rows and the new prices, but never deletes: a row this refresh removed stays in an existing Project until the user deletes it. The three retired DeepSeek rows keep their names there, and **Sync presets** keeps their prices current without ever adding them to a Project that lacks them, so they are priced on their off-peak schedule whenever they store the catalog price (see [backward compatibility](2026-09-16-backward-compatibility.md)); the removed Qwen rows keep their stored prices and show their raw model id. The new **DeepSeek V4 Pro 0813** name reaches every Project without a sync unless the Project stores a name of its own for `deepseek-v4-pro`, which a sync never overwrites.
diff --git a/changelog/unreleased/2026-09-16-model-catalog-refresh.zh.md b/changelog/unreleased/2026-09-16-model-catalog-refresh.zh.md
new file mode 100644
index 00000000..85fee591
--- /dev/null
+++ b/changelog/unreleased/2026-09-16-model-catalog-refresh.zh.md
@@ -0,0 +1,55 @@
+# 模型目录刷新:DeepSeek 只留官方列出的两个模型、Qwen 自己的空闲时段规则、新增网关条目
+
+- **Date:** 2026-09-16
+- **Type:** feature
+- **Scope:** `model-catalog`, `web`, `docs`, `skills`
+- **PR:** [#749](https://github.com/Prism-Shadow/penguin-harness/pull/749)
+
+[English](2026-09-16-model-catalog-refresh.md)
+
+内置模型目录于 2026-09-16 对照各供应商重新读取。直连 DeepSeek 分组精简为 DeepSeek 价格页列出的两个模型,TokenDance 的三项促销改了折扣率,OpenRouter、Fireworks AI、SiliconFlow 与两个 Qwen 分组新增条目,Qwen 转售的 DeepSeek 模型改按 Qwen 自己的高峰 / 空闲时段计价——这是目录里的第二套时段规则。下文价格均为每百万 Token,顺序为缓存命中 / 输入 / 输出。
+
+## DeepSeek 分组
+
+- `deepseek-v4-flash` 与 `deepseek-v4-flash-vision-exp` 不再作为预置条目。DeepSeek 仍接受这两个名称、由 V4.1 Flash 承接并按 Flash 价计费,但其价格页只列出 `deepseek-flash` 与 `deepseek-v4-pro`。两者作为退役条目留在目录中(见[向后兼容](2026-09-16-backward-compatibility.zh.md))。
+- `deepseek-v4-pro` 的显示名改为 **DeepSeek V4 Pro 0813**,即 DeepSeek 为该 id 标注的版本。高峰价仍为 CNY 0.30 / 9 / 27,沿用 DeepSeek 的空闲时段规则;DeepSeek 表示 V4 Pro 在 2026-09-14 之后继续提供,计费不变。
+- `deepseek-flash` 与默认模型保持原样。
+
+## TokenDance 分组
+
+- `deepseek-v4-flash-vision-exp` 不再作为预置条目,与 DeepSeek 那两条一样作为退役条目留在目录中。
+- 按卖家 2026-09-16 的报价调整三项促销。`deepseek-v4-flash-0731` 牌价 CNY 0.15 / 1.5 / 4.5、九折,实收 0.135 / 1.35 / 4.05。`deepseek-v4-pro-0813` 牌价 CNY 0.45 / 4.5 / 13.5、九折,实收 0.405 / 4.05 / 12.15。`kimi-k3` 牌价 CNY 1.6 / 20 / 100、六折,实收 0.96 / 12 / 60。
+
+## OpenRouter 分组
+
+- 新增 `qwen/qwen3.8-27b`(**Qwen 3.8 27B**),USD 0.15 / 0.214 / 2.55,上下文窗口 1,000,000 Token,支持图像输入。
+
+## Fireworks AI 分组
+
+- 新增 `accounts/fireworks/models/deepseek-v4p1-flash`(**DeepSeek V4.1 Flash**,支持图像输入),USD 0.007 / 0.22 / 0.66;以及 `accounts/fireworks/models/deepseek-v4-pro-0813`(**DeepSeek V4 Pro 0813**),USD 0.044 / 1.32 / 3.96。两者上下文窗口均为 1,048,576 Token。
+- 新增 `accounts/fireworks/models/glm-5p3`(**GLM-5.3**),USD 0.26 / 1.4 / 4.4;以及 `accounts/fireworks/models/glm-5p3-flash`(**GLM-5.3 Flash**,支持图像输入),USD 0.03 / 0.15 / 0.5。两者上下文窗口均为 1,048,576 Token。
+- 新增 `accounts/fireworks/models/qwen3p8-max`(**Qwen 3.8 Max**,支持图像输入),USD 0.25 / 2 / 6,上下文窗口 1,000,000 Token。
+
+## SiliconFlow 分组
+
+- 新增 `tencent/Hy4-preview`(**Hy4 preview**),CNY 0.3 / 6 / 18,上下文窗口 1,024,000 Token;以及 `zai-org/GLM-5.3`(**GLM-5.3**),CNY 2 / 8 / 28,上下文窗口 1,000,000 Token。两者均为纯文本。
+
+## Qwen 按量付费分组
+
+- 新增 `deepseek-v4.1-flash`(**DeepSeek V4.1 Flash**,支持图像输入),按 Qwen 的空闲时段规则计价;`kimi/kimi-k2.8-preview`(**Kimi K2.8 Preview**,支持图像输入),CNY 1.7 / 6.5 / 27,上下文窗口 1,048,576 Token;以及 `ZHIPU/GLM-5.3-Flash`(**GLM-5.3 Flash**,支持图像输入),CNY 0.23 / 0.8 / 2.8。
+- 移除 `deepseek-v4-flash-0731` 与 `ZHIPU/GLM-5.2`。
+- `qwen3.8-flash` 改为 Qwen 的新牌价 CNY 0.1 / 0.8 / 2.7(原为 0.1 / 1 / 3)。
+
+## Qwen Token Plan 分组
+
+- 新增 `deepseek-v4.1-flash`(**DeepSeek V4.1 Flash**,支持图像输入)与 `deepseek-v4-pro-0813`(**DeepSeek V4 Pro 0813**,纯文本),两者都按 Qwen 的空闲时段规则计价;`glm-5.3`(**GLM-5.3**),CNY 2 / 8 / 28,上下文窗口 1,048,576 Token;以及 `qwen3.8-flash`(**Qwen 3.8 Flash**,支持图像输入),CNY 0.1 / 0.8 / 2.7。
+- 移除 `deepseek-v4-flash-0731`、`deepseek-v4-pro` 与 `glm-5.2`。
+
+## Qwen 的空闲时段规则
+
+- 目录新增第二套分时段规则 `QWEN_OFF_PEAK`:每周七天,北京时间 22:00 至次日 08:00 半价,取自 Qwen 各模型页的高峰价与空闲价两个标签页。采用该规则的三条条目存高峰价:两个 Qwen 分组的 `deepseek-v4.1-flash` 为 CNY 0.2 / 2 / 8(空闲时 0.1 / 1 / 4),Token Plan 分组的 `deepseek-v4-pro-0813` 为 CNY 0.9 / 9 / 27(空闲时 0.45 / 4.5 / 13.5)。成本中心按每条用量记录自己的时间戳对照这些窗口计价,与 DeepSeek 的时段规则相同。
+- 模型页空闲时段折扣徽标的悬停说明,原先对所有分时段条目都写 DeepSeek 的工作日窗口。现在两套词典都按该条目自己的时段规则拼出窗口:Qwen 条目显示北京时间每天 8:00–22:00,DeepSeek 条目保留原来的工作日说明。
+
+## 既有 Project
+
+预置条目在创建 Project 时复制进去;模型页的**同步预置**会加入新增条目并更新价格,但从不删除:本次移除的条目会留在既有 Project 中,直到用户自己删掉。三条退役的 DeepSeek 条目在这些 Project 中照旧显示名称,**同步预置**会继续更新它们的价格、但从不把它们补进没有它们的 Project,因此行上存的是目录价时按空闲时段计价(见[向后兼容](2026-09-16-backward-compatibility.zh.md));被移除的 Qwen 条目保留其存储价格,显示原始模型 id。新显示名 **DeepSeek V4 Pro 0813** 无需同步即可出现在各 Project 中,除非该 Project 为 `deepseek-v4-pro` 存有自己的名称——同步从不覆盖这类名称。
diff --git a/packages/cli/test/config-model.test.ts b/packages/cli/test/config-model.test.ts
index a05079a2..5d21d175 100644
--- a/packages/cli/test/config-model.test.ts
+++ b/packages/cli/test/config-model.test.ts
@@ -467,7 +467,7 @@ describe("penguin config model add/list (--root plus provider / model_id stored
const set = await runModel([
"default",
"--model-id",
- "deepseek-v4-flash",
+ "deepseek-v4-pro",
"--provider",
"deepseek",
"--root",
@@ -475,14 +475,14 @@ describe("penguin config model add/list (--root plus provider / model_id stored
]);
expect(set.code).toBe(0);
expect(set.out).toContain(
- "Default model set to (provider=deepseek, model_id=deepseek-v4-flash).",
+ "Default model set to (provider=deepseek, model_id=deepseek-v4-pro).",
);
const parsed = parseToml(
await fs.readFile(projectConfigPath(tmpRoot, DEFAULT_PROJECT_ID), "utf8"),
) as unknown as { default_model: TomlModelRef };
expect(parsed.default_model).toEqual({
provider: "deepseek",
- model_id: "deepseek-v4-flash",
+ model_id: "deepseek-v4-pro",
});
});
});
diff --git a/packages/core/src/state/model-catalog.ts b/packages/core/src/state/model-catalog.ts
index 1e1726e8..00ba0a66 100644
--- a/packages/core/src/state/model-catalog.ts
+++ b/packages/core/src/state/model-catalog.ts
@@ -8,18 +8,17 @@
* qwen3.8-flash row: 2026-08-27 and its running promotions plus the hy4-preview rows
* (TokenDance + OpenRouter): 2026-08-28; the GLM-5.3 Flash rows (direct + OpenRouter) and
* the direct qwen3.8-flash: 2026-08-26; the TokenDance Doubao Seed rows (seed-2.1-pro,
- * seed-2.1-turbo, seed-evolving): 2026-09-02; the vLLM group: 2026-09-03; the direct DeepSeek
- * V4 Flash rows (flash and flash-vision-exp): 2026-09-08, for the official adjustment
- * effective 2026-09-10; the GPT-6 Astra rows (direct + OpenRouter): 2026-09-09; the
- * pre-registered deepseek-v4.1-flash row: 2026-09-09, from DeepSeek's release announcement;
- * the whole Gemini 3.x line-up, direct + OpenRouter — the 3.6 / 3.7 / 3.8 Flash launch
- * discounts declared, every other row re-read and unchanged: 2026-09-09; the direct DeepSeek
- * group (V4.1 Flash released as `deepseek-flash`, the two V4 Flash ids retired into it —
- * `deepseek-v4-flash` text-only even so, AgentHub's DeepSeek client refusing image parts for
- * that id), the OpenRouter and TokenDance V4.1 Flash rows, and TokenDance's running promotions
- * plus its Doubao Seed display names: 2026-09-10; the Penguin Go resale lineup, matched to the
- * relay's current generic-client model export: 2026-09-11, its DeepSeek rows to DeepSeek's own
- * lineup: 2026-09-16; the OpenRouter z-ai/glm-5.3-flash row: 2026-09-16 — per each provider's
+ * seed-2.1-turbo, seed-evolving): 2026-09-02; the vLLM group: 2026-09-03; the GPT-6 Astra
+ * rows (direct + OpenRouter): 2026-09-09; the whole Gemini 3.x line-up, direct + OpenRouter —
+ * the 3.6 / 3.7 / 3.8 Flash launch discounts declared, every other row re-read and unchanged:
+ * 2026-09-09; the OpenRouter and TokenDance V4.1 Flash rows, and TokenDance's running
+ * promotions plus its Doubao Seed display names: 2026-09-10; the Penguin Go resale lineup,
+ * matched to the relay's current generic-client model export: 2026-09-11, its DeepSeek rows to
+ * DeepSeek's own lineup: 2026-09-16; the OpenRouter z-ai/glm-5.3-flash row: 2026-09-16; and
+ * the 2026-09-16 refresh — the direct DeepSeek group down to the two names its pricing page
+ * lists, TokenDance's deepseek-v4-flash-0731 / deepseek-v4-pro-0813 / kimi-k3 promotions, the
+ * OpenRouter qwen/qwen3.8-27b row, the Fireworks AI and SiliconFlow additions, and both Qwen
+ * groups' line-ups with their peak/off-peak DeepSeek rows: 2026-09-16 — per each provider's
* docs).
* Docs: packages/docs/content/models.{zh,en}.md (site path /docs/models) documents the
* provider groups and credential resolution described here.
@@ -174,6 +173,25 @@ export interface ModelCatalogEntry {
clientType?: string;
/** Preset base URL: inlined into gateway and direct MiniMax entries so only an API key is required. */
baseUrl?: string;
+ /**
+ * The seller no longer offers this row, but Projects created while it did still carry it: a
+ * row a Project has is never deleted by "Sync presets", and several of these were the default
+ * model of new Projects. A retired row is not a preset — `presetModelEntries` and
+ * `presetPromotions` skip it, so a new Project never gets it or a promotion for it, and a sync
+ * never adds it — but it is still in `catalogModelEntries`, so a sync keeps updating the row
+ * on a Project that carries it, and lookups by `(provider, modelId)` still find it. Those
+ * Projects keep its display name and vision flag, and their usage on it is priced on its
+ * off-peak schedule whenever the row stores the catalog's price: the tier only applies to that
+ * price, and a sync puts back a price an older release stored. The schedule is the part that
+ * matters: cost is priced when it is read, so deleting a scheduled row would reprice every
+ * off-peak record already on those Projects at the peak rate.
+ *
+ * Compatibility, not catalog data: remove a retired row only after its seller has stopped
+ * accepting the id AND the release notes have told users that usage recorded on it will be
+ * priced without its schedule from then on. Whoever does the catalog refresh that finds the
+ * id rejected makes that call.
+ */
+ retired?: true;
}
/**
@@ -426,6 +444,19 @@ export const DEEPSEEK_OFF_PEAK: OffPeakDiscount = {
],
};
+/**
+ * Qwen's off-peak tier on the time-banded models it sells (www.qianwenai.com/models/<id>, read
+ * 2026-09-16): half price from 22:00 to 08:00 Beijing time, every day of the week, and the peak
+ * price at every other hour. Each model page shows the two tiers as separate price tabs, and
+ * every bucket's off-peak figure is exactly half its peak one.
+ */
+export const QWEN_OFF_PEAK: OffPeakDiscount = {
+ rate: 0.5,
+ utcOffsetMinutes: 480,
+ peakDays: [1, 2, 3, 4, 5, 6, 7],
+ peakHours: [[8, 22]],
+};
+
/**
* The catalog's time-based schedules, each with the references that carry it.
*
@@ -500,15 +531,16 @@ export function effectivePricing(
*/
export const MODEL_CATALOG: ModelCatalogEntry[] = [
// -- DeepSeek (official CNY pricing: cache hit / cache miss / output). Prices and model
- // names re-read 2026-09-10 from api-docs.deepseek.com/quick_start/pricing: the Flash rows
- // are on the peak tier CNY 0.04 / 2 / 8, exactly double the off-peak 0.02 / 1 / 4;
- // deepseek-v4-pro sits outside that tier, at 0.3 / 9 / 27. The rows store the PEAK tier
- // and declare DEEPSEEK_OFF_PEAK, which halves every bucket outside Beijing weekday
+ // names re-read 2026-09-16 from api-docs.deepseek.com/zh-cn/quick_start/pricing, which now
+ // lists exactly two names, both with a 1M context window and a 384K output cap:
+ // `deepseek-flash` (DeepSeek-V4.1-Flash, image input) on the peak tier CNY 0.04 / 2 / 8, and
+ // `deepseek-v4-pro` (DeepSeek-V4-Pro-0813, text only) at 0.30 / 9 / 27. The rows store the
+ // PEAK tier and declare DEEPSEEK_OFF_PEAK, which halves every bucket outside Beijing weekday
// 09:00-12:00 and 14:00-18:00 — so both tiers are billed at the rate actually in force,
// rather than one of them being approximated by the other.
- // V4.1 Flash ships under the bare name `deepseek-flash` and leads the group; the two V4
- // Flash ids below are retired names the vendor still accepts and now serves from V4.1
- // Flash at the Flash price. --
+ // The retired V4 Flash names, `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp`, are
+ // still accepted and served by V4.1 Flash at the Flash price and on the same schedule, but
+ // the page no longer lists them: they stay below as retired rows, which are not presets. --
{
// DeepSeek's pricing page names this model `deepseek-flash` (model version
// DeepSeek-V4.1-Flash, released as of the 2026-09-10 read): 1M context, image input, and
@@ -530,12 +562,10 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
baseUrl: DEEPSEEK_BASE_URL,
},
{
- // Retired on 2026-09-10: DeepSeek still accepts the id and serves it from V4.1 Flash at
- // the Flash price. V4 Flash reads no images, and the retirement does not change that —
- // `deepseek-flash` is the id to send an image to. AgentHub agrees rather than decides:
- // 0.4.11's DeepSeek client matches this bare id against its text-only deny-list
- // /^deepseek-v4-(flash|pro)(-\d{4})?$/ and rejects image parts before the request leaves
- // the harness, so relaxing that list is not a reason to flip this flag.
+ // Retired 2026-09-16 (see ModelCatalogEntry.retired): the default model of new Projects
+ // from 0.2.0 to 0.2.8. DeepSeek still accepts the id and serves it from V4.1 Flash at the
+ // Flash price, off-peak schedule included. Text only: AgentHub's DeepSeek client refuses
+ // image parts for this id.
modelId: "deepseek-v4-flash",
displayName: "DeepSeek V4 Flash",
provider: "deepseek",
@@ -543,11 +573,11 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
pricing: cny(0.04, 2, 8),
offPeakDiscount: DEEPSEEK_OFF_PEAK,
supportsVision: false,
+ retired: true,
},
{
- // The experimental vision revision of V4 Flash (added 2026-08-21), retired on the same
- // 2026-09-10 announcement: the id is still accepted and served from V4.1 Flash at the
- // Flash price. Image input was already the point of this row, and it still holds.
+ // Retired 2026-09-16 (see ModelCatalogEntry.retired): the default model of new Projects in
+ // 0.2.9, served from V4.1 Flash at the Flash price like deepseek-v4-flash above.
modelId: "deepseek-v4-flash-vision-exp",
displayName: "DeepSeek V4 Flash Vision Exp",
provider: "deepseek",
@@ -555,15 +585,18 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
pricing: cny(0.04, 2, 8),
offPeakDiscount: DEEPSEEK_OFF_PEAK,
supportsVision: true,
+ retired: true,
},
{
- // From 12:00 Beijing on 2026-09-14 and until V4.1 Pro is released, DeepSeek routes every
- // request for this id to V4.1 Flash and bills it at the V4.1 Flash price. The row keeps
- // the V4 Pro list price and its text-only flag: the id, the model behind it and the
- // billing are the vendor's to change back, and this catalog records what it publishes
- // for deepseek-v4-pro itself.
+ // DeepSeek's pricing page names the model behind this id DeepSeek-V4-Pro-0813 (read
+ // 2026-09-16), which is what the display name says — the same 0813 release the gateway
+ // groups sell under dated ids. Text only. DeepSeek states that V4 Pro stays available
+ // after 2026-09-14 with its billing unchanged, so the row keeps the V4 Pro peak price on
+ // the shared off-peak schedule. AgentHub 0.4.11's DeepSeek client also matches this bare
+ // id against its text-only deny-list /^deepseek-v4-(flash|pro)(-\d{4})?$/, so image parts
+ // never leave the harness for it.
modelId: "deepseek-v4-pro",
- displayName: "DeepSeek V4 Pro",
+ displayName: "DeepSeek V4 Pro 0813",
provider: "deepseek",
contextWindow: 1000000,
pricing: cny(0.3, 9, 27),
@@ -977,6 +1010,18 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-responses",
baseUrl: OPENROUTER_BASE_URL,
},
+ {
+ // Read 2026-09-16 from the models API: $0.214 input / $2.55 output with a published $0.15
+ // input_cache_read, a 1,000,000-token context window, and text, image and video input.
+ modelId: "qwen/qwen3.8-27b",
+ displayName: "Qwen 3.8 27B",
+ provider: "openrouter",
+ contextWindow: 1000000,
+ pricing: usd(0.15, 0.214, 2.55),
+ supportsVision: true,
+ clientType: "openai-responses",
+ baseUrl: OPENROUTER_BASE_URL,
+ },
{
modelId: "qwen/qwen3.8-max",
displayName: "Qwen 3.8 Max",
@@ -1120,7 +1165,23 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
},
// -- Fireworks AI (gateway, standard serverless USD pricing: cached input / uncached
// input / output from each model's page; API ids use the accounts/fireworks/models/<slug>
- // form) --
+ // form, where Fireworks spells a version's dot as `p`: deepseek-v4p1-flash, glm-5p3). The
+ // DeepSeek V4.1 Flash, DeepSeek V4 Pro 0813, GLM-5.3, GLM-5.3 Flash and Qwen 3.8 Max rows
+ // were added 2026-09-16 from their fireworks.ai/models pages. Fireworks publishes no context
+ // length for qwen3p8-max, so that row records the vendor's 1M window, as the other
+ // qwen3.8-max rows do. --
+ {
+ // Fireworks' listing of the model DeepSeek serves directly as `deepseek-flash`: 1,048,576
+ // context, image input, and the single serverless price its page lists, so no schedule.
+ modelId: "accounts/fireworks/models/deepseek-v4p1-flash",
+ displayName: "DeepSeek V4.1 Flash",
+ provider: "fireworks",
+ contextWindow: 1048576,
+ pricing: usd(0.007, 0.22, 0.66),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: FIREWORKS_BASE_URL,
+ },
{
modelId: "accounts/fireworks/models/deepseek-v4-flash-0731",
displayName: "DeepSeek V4 Flash 0731",
@@ -1141,6 +1202,16 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: FIREWORKS_BASE_URL,
},
+ {
+ modelId: "accounts/fireworks/models/deepseek-v4-pro-0813",
+ displayName: "DeepSeek V4 Pro 0813",
+ provider: "fireworks",
+ contextWindow: 1048576,
+ pricing: usd(0.044, 1.32, 3.96),
+ supportsVision: false,
+ clientType: "openai-chat",
+ baseUrl: FIREWORKS_BASE_URL,
+ },
{
modelId: "accounts/fireworks/models/deepseek-v4-pro",
displayName: "DeepSeek V4 Pro",
@@ -1151,6 +1222,28 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: FIREWORKS_BASE_URL,
},
+ {
+ modelId: "accounts/fireworks/models/glm-5p3",
+ displayName: "GLM-5.3",
+ provider: "fireworks",
+ contextWindow: 1048576,
+ pricing: usd(0.26, 1.4, 4.4),
+ supportsVision: false,
+ clientType: "openai-chat",
+ baseUrl: FIREWORKS_BASE_URL,
+ },
+ {
+ // Natively multimodal like every other GLM-5.3 Flash row, and this group's generic
+ // openai-chat client forwards image_url parts, so image input works on this path.
+ modelId: "accounts/fireworks/models/glm-5p3-flash",
+ displayName: "GLM-5.3 Flash",
+ provider: "fireworks",
+ contextWindow: 1048576,
+ pricing: usd(0.03, 0.15, 0.5),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: FIREWORKS_BASE_URL,
+ },
{
modelId: "accounts/fireworks/models/glm-5p2",
displayName: "GLM-5.2",
@@ -1203,6 +1296,16 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: FIREWORKS_BASE_URL,
},
+ {
+ modelId: "accounts/fireworks/models/qwen3p8-max",
+ displayName: "Qwen 3.8 Max",
+ provider: "fireworks",
+ contextWindow: 1000000,
+ pricing: usd(0.25, 2, 6),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: FIREWORKS_BASE_URL,
+ },
// -- SiliconFlow (gateway, official CNY pricing: cache hit / input / output) --
{
modelId: "deepseek-ai/DeepSeek-V4-Flash",
@@ -1268,6 +1371,30 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: SILICONFLOW_BASE_URL,
},
+ {
+ // Added 2026-09-16, both ids confirmed in SiliconFlow's /v1/models listing. Hy4 preview is
+ // text only at CNY 6 input / 18 output / 0.3 cache hit, with the 1,024,000-token window the
+ // TokenDance hy4-preview row records; GLM-5.3 below is text only at 8 / 28 / 2, with the
+ // same 1M window as zai-org/GLM-5.2.
+ modelId: "tencent/Hy4-preview",
+ displayName: "Hy4 preview",
+ provider: "siliconflow",
+ contextWindow: 1024000,
+ pricing: cny(0.3, 6, 18),
+ supportsVision: false,
+ clientType: "openai-chat",
+ baseUrl: SILICONFLOW_BASE_URL,
+ },
+ {
+ modelId: "zai-org/GLM-5.3",
+ displayName: "GLM-5.3",
+ provider: "siliconflow",
+ contextWindow: 1000000,
+ pricing: cny(2, 8, 28),
+ supportsVision: false,
+ clientType: "openai-chat",
+ baseUrl: SILICONFLOW_BASE_URL,
+ },
{
modelId: "zai-org/GLM-5.2",
displayName: "GLM-5.2",
@@ -1282,9 +1409,10 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
// 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 (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.
+ // 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.
//
// 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
@@ -1292,13 +1420,14 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
// 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 (rates re-confirmed 2026-09-10): deepseek-v4-flash-0731,
- // deepseek-v4-pro-0813 and kimi-k3 at 20% off; glm-5.3, glm-5.3-flash and qwen3.8-max at
- // 10%; the three Doubao Seed rows (seed-2.1-pro, seed-2.1-turbo, seed-evolving) at 50%.
- // Two more rows — deepseek-v4.1-flash and deepseek-v4-flash-vision-exp — carry no flat
- // discount at all and instead follow the vendor's own peak/off-peak schedule
- // (DEEPSEEK_OFF_PEAK), storing the peak price the way the direct DeepSeek rows do. The
- // rest carry neither, so for them list price and billed rate coincide.
+ // 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.
//
// 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
@@ -1306,22 +1435,22 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
// 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).
modelId: "deepseek-v4-flash-0731",
displayName: "DeepSeek V4 Flash 0731",
provider: "tokendance",
contextWindow: 1048576,
- pricing: cny(0.1, 3, 9),
- discount: 0.2,
+ pricing: cny(0.15, 1.5, 4.5),
+ discount: 0.1,
supportsVision: false,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
},
{
- // Both DeepSeek Flash rows sold here follow 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 and declares DEEPSEEK_OFF_PEAK, which halves every bucket
- // outside Beijing weekday 09:00-12:00 and 14:00-18:00 — see the deepseek-v4.1-flash row
- // below, priced identically.
+ // Retired from TokenDance's line-up 2026-09-16 (see ModelCatalogEntry.retired). It was sold
+ // on DeepSeek's own peak/off-peak schedule at the peak tier CNY 0.04 / 2 / 8, the price a
+ // sync keeps on the Projects still carrying it.
modelId: "deepseek-v4-flash-vision-exp",
displayName: "DeepSeek V4 Flash Vision Exp",
provider: "tokendance",
@@ -1331,14 +1460,17 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
supportsVision: true,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
+ 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).
modelId: "deepseek-v4-pro-0813",
displayName: "DeepSeek V4 Pro 0813",
provider: "tokendance",
contextWindow: 1000000,
- pricing: cny(0.3, 9, 27),
- discount: 0.2,
+ pricing: cny(0.45, 4.5, 13.5),
+ discount: 0.1,
supportsVision: false,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
@@ -1346,10 +1478,12 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
{
// 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. Priced like the vision-exp row above: the peak tier, on the vendor's own
- // schedule, no flat gateway discount (seller's quote 2026-09-10). 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.
+ // 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
+ // 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",
@@ -1432,20 +1566,24 @@ 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).
modelId: "kimi-k3",
displayName: "Kimi K3",
provider: "tokendance",
contextWindow: 1048576,
- pricing: cny(2, 20, 100),
- discount: 0.2,
+ pricing: cny(1.6, 20, 100),
+ discount: 0.4,
supportsVision: true,
clientType: "openai-chat",
baseUrl: TOKENDANCE_BASE_URL,
},
{
- // The gateway's own rate undercuts Qwen's direct list price for the same id (CNY 0.8 vs 1
- // input, 2.7 vs 3 output, cache hit the same 0.1), which is the whole reason both rows
- // exist: the pair is one model reached two ways, priced by whoever is selling it.
+ // One model reached two ways, priced by whoever is selling it: this row carries the
+ // gateway's own CNY 0.8 input / 2.7 output / 0.1 cache hit, and the qwen-pay-as-you-go row
+ // carries Qwen's direct list price for the same id. The two figures agree since Qwen's
+ // 2026-09-16 re-pricing (its page had read 1 / 3 / 0.1), but only because the two sellers
+ // do: each row still follows its own seller.
//
// Its supported_protocols is the widest in this group — openai:chat-completions,
// openai:responses AND anthropic:messages — so the openai-chat pin here is the group's
@@ -1625,33 +1763,44 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
baseUrl: PENGUIN_GO_BASE_URL,
},
// -- Qwen Token Plan (subscription gateway; vision flags per the plan's supported-model
- // table). Pricing and context windows from each model's page at
- // www.qianwenai.com/models/<id> (official CNY list prices; limited-time promotions such as
- // the 20%/50% off discounts are not stored). Lineup updated 2026-08-03: qwen3.8-max and
- // deepseek-v4-flash-0731 join; qwen3.8-max-preview and qwen3.7-max leave the plan. --
+ // table, and for the rows added 2026-09-16 per their model pages' input modalities).
+ // Pricing and context windows from each model's page at www.qianwenai.com/models/<id>
+ // (official CNY list prices; limited-time promotions such as the 20%/50% off discounts are
+ // not stored). Lineup updated 2026-09-16: deepseek-v4.1-flash, deepseek-v4-pro-0813,
+ // glm-5.3 and qwen3.8-flash join; deepseek-v4-flash-0731, deepseek-v4-pro and glm-5.2
+ // leave the plan.
+ //
+ // The two DeepSeek rows are priced by time of day: their pages list a peak and an off-peak
+ // price, the off-peak one exactly half on every bucket and in force from 22:00 to 08:00
+ // Beijing time every day. They store the PEAK price and declare QWEN_OFF_PEAK, the same
+ // shape the DeepSeek rows take with DeepSeek's own schedule. --
{
- modelId: "deepseek-v4-flash-0731",
- displayName: "DeepSeek V4 Flash 0731",
+ // Peak CNY 2 input / 8 output / 0.2 cache hit; off-peak 1 / 4 / 0.1. Text and image input.
+ modelId: "deepseek-v4.1-flash",
+ displayName: "DeepSeek V4.1 Flash",
provider: "qwen-token-plan",
contextWindow: 1000000,
- pricing: cny(0.2, 1, 2),
- supportsVision: false,
+ pricing: cny(0.2, 2, 8),
+ offPeakDiscount: QWEN_OFF_PEAK,
+ supportsVision: true,
clientType: "openai-chat",
baseUrl: QWEN_TOKEN_PLAN_BASE_URL,
},
{
- modelId: "deepseek-v4-pro",
- displayName: "DeepSeek V4 Pro",
+ // Peak CNY 9 input / 27 output / 0.9 cache hit; off-peak 4.5 / 13.5 / 0.45. Text only.
+ modelId: "deepseek-v4-pro-0813",
+ displayName: "DeepSeek V4 Pro 0813",
provider: "qwen-token-plan",
contextWindow: 1000000,
- pricing: cny(1, 12, 24),
+ pricing: cny(0.9, 9, 27),
+ offPeakDiscount: QWEN_OFF_PEAK,
supportsVision: false,
clientType: "openai-chat",
baseUrl: QWEN_TOKEN_PLAN_BASE_URL,
},
{
- modelId: "glm-5.2",
- displayName: "GLM-5.2",
+ modelId: "glm-5.3",
+ displayName: "GLM-5.3",
provider: "qwen-token-plan",
contextWindow: 1048576,
pricing: cny(2, 8, 28),
@@ -1659,6 +1808,16 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
clientType: "openai-chat",
baseUrl: QWEN_TOKEN_PLAN_BASE_URL,
},
+ {
+ modelId: "qwen3.8-flash",
+ displayName: "Qwen 3.8 Flash",
+ provider: "qwen-token-plan",
+ contextWindow: 1000000,
+ pricing: cny(0.1, 0.8, 2.7),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: QWEN_TOKEN_PLAN_BASE_URL,
+ },
{
modelId: "qwen3.8-max",
displayName: "Qwen 3.8 Max",
@@ -1682,14 +1841,20 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
// -- Qwen Pay-As-You-Go (DashScope's OpenAI-compatible pay-per-token marketplace; official
// CNY list prices and specs from each model's page at www.qianwenai.com/models/<id> —
// resold third-party models keep their upstream ids exactly as the page lists them: kimi/
- // and ZHIPU/ carry vendor prefixes, DeepSeek is listed bare) --
+ // and ZHIPU/ carry vendor prefixes, DeepSeek is listed bare). Lineup updated 2026-09-16:
+ // deepseek-v4.1-flash, kimi/kimi-k2.8-preview and ZHIPU/GLM-5.3-Flash join;
+ // deepseek-v4-flash-0731 and ZHIPU/GLM-5.2 leave. The DeepSeek row is priced by time of day
+ // on QWEN_OFF_PEAK and stores its peak price, as in the Token Plan group above. --
{
- modelId: "deepseek-v4-flash-0731",
- displayName: "DeepSeek V4 Flash 0731",
+ // Peak CNY 2 input / 8 output / 0.2 cache hit; off-peak (22:00-08:00 Beijing) 1 / 4 / 0.1.
+ // Text and image input, which this group's openai-chat client forwards.
+ modelId: "deepseek-v4.1-flash",
+ displayName: "DeepSeek V4.1 Flash",
provider: "qwen-pay-as-you-go",
contextWindow: 1000000,
- pricing: cny(0.2, 1, 2),
- supportsVision: false,
+ pricing: cny(0.2, 2, 8),
+ offPeakDiscount: QWEN_OFF_PEAK,
+ supportsVision: true,
clientType: "openai-chat",
baseUrl: QWEN_PAYG_BASE_URL,
},
@@ -1704,15 +1869,27 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
baseUrl: QWEN_PAYG_BASE_URL,
},
{
- // Official CNY list price from www.qianwenai.com/models/qwen3.8-flash: CNY 1 input /
- // CNY 0.1 cache hit / CNY 3 output per MTok, over a 1M-token input window with a 131K
- // output cap. Its input modalities include images and video, and this group's
- // openai-chat client converts image parts.
+ // CNY 6.5 input / 27 output / 1.7 cache hit over a 1M window (1,048,576, as on the
+ // kimi/kimi-k3 row); text, image and video input.
+ modelId: "kimi/kimi-k2.8-preview",
+ displayName: "Kimi K2.8 Preview",
+ provider: "qwen-pay-as-you-go",
+ contextWindow: 1048576,
+ pricing: cny(1.7, 6.5, 27),
+ supportsVision: true,
+ clientType: "openai-chat",
+ baseUrl: QWEN_PAYG_BASE_URL,
+ },
+ {
+ // Official CNY list price from www.qianwenai.com/models/qwen3.8-flash, re-read 2026-09-16:
+ // CNY 0.8 input / CNY 0.1 cache hit / CNY 2.7 output per MTok (it had been 1 / 0.1 / 3),
+ // over a 1M-token input window with a 131K output cap. Its input modalities include
+ // images and video, and this group's openai-chat client converts image parts.
modelId: "qwen3.8-flash",
displayName: "Qwen 3.8 Flash",
provider: "qwen-pay-as-you-go",
contextWindow: 1000000,
- pricing: cny(0.1, 1, 3),
+ pricing: cny(0.1, 0.8, 2.7),
supportsVision: true,
clientType: "openai-chat",
baseUrl: QWEN_PAYG_BASE_URL,
@@ -1738,12 +1915,15 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
baseUrl: QWEN_PAYG_BASE_URL,
},
{
- modelId: "ZHIPU/GLM-5.2",
- displayName: "GLM-5.2",
+ // CNY 0.8 input / 2.8 output / 0.23 cache hit over a 1M window with a 131K output cap;
+ // natively multimodal like every other GLM-5.3 Flash row, and this group's openai-chat
+ // client forwards image parts.
+ modelId: "ZHIPU/GLM-5.3-Flash",
+ displayName: "GLM-5.3 Flash",
provider: "qwen-pay-as-you-go",
- contextWindow: 1048576,
- pricing: cny(2, 8, 28),
- supportsVision: false,
+ contextWindow: 1000000,
+ pricing: cny(0.23, 0.8, 2.8),
+ supportsVision: true,
clientType: "openai-chat",
baseUrl: QWEN_PAYG_BASE_URL,
},
@@ -2427,7 +2607,23 @@ export function fastModeProtocol(
* applied when the price is read, by the models page and by the cost center alike.
*/
export function presetModelEntries(): ModelEntry[] {
- return MODEL_CATALOG.map((m) => ({
+ // A retired row stays in the catalog for the Projects that still carry it, and only for them.
+ return MODEL_CATALOG.filter((m) => m.retired !== true).map(catalogModelEntry);
+}
+
+/**
+ * Every catalog row as a ModelEntry, retired rows included, in the shape presetModelEntries
+ * writes. This is the list "Sync presets" compares a Project's table against: the sync never adds
+ * a retired row, but it updates one the Project already carries like any preset, so a price an
+ * older release stored returns to the catalog's (see ModelCatalogEntry.retired).
+ */
+export function catalogModelEntries(): ModelEntry[] {
+ return MODEL_CATALOG.map(catalogModelEntry);
+}
+
+/** One catalog row as the ModelEntry a Project stores (see presetModelEntries). */
+function catalogModelEntry(m: ModelCatalogEntry): ModelEntry {
+ return {
provider: m.provider,
model_id: m.modelId,
...(m.contextWindow !== undefined ? { context_window: m.contextWindow } : {}),
@@ -2438,13 +2634,17 @@ export function presetModelEntries(): ModelEntry[] {
// image hand-off, see project-config.ts).
...(m.supportsVision ? {} : { vision: false }),
...(m.baseUrl !== undefined ? { base_url: m.baseUrl } : {}),
- }));
+ };
}
-/** The catalog's flat promotions, as a new Project is seeded with them: every row whose `discount` is a fraction in (0, 1). */
+/**
+ * The catalog's flat promotions, as a new Project is seeded with them: every row whose `discount`
+ * is a fraction in (0, 1). A retired row is skipped like it is in presetModelEntries: a new
+ * Project never carries it, so there is nothing for its promotion to apply to.
+ */
export function presetPromotions(): Array<{ provider: string; modelId: string; discount: number }> {
return MODEL_CATALOG.flatMap((m) =>
- m.discount !== undefined && m.discount > 0 && m.discount < 1
+ m.retired !== true && m.discount !== undefined && m.discount > 0 && m.discount < 1
? [{ provider: m.provider, modelId: m.modelId, discount: m.discount }]
: [],
);
diff --git a/packages/core/test/agent.test.ts b/packages/core/test/agent.test.ts
index 1253359f..3bbe7c04 100644
--- a/packages/core/test/agent.test.ts
+++ b/packages/core/test/agent.test.ts
@@ -241,10 +241,10 @@ describe("Agent.createSession model reference ((provider, model_id) pair)", () =
const ws = path.join(tmpRoot, "ws-ref-half");
await fs.mkdir(ws, { recursive: true });
// A bare model_id is never resolved against the config, not even when exactly one entry
- // carries it (deepseek-v4-flash is unique here): the group is the caller's to name.
- await expect(
- agent.createSession({ workspaceDir: ws, modelId: "deepseek-v4-flash" }),
- ).rejects.toThrow(/must be given as a \(provider, model_id\) pair/);
+ // carries it (gpt-6-astra is unique here): the group is the caller's to name.
+ await expect(agent.createSession({ workspaceDir: ws, modelId: "gpt-6-astra" })).rejects.toThrow(
+ /must be given as a \(provider, model_id\) pair/,
+ );
// The mirror case: provider alone is not a reference either.
await expect(agent.createSession({ workspaceDir: ws, provider: "deepseek" })).rejects.toThrow(
/must be given as a \(provider, model_id\) pair/,
diff --git a/packages/core/test/model-catalog.test.ts b/packages/core/test/model-catalog.test.ts
index 1bdff710..ac5c9cd1 100644
--- a/packages/core/test/model-catalog.test.ts
+++ b/packages/core/test/model-catalog.test.ts
@@ -13,7 +13,10 @@ import {
attributionHeaders,
effectivePricing,
offPeakAt,
+ offPeakScheduledRefs,
DEEPSEEK_OFF_PEAK,
+ QWEN_OFF_PEAK,
+ catalogModelEntries,
presetModelEntries,
presetPromotions,
providerClientType,
@@ -26,7 +29,7 @@ import {
describe("model-catalog", () => {
it("(provider, model_id) pairs are unique and provider order keeps the recommendation first", () => {
// Bare model ids may repeat across providers (a gateway reselling a vendor model keeps the
- // vendor's upstream id, e.g. Qwen Token Plan's glm-5.2 / deepseek-v4-pro) — uniqueness is
+ // vendor's upstream id, e.g. Qwen Token Plan's glm-5.3 / qwen3.8-max) — uniqueness is
// the (provider, model_id) pair, matching the catalog's sole lookup key (catalogEntryFor).
const pairs = MODEL_CATALOG.map((m) => `${m.provider}\0${m.modelId}`);
expect(new Set(pairs).size).toBe(pairs.length);
@@ -330,8 +333,8 @@ describe("model-catalog", () => {
// It matches on (group, upstream id) pairs, so an identically named upstream id never
// matches across the wrong group. There is no bare-id lookup at all: a gateway reselling a
// vendor model keeps the vendor's upstream id, so a bare id names no single catalog entry
- // and the catalog never offers to pick one (`glm-5.2`, `deepseek-v4-pro`, `qwen3.8-max`,
- // `qwen3.7-plus` and `deepseek-v4-flash-0731` each appear under two groups).
+ // and the catalog never offers to pick one (`qwen3.7-plus` and `deepseek-v4-pro-0813` each
+ // appear under two groups; `glm-5.3`, `qwen3.8-max` and `deepseek-v4.1-flash` under three).
expect(catalogEntryFor("anthropic", "claude-sonnet-4-6")?.displayName).toBe(
"Claude Sonnet 4.6",
);
@@ -344,19 +347,30 @@ describe("model-catalog", () => {
expect(catalogEntryFor("qwen-pay-as-you-go", "qwen3.8-max")?.provider).toBe(
"qwen-pay-as-you-go",
);
- // The bare resold id never leaks into the vendor's own group (deepseek's flash revision is
- // sold there as deepseek-v4-flash, without the date suffix).
- expect(catalogEntryFor("deepseek", "deepseek-v4-flash-0731")).toBeUndefined();
- expect(catalogEntryFor("deepseek", "deepseek-v4-flash")?.provider).toBe("deepseek");
- expect(catalogEntryFor("zhipu", "glm-5.2")?.contextWindow).toBe(1000000);
- expect(catalogEntryFor("qwen-token-plan", "glm-5.2")?.contextWindow).toBe(1048576);
+ // The bare resold id never leaks into the vendor's own group: DeepSeek sells the 0813 Pro
+ // release under its undated `deepseek-v4-pro` name, and the dated spelling is a reseller's.
+ expect(catalogEntryFor("deepseek", "deepseek-v4-pro-0813")).toBeUndefined();
expect(catalogEntryFor("deepseek", "deepseek-v4-pro")?.provider).toBe("deepseek");
- // deepseek-flash leads the direct group: the released V4.1 Flash, which the vendor names
- // without a version segment. The dotted spelling is a RESOLD id only — TokenDance and
- // OpenRouter sell it that way — so it must not appear in the vendor's own group.
- expect(MODEL_CATALOG.filter((m) => m.provider === "deepseek")[0]!.modelId).toBe(
- "deepseek-flash",
+ expect(catalogEntryFor("qwen-token-plan", "deepseek-v4-pro-0813")?.provider).toBe(
+ "qwen-token-plan",
);
+ expect(catalogEntryFor("zhipu", "glm-5.3")?.contextWindow).toBe(1000000);
+ expect(catalogEntryFor("qwen-token-plan", "glm-5.3")?.contextWindow).toBe(1048576);
+ // The direct group presets exactly the two names DeepSeek's pricing page lists, V4.1 Flash
+ // first: the vendor names it without a version segment. The bare V4 Flash names it no longer
+ // lists stay as retired rows, and the dotted V4.1 spelling is a RESOLD id only — TokenDance,
+ // both Qwen groups and OpenRouter sell it that way.
+ expect(MODEL_CATALOG.filter((m) => m.provider === "deepseek").map((m) => m.modelId)).toEqual([
+ "deepseek-flash",
+ "deepseek-v4-flash",
+ "deepseek-v4-flash-vision-exp",
+ "deepseek-v4-pro",
+ ]);
+ expect(
+ presetModelEntries()
+ .filter((e) => e.provider === "deepseek")
+ .map((e) => e.model_id),
+ ).toEqual(["deepseek-flash", "deepseek-v4-pro"]);
expect(catalogEntryFor("deepseek", "deepseek-v4.1-flash")).toBeUndefined();
expect(catalogEntryFor("tokendance", "deepseek-v4.1-flash")?.provider).toBe("tokendance");
expect(catalogEntryFor("openrouter", "deepseek/deepseek-v4.1-flash")?.provider).toBe(
@@ -364,24 +378,23 @@ describe("model-catalog", () => {
);
// Vision is a per-row flag, not a property of the id's spelling: it tracks what the client
// routing the row actually carries. AgentHub's DeepSeek client denies image parts to ids
- // matching /^deepseek-v4-(flash|pro)(-\d{4})?$/, which covers deepseek-v4-flash and
- // deepseek-v4-pro but neither the bare deepseek-flash nor the vision-exp revision.
+ // matching /^deepseek-v4-(flash|pro)(-\d{4})?$/, which covers deepseek-v4-pro but not the
+ // bare deepseek-flash; OpenRouter's vision-exp listing goes through the generic Responses
+ // client instead.
expect(catalogEntryFor("deepseek", "deepseek-flash")?.supportsVision).toBe(true);
- expect(catalogEntryFor("deepseek", "deepseek-v4-flash")?.supportsVision).toBe(false);
- expect(catalogEntryFor("deepseek", "deepseek-v4-flash-vision-exp")?.supportsVision).toBe(true);
expect(catalogEntryFor("deepseek", "deepseek-v4-pro")?.supportsVision).toBe(false);
expect(
catalogEntryFor("openrouter", "deepseek/deepseek-v4-flash-vision-exp")?.supportsVision,
).toBe(true);
- expect(catalogEntryFor("qwen-token-plan", "deepseek-v4-pro")?.provider).toBe("qwen-token-plan");
expect(catalogEntryFor("minimax", "MiniMax-M3")?.displayName).toBe("MiniMax M3");
});
it("presetModelEntries: provider and bare upstream model_id are separate fields; preset endpoints are inlined", () => {
const entries = presetModelEntries();
- expect(entries).toHaveLength(MODEL_CATALOG.length);
+ const presets = MODEL_CATALOG.filter((m) => m.retired !== true);
+ expect(entries).toHaveLength(presets.length);
for (const [i, entry] of entries.entries()) {
- const cat = MODEL_CATALOG[i]!;
+ const cat = presets[i]!;
expect(entry.provider).toBe(cat.provider);
expect(entry.model_id).toBe(cat.modelId);
expect(entry.context_window).toBe(cat.contextWindow);
@@ -450,6 +463,7 @@ describe("model-catalog", () => {
"openai/gpt-5.4-nano",
"openai/gpt-5.4-pro",
"openrouter/free",
+ "qwen/qwen3.8-27b",
"qwen/qwen3.8-max",
"qwen/qwen3.6-35b-a3b",
"stepfun/step-3.7-flash",
@@ -477,23 +491,31 @@ describe("model-catalog", () => {
expect(resolveModelEnv(m.modelId, m.clientType)?.envKey, m.modelId).toBe("OPENAI_API_KEY");
}
const fw = MODEL_CATALOG.filter((m) => m.provider === "fireworks");
- expect(fw.map((m) => [m.modelId, m.supportsVision])).toEqual([
- ["accounts/fireworks/models/deepseek-v4-flash-0731", false],
- ["accounts/fireworks/models/deepseek-v4-flash", false],
- ["accounts/fireworks/models/deepseek-v4-pro", false],
- ["accounts/fireworks/models/glm-5p2", false],
- ["accounts/fireworks/models/inkling", true],
- ["accounts/fireworks/models/kimi-k3", true],
- ["accounts/fireworks/models/kimi-k2p7-code", true],
- ["accounts/fireworks/models/minimax-m3", true],
+ // Fireworks spells a version's dot as `p` (deepseek-v4p1-flash, glm-5p3); newer versions of
+ // a series still come first, whatever that spelling does to plain dictionary order.
+ expect(fw.map((m) => [m.modelId, m.contextWindow, m.supportsVision])).toEqual([
+ ["accounts/fireworks/models/deepseek-v4p1-flash", 1048576, true],
+ ["accounts/fireworks/models/deepseek-v4-flash-0731", 1000000, false],
+ ["accounts/fireworks/models/deepseek-v4-flash", 1000000, false],
+ ["accounts/fireworks/models/deepseek-v4-pro-0813", 1048576, false],
+ ["accounts/fireworks/models/deepseek-v4-pro", 1000000, false],
+ ["accounts/fireworks/models/glm-5p3", 1048576, false],
+ ["accounts/fireworks/models/glm-5p3-flash", 1048576, true],
+ ["accounts/fireworks/models/glm-5p2", 1000000, false],
+ ["accounts/fireworks/models/inkling", 1000000, true],
+ ["accounts/fireworks/models/kimi-k3", 1000000, true],
+ ["accounts/fireworks/models/kimi-k2p7-code", 262144, true],
+ ["accounts/fireworks/models/minimax-m3", 524288, true],
+ ["accounts/fireworks/models/qwen3p8-max", 1000000, true],
]);
for (const m of fw) {
expect(m.clientType).toBe("openai-chat");
expect(m.baseUrl).toBe("https://api.fireworks.ai/inference/v1");
}
const sf = MODEL_CATALOG.filter((m) => m.provider === "siliconflow");
- // Dictionary order is case-insensitive (as in qwen-pay-as-you-go, where ZHIPU/GLM-5.2
- // sorts last): Pro/ and Qwen/ fall between moonshotai/ and zai-org/.
+ // Dictionary order is case-insensitive (as in qwen-pay-as-you-go, where ZHIPU/GLM-5.3-Flash
+ // sorts last): Pro/ and Qwen/ fall between moonshotai/ and tencent/, and GLM-5.3 comes before
+ // GLM-5.2 as the newer version.
expect(sf.map((m) => m.modelId)).toEqual([
"deepseek-ai/DeepSeek-V4-Flash",
"deepseek-ai/DeepSeek-V4-Pro",
@@ -501,6 +523,8 @@ describe("model-catalog", () => {
"moonshotai/Kimi-K2.7-Code",
"Pro/moonshotai/Kimi-K2.6",
"Qwen/Qwen3.6-35B-A3B",
+ "tencent/Hy4-preview",
+ "zai-org/GLM-5.3",
"zai-org/GLM-5.2",
]);
for (const m of sf) {
@@ -509,9 +533,10 @@ describe("model-catalog", () => {
}
const qtp = MODEL_CATALOG.filter((m) => m.provider === "qwen-token-plan");
expect(qtp.map((m) => m.modelId)).toEqual([
- "deepseek-v4-flash-0731",
- "deepseek-v4-pro",
- "glm-5.2",
+ "deepseek-v4.1-flash",
+ "deepseek-v4-pro-0813",
+ "glm-5.3",
+ "qwen3.8-flash",
"qwen3.8-max",
"qwen3.7-plus",
]);
@@ -519,13 +544,15 @@ describe("model-catalog", () => {
expect(m.clientType).toBe("openai-chat");
expect(m.baseUrl).toBe("https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1");
}
- // Vision flags per the plan's supported-model table: 3.8-max and 3.7-plus see images.
- expect(qtp.map((m) => [m.modelId, m.supportsVision])).toEqual([
- ["deepseek-v4-flash-0731", false],
- ["deepseek-v4-pro", false],
- ["glm-5.2", false],
- ["qwen3.8-max", true],
- ["qwen3.7-plus", true],
+ // Vision flags per the plan's supported-model table and the model pages: V4.1 Flash and
+ // the three Qwen rows see images, the V4 Pro 0813 and GLM-5.3 rows are text only.
+ expect(qtp.map((m) => [m.modelId, m.contextWindow, m.supportsVision])).toEqual([
+ ["deepseek-v4.1-flash", 1000000, true],
+ ["deepseek-v4-pro-0813", 1000000, false],
+ ["glm-5.3", 1048576, false],
+ ["qwen3.8-flash", 1000000, true],
+ ["qwen3.8-max", 1000000, true],
+ ["qwen3.7-plus", 1000000, true],
]);
const td = MODEL_CATALOG.filter((m) => m.provider === "tokendance");
// Dictionary order by upstream id; vision flags and context windows from TokenDance's
@@ -570,9 +597,9 @@ 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.2, [7.2, 21.6, 0.24]],
- ["deepseek-v4-flash-0731", 0.2, [2.4, 7.2, 0.08]],
- ["kimi-k3", 0.2, [16, 80, 1.6]],
+ ["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]],
["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]],
@@ -587,9 +614,9 @@ describe("model-catalog", () => {
expect(cacheHit, `${modelId} cache hit`).toBeCloseTo(cnyBilled[2], 4);
}
// Exactly those nine carry a flat discount; every other row bills its list price
- // unchanged. Two of those others declare DeepSeek's peak/off-peak schedule instead, so
- // they are compared at a PEAK instant — 2026-09-10 is a Thursday, and 10:00 Beijing is
- // inside the morning window — because effectivePricing halves them off-peak by design.
+ // unchanged. One of those others declares 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.
expect(
td
.filter((m) => m.discount !== undefined)
@@ -600,8 +627,8 @@ describe("model-catalog", () => {
for (const m of td.filter((x) => x.discount === undefined)) {
expect(effectivePricing(m, peakInstant), m.modelId).toEqual(m.pricing);
}
- // The two rows that follow the vendor's schedule instead of a gateway promotion, at the
- // same peak tier the direct DeepSeek rows store: CNY 0.04 / 2 / 8 per million.
+ // 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.
const tdScheduled = td.filter((m) => m.offPeakDiscount !== undefined).map((m) => m.modelId);
expect(tdScheduled).toEqual(["deepseek-v4-flash-vision-exp", "deepseek-v4.1-flash"]);
for (const id of tdScheduled) {
@@ -638,23 +665,16 @@ describe("model-catalog", () => {
expect([tdFlash.cache_read, tdFlash.cache_write, tdFlash.output]).toEqual([
0.032857, 0.114286, 0.4,
]);
- // qwen3.8-flash at 0.1 / 0.8 / 2.7 CNY, undiscounted. The same id also sits in the
- // qwen-pay-as-you-go group at Qwen's own 0.1 / 1 / 3, and the pair is the point: one
- // model reached two ways, priced by whoever is selling it, so the two rows must not
- // silently converge.
+ // qwen3.8-flash at 0.1 / 0.8 / 2.7 CNY, undiscounted: TokenDance's own figures. The same id
+ // also sits in both Qwen groups at Qwen's direct list price, pinned separately further down;
+ // the two sellers happen to charge the same since Qwen's 2026-09-16 re-pricing.
const tdQwenFlash = td.find((m) => m.modelId === "qwen3.8-flash")!.pricing!;
expect([tdQwenFlash.cache_read, tdQwenFlash.cache_write, tdQwenFlash.output]).toEqual([
0.014286, 0.114286, 0.385714,
]);
- const payggFlash = MODEL_CATALOG.find(
- (m) => m.provider === "qwen-pay-as-you-go" && m.modelId === "qwen3.8-flash",
- )!.pricing!;
- expect(payggFlash.cache_write).toBeGreaterThan(tdQwenFlash.cache_write);
- expect(payggFlash.output).toBeGreaterThan(tdQwenFlash.output);
- expect(payggFlash.cache_read).toEqual(tdQwenFlash.cache_read);
// hy4-preview is the same upstream model as OpenRouter's tencent/hy4-preview, sold twice.
- // Same rule as the qwen3.8-flash pair: each row carries its own seller's price and its own
- // published context window, so the two must stay apart rather than converge on one number.
+ // Each row carries its own seller's price and its own published context window, so the two
+ // stay apart rather than converge on one number.
const tdHy4 = td.find((m) => m.modelId === "hy4-preview")!;
expect(tdHy4.discount).toBeUndefined();
expect(billedCny("hy4-preview")[0]).toBeCloseTo(6, 4);
@@ -672,13 +692,15 @@ describe("model-catalog", () => {
expect([tdHy4.supportsVision, orHy4.supportsVision]).toEqual([false, false]);
expect(orHy4.discount).toBeUndefined();
const qpayg = MODEL_CATALOG.filter((m) => m.provider === "qwen-pay-as-you-go");
- expect(qpayg.map((m) => [m.modelId, m.supportsVision])).toEqual([
- ["deepseek-v4-flash-0731", false],
- ["kimi/kimi-k3", true],
- ["qwen3.8-flash", true],
- ["qwen3.8-max", true],
- ["qwen3.7-plus", true],
- ["ZHIPU/GLM-5.2", false],
+ // Case-insensitive dictionary order with newer versions first: kimi-k3 before kimi-k2.8.
+ expect(qpayg.map((m) => [m.modelId, m.contextWindow, m.supportsVision])).toEqual([
+ ["deepseek-v4.1-flash", 1000000, true],
+ ["kimi/kimi-k3", 1048576, true],
+ ["kimi/kimi-k2.8-preview", 1048576, true],
+ ["qwen3.8-flash", 1000000, true],
+ ["qwen3.8-max", 1000000, true],
+ ["qwen3.7-plus", 1000000, true],
+ ["ZHIPU/GLM-5.3-Flash", 1000000, true],
]);
for (const m of qpayg) {
expect(m.clientType).toBe("openai-chat");
@@ -793,6 +815,8 @@ describe("model-catalog", () => {
...customPresets,
...MODEL_CATALOG.filter((m) => m.provider === "penguin-go"),
]
+ // A retired gateway row keeps its pin in the catalog but is not a preset.
+ .filter((m) => m.retired !== true)
.map((m) => [m.provider, m.modelId])
.sort(),
);
@@ -938,17 +962,21 @@ describe("model-catalog", () => {
// Both rows share one display name, as the other dual-listed models do.
expect(glm53f.displayName).toBe("GLM-5.3 Flash");
expect(glm53for.displayName).toBe("GLM-5.3 Flash");
- // Qwen 3.8 Flash: official CNY list price (1 / 0.1 / 3 per MTok) at the catalog's 7:1
- // display rate, 1M context, vision through the group's openai-chat client.
- const q38f = catalogEntryFor("qwen-pay-as-you-go", "qwen3.8-flash")!;
- expect([q38f.contextWindow, q38f.supportsVision, q38f.displayName]).toEqual([
- 1000000,
- true,
- "Qwen 3.8 Flash",
- ]);
- expect([q38f.pricing!.cache_read, q38f.pricing!.cache_write, q38f.pricing!.output]).toEqual([
- 0.014286, 0.142857, 0.428571,
- ]);
+ // Qwen 3.8 Flash in both Qwen groups: official CNY list price (0.8 input / 0.1 cache hit /
+ // 2.7 output per MTok since the 2026-09-16 re-read) at the catalog's 7:1 display rate, 1M
+ // context, vision through the groups' openai-chat client.
+ for (const provider of ["qwen-pay-as-you-go", "qwen-token-plan"]) {
+ const q38f = catalogEntryFor(provider, "qwen3.8-flash")!;
+ expect([q38f.contextWindow, q38f.supportsVision, q38f.displayName], provider).toEqual([
+ 1000000,
+ true,
+ "Qwen 3.8 Flash",
+ ]);
+ expect(
+ [q38f.pricing!.cache_read, q38f.pricing!.cache_write, q38f.pricing!.output],
+ provider,
+ ).toEqual([0.014286, 0.114286, 0.385714]);
+ }
// Grok 4.6 keeps Grok 4.5's input/output rates with a raised cache-hit price.
const grok46 = catalogEntryFor("openrouter", "x-ai/grok-4.6")!;
expect([grok46.contextWindow, grok46.supportsVision]).toEqual([500000, true]);
@@ -999,8 +1027,13 @@ describe("model-catalog", () => {
});
// The same model resold by a gateway keeps one display name across groups. The bare
// `gpt-5.6` id is the same tier OpenRouter spells `openai/gpt-5.6-sol`, so it displays
- // that codename too rather than leaving the variant unnamed.
+ // that codename too rather than leaving the variant unnamed; likewise DeepSeek's undated
+ // `deepseek-v4-pro` is the 0813 release the gateways date, and says so.
for (const [directProvider, directId, gatewayProvider, gatewayId] of [
+ ["deepseek", "deepseek-flash", "openrouter", "deepseek/deepseek-v4.1-flash"],
+ ["deepseek", "deepseek-flash", "fireworks", "accounts/fireworks/models/deepseek-v4p1-flash"],
+ ["deepseek", "deepseek-v4-pro", "openrouter", "deepseek/deepseek-v4-pro-0813"],
+ ["deepseek", "deepseek-v4-pro", "qwen-token-plan", "deepseek-v4-pro-0813"],
["openai", "gpt-6-astra", "openrouter", "openai/gpt-6-astra"],
["openai", "gpt-5.6", "openrouter", "openai/gpt-5.6-sol"],
["openai", "gpt-5.6-luna", "openrouter", "openai/gpt-5.6-luna"],
@@ -1030,13 +1063,15 @@ describe("model-catalog", () => {
const cnyOf = (usdV: number) => Math.round(usdV * 7 * 1000) / 1000;
// DeepSeek rows carry the official PEAK tier; the off-peak tier is exactly half, and is
// applied from the row's schedule rather than stored (see the off-peak schedules block
- // below). The flash rows were re-read 2026-09-08 for the official price adjustment
- // effective 2026-09-10; V4 Pro sits outside that adjustment.
- const flash = catalogEntryFor("deepseek", "deepseek-v4-flash")!.pricing!;
+ // below). Both were re-read 2026-09-16: V4.1 Flash at CNY 0.04 / 2 / 8, and V4 Pro — the
+ // 0813 release, its display name now says — unchanged at 0.30 / 9 / 27.
+ const flash = catalogEntryFor("deepseek", "deepseek-flash")!.pricing!;
expect([cnyOf(flash.cache_read), cnyOf(flash.cache_write), cnyOf(flash.output)]).toEqual([
0.04, 2, 8,
]);
- const pro = catalogEntryFor("deepseek", "deepseek-v4-pro")!.pricing!;
+ const proRow = catalogEntryFor("deepseek", "deepseek-v4-pro")!;
+ expect(proRow.displayName).toBe("DeepSeek V4 Pro 0813");
+ const pro = proRow.pricing!;
expect([cnyOf(pro.cache_read), cnyOf(pro.cache_write), cnyOf(pro.output)]).toEqual([
0.3, 9, 27,
]);
@@ -1190,10 +1225,10 @@ describe("resolveModelEnv (PRN-021: env fallback resolved by AgentHub routing ru
it("first-party model ids route to the provider client's env var", () => {
expect(resolveModelEnv("deepseek-v4-pro")?.envKey).toBe("DEEPSEEK_API_KEY");
// The dotted V4.1 spelling still carries the deepseek-v4 substring AutoLLMClient routes
- // on. It survives in the catalog as a RESOLD id — TokenDance's deepseek-v4.1-flash and
- // OpenRouter's deepseek/deepseek-v4.1-flash, both of which pin an OpenAI-protocol client
- // anyway — so this branch is what the bare spelling would resolve to, not what those
- // rows use.
+ // on. It survives in the catalog as a RESOLD id — deepseek-v4.1-flash on TokenDance and
+ // both Qwen groups, and OpenRouter's deepseek/deepseek-v4.1-flash, all of which pin an
+ // OpenAI-protocol client anyway — so this branch is what the bare spelling would resolve
+ // to, not what those rows use.
expect(resolveModelEnv("deepseek-v4.1-flash")?.envKey).toBe("DEEPSEEK_API_KEY");
expect(resolveModelEnv("deepseek-v4.1-flash")?.envBaseUrlKey).toBe("DEEPSEEK_BASE_URL");
// The released direct id carries no `deepseek-v4` substring, and AgentHub 0.4.11 routes
@@ -1311,8 +1346,8 @@ describe("resolveModelEnv (PRN-021: env fallback resolved by AgentHub routing ru
);
expect(modelHomepageUrl("fireworks", "my-own-id")).toBe("https://app.fireworks.ai/models");
// Pay-as-you-go resells third-party models under slash-prefixed ids: the id is URL-encoded.
- expect(modelHomepageUrl("qwen-pay-as-you-go", "ZHIPU/GLM-5.2")).toBe(
- "https://www.qianwenai.com/models/ZHIPU%2FGLM-5.2",
+ expect(modelHomepageUrl("qwen-pay-as-you-go", "ZHIPU/GLM-5.3-Flash")).toBe(
+ "https://www.qianwenai.com/models/ZHIPU%2FGLM-5.3-Flash",
);
// Token Plan models link to their qianwenai model page (bare ids, no encoding needed).
expect(modelHomepageUrl("qwen-token-plan", "qwen3.8-max")).toBe(
@@ -1535,21 +1570,22 @@ 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, two on TokenDance and one on OpenRouter. 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.provider === "deepseek" ||
- (m.provider === "penguin-go" && m.modelId.startsWith("deepseek-")) ||
- (m.provider === "tokendance" &&
- ["deepseek-v4.1-flash", "deepseek-v4-flash-vision-exp"].includes(m.modelId)) ||
- (m.provider === "openrouter" && m.modelId === "deepseek/deepseek-v4.1-flash"),
- );
- expect(rows.length).toBeGreaterThan(0);
- // And nothing else in the catalog is on a schedule at all.
- expect(MODEL_CATALOG.filter((m) => m.offPeakDiscount !== undefined).length).toBe(rows.length);
+ // two on Penguin Go, two on TokenDance and one on OpenRouter. 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);
+ expect(rows.map((m) => `${m.provider}/${m.modelId}`)).toEqual([
+ "deepseek/deepseek-flash",
+ "deepseek/deepseek-v4-flash",
+ "deepseek/deepseek-v4-flash-vision-exp",
+ "deepseek/deepseek-v4-pro",
+ "openrouter/deepseek/deepseek-v4.1-flash",
+ "tokendance/deepseek-v4-flash-vision-exp",
+ "tokendance/deepseek-v4.1-flash",
+ "penguin-go/deepseek-flash",
+ "penguin-go/deepseek-v4-pro",
+ ]);
for (const m of rows) {
- expect(m.offPeakDiscount, m.modelId).toBe(S);
// 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.
expect(effectivePricing(m, beijing("2026-08-31T22:00"))!.output * 2).toBeCloseTo(
@@ -1559,12 +1595,102 @@ describe("off-peak schedules", () => {
}
// The published peak figures themselves: CNY 0.04 / 2 / 8 per million, at the catalog's 7:1
// display convention, which is DeepSeek's off-peak 0.02 / 1 / 4 doubled.
- const flash = MODEL_CATALOG.find((m) => m.modelId === "deepseek-v4-flash")!.pricing!;
+ const flash = catalogEntryFor("deepseek", "deepseek-flash")!.pricing!;
expect([flash.cache_read, flash.cache_write, flash.output]).toEqual([
0.005714, 0.285714, 1.142857,
]);
});
+ it("a retired row is never a preset, but a sync still compares it and it still prices a Project's usage on its schedule", () => {
+ const retired = MODEL_CATALOG.filter((m) => m.retired === true);
+ const refs = retired.map((m) => `${m.provider}/${m.modelId}`);
+ expect(refs).toEqual([
+ "deepseek/deepseek-v4-flash",
+ "deepseek/deepseek-v4-flash-vision-exp",
+ "tokendance/deepseek-v4-flash-vision-exp",
+ ]);
+ const presets = new Set(presetModelEntries().map((e) => `${e.provider}/${e.model_id}`));
+ // "Sync presets" compares a Project's table against the whole catalog, retired rows
+ // included, so it keeps updating a retired row the Project carries; the presets a new
+ // Project gets are that same list without them.
+ const all = catalogModelEntries();
+ expect(all.map((e) => `${e.provider}/${e.model_id}`)).toEqual(
+ MODEL_CATALOG.map((m) => `${m.provider}/${m.modelId}`),
+ );
+ expect(presetModelEntries()).toEqual(
+ all.filter((e) => !refs.includes(`${e.provider}/${e.model_id}`)),
+ );
+ const scheduled = new Set(
+ offPeakScheduledRefs().flatMap((g) => g.refs.map((r) => `${r.provider}/${r.modelId}`)),
+ );
+ for (const m of retired) {
+ const ref = `${m.provider}/${m.modelId}`;
+ expect(presets.has(ref), ref).toBe(false);
+ // What a Project still carrying the row reads from the catalog: its name and schedule.
+ expect(catalogEntryFor(m.provider, m.modelId)?.displayName, ref).toBe(m.displayName);
+ expect(scheduled.has(ref), ref).toBe(true);
+ expect(effectivePricing(m, beijing("2026-08-31T22:00"))!.output * 2, ref).toBeCloseTo(
+ m.pricing!.output,
+ 5,
+ );
+ }
+ });
+
+ it("the Qwen DeepSeek rows store the peak price and declare Qwen's own schedule", () => {
+ // Qwen bills the DeepSeek models it sells by its own clock, not DeepSeek's: the model pages
+ // list a peak and an off-peak price, the latter exactly half.
+ const rows = MODEL_CATALOG.filter((m) => m.offPeakDiscount === QWEN_OFF_PEAK);
+ expect(rows.map((m) => `${m.provider}/${m.modelId}`)).toEqual([
+ "qwen-token-plan/deepseek-v4.1-flash",
+ "qwen-token-plan/deepseek-v4-pro-0813",
+ "qwen-pay-as-you-go/deepseek-v4.1-flash",
+ ]);
+ // input / output / cache hit, in CNY per million — the order the model page lists them in.
+ const cnyOf = (usdV: number): number => Math.round(usdV * 7 * 1000) / 1000;
+ const tiers = (m: (typeof rows)[number], at: Date): number[] => {
+ const p = effectivePricing(m, at)!;
+ return [cnyOf(p.cache_write), cnyOf(p.output), cnyOf(p.cache_read)];
+ };
+ const peak = beijing("2026-08-31T10:00");
+ const offPeak = beijing("2026-08-31T23:00");
+ for (const m of rows) {
+ expect(m.discount, m.modelId).toBeUndefined();
+ expect(tiers(m, peak), m.modelId).toEqual(
+ m.modelId === "deepseek-v4-pro-0813" ? [9, 27, 0.9] : [2, 8, 0.2],
+ );
+ expect(tiers(m, offPeak), m.modelId).toEqual(
+ m.modelId === "deepseek-v4-pro-0813" ? [4.5, 13.5, 0.45] : [1, 4, 0.1],
+ );
+ }
+ // The cost center splits its aggregations once per schedule, and these are the only two:
+ // each reference lands under its own schedule, never under the other vendor's windows.
+ const grouped = offPeakScheduledRefs();
+ expect(grouped).toHaveLength(2);
+ expect(grouped[0]!.schedule).toBe(S);
+ expect(grouped[1]!.schedule).toBe(QWEN_OFF_PEAK);
+ expect(grouped[1]!.refs.map((r) => `${r.provider}/${r.modelId}`)).toEqual(
+ rows.map((m) => `${m.provider}/${m.modelId}`),
+ );
+ expect(grouped[0]!.refs.map((r) => `${r.provider}/${r.modelId}`)).toEqual(
+ MODEL_CATALOG.filter((m) => m.offPeakDiscount === S).map((m) => `${m.provider}/${m.modelId}`),
+ );
+ });
+
+ it("Qwen's peak is 08:00-22:00 Beijing on every day of the week", () => {
+ const Q = QWEN_OFF_PEAK;
+ // 2026-08-31 is a Monday: the window ends are exclusive, so 22:00 is already off-peak.
+ expect(offPeakAt(Q, beijing("2026-08-31T08:00"))).toBe(false);
+ expect(offPeakAt(Q, beijing("2026-08-31T21:59"))).toBe(false);
+ expect(offPeakAt(Q, beijing("2026-08-31T07:59"))).toBe(true);
+ expect(offPeakAt(Q, beijing("2026-08-31T22:00"))).toBe(true);
+ expect(offPeakAt(Q, beijing("2026-08-31T03:00"))).toBe(true);
+ // Where the two schedules part: DeepSeek's lunch gap and its weekends are Qwen's peak.
+ expect(offPeakAt(Q, beijing("2026-08-31T13:00"))).toBe(false);
+ expect(offPeakAt(S, beijing("2026-08-31T13:00"))).toBe(true);
+ expect(offPeakAt(Q, beijing("2026-09-06T10:00"))).toBe(false);
+ expect(offPeakAt(S, beijing("2026-09-06T10:00"))).toBe(true);
+ });
+
it("peak is Monday to Friday, 09:00-12:00 and 14:00-18:00 Beijing", () => {
// 2026-08-31 is a Monday.
expect(offPeakAt(S, beijing("2026-08-31T09:00"))).toBe(false);
@@ -1618,4 +1744,12 @@ describe("off-peak schedules", () => {
).map((m) => `${m.provider}/${m.modelId}`);
expect(both).toEqual([]);
});
+
+ it("every schedule is written in Beijing time, the one zone the badge's tooltip names", () => {
+ // Both dictionaries say Beijing time outright rather than spelling out an offset, so a
+ // schedule written in any other zone fails here instead of reaching the tooltip mislabelled.
+ for (const { schedule, refs } of offPeakScheduledRefs()) {
+ expect(schedule.utcOffsetMinutes, `${refs[0]!.provider}/${refs[0]!.modelId}`).toBe(480);
+ }
+ });
});
diff --git a/packages/core/test/state.test.ts b/packages/core/test/state.test.ts
index 57df85ce..f856da79 100644
--- a/packages/core/test/state.test.ts
+++ b/packages/core/test/state.test.ts
@@ -1328,11 +1328,11 @@ describe("project-config round trip", () => {
);
expect(defaultEntry?.client_type).toBe("deepseek-v4");
expect(defaultEntry?.base_url).toBe("https://api.deepseek.com");
- // The catalog is presented in full: provider and model_id are separate columns, model_id
- // being the plain upstream id (vision is only persisted as false for models that don't
- // support images).
+ // The catalog is presented in full, retired rows aside (they are kept only for Projects
+ // that already carry them): provider and model_id are separate columns, model_id being the
+ // plain upstream id (vision is only persisted as false for models that don't support images).
expect(cfg.models.map((m) => [m.provider, m.model_id])).toEqual(
- MODEL_CATALOG.map((m) => [m.provider, m.modelId]),
+ MODEL_CATALOG.filter((m) => m.retired !== true).map((m) => [m.provider, m.modelId]),
);
for (const entry of cfg.models) {
const cat = MODEL_CATALOG.find(
diff --git a/packages/docs/content/models.en.md b/packages/docs/content/models.en.md
index 6b410a2f..49078298 100644
--- a/packages/docs/content/models.en.md
+++ b/packages/docs/content/models.en.md
@@ -81,9 +81,9 @@ The gateway groups (openrouter / fireworks / siliconflow / tokendance / qwen-pay
The preset catalog also carries OpenRouter's free tier: the `:free` model variant `nvidia/nemotron-3-ultra-550b-a55b:free` and the `openrouter/free` unified Free Models Router. They cost nothing, but are subject to OpenRouter's free-tier rate limits and data policy.
-Some models in the preset catalog: deepseek-flash / deepseek-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp (`deepseek-flash` and `deepseek-v4-flash-vision-exp` read images; `deepseek-v4-flash` and `deepseek-v4-pro` are text-only. Since 2026-09-10 the two legacy Flash ids are retired names that DeepSeek serves from V4.1 Flash at the Flash price, which changes what they cost but not what V4 Flash reads: send an image to `deepseek-flash`), 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, kimi-k3, 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) (not exhaustive). Penguin Go's DeepSeek rows follow DeepSeek's current lineup and carry only `deepseek-flash` and `deepseek-v4-pro`. The whole OpenAI line-up is listed twice — directly (your own OpenAI key, list prices) and on OpenRouter as `openai/<id>` (the gateway's rates, which follow its running promotions). DeepSeek's direct-group rows record the official peak tier and declare its off-peak schedule: outside Beijing weekday 9:00–12:00 and 14:00–18:00 every bucket is halved, which the models page marks with a `50% off` badge and the cost center bills at. Three resold rows follow the same schedule, because their sellers pass DeepSeek's own windows through: TokenDance's `deepseek-v4.1-flash` and `deepseek-v4-flash-vision-exp`, and OpenRouter's `deepseek/deepseek-v4.1-flash`. The stored price is always the peak one, so what is on disk does not depend on the hour a Project was created or re-synced in. `glm-5.3-flash` appears three times, and all three rows accept images: AgentHub's GLM client forwards image parts for this one GLM id (every other GLM id refuses them), while the OpenRouter row `z-ai/glm-5.3-flash` and the TokenDance row go through the generic OpenAI-compatible client, which carries them for any id. What the three rows do not share is the price: each records what its own seller charges, so they disagree while a promotion is running.
+Some models in the preset catalog: deepseek-flash / deepseek-v4-pro (`deepseek-flash` is V4.1 Flash and reads images; `deepseek-v4-pro` is the V4 Pro 0813 release and is text-only. DeepSeek still accepts the retired `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp` names and serves them from V4.1 Flash. They are no longer presets, but the catalog keeps them — and TokenDance's `deepseek-v4-flash-vision-exp` — as retired rows: a Project that still has one keeps its name, **Sync presets** keeps its price current but never adds it to a Project without it, and it is priced on its off-peak schedule whenever it stores the catalog price. Send an image to `deepseek-flash`), 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, kimi-k3, 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) (not exhaustive). Penguin Go's DeepSeek rows follow DeepSeek's current lineup and carry only `deepseek-flash` and `deepseek-v4-pro`. The whole OpenAI line-up is listed twice — directly (your own OpenAI key, list prices) and on OpenRouter as `openai/<id>` (the gateway's rates, which follow its running promotions). DeepSeek's direct-group rows record the official peak tier and declare its off-peak schedule: outside Beijing weekday 9:00–12:00 and 14:00–18:00 every bucket is halved, which the models page marks with a `50% off` badge and the cost center bills at. Two resold rows follow the same schedule, because their sellers pass DeepSeek's own windows through: TokenDance's `deepseek-v4.1-flash` and OpenRouter's `deepseek/deepseek-v4.1-flash`. Qwen bills the DeepSeek models it sells on a schedule of its own — half price from 22:00 to 8:00 Beijing time, every day — so `deepseek-v4.1-flash` in both Qwen groups and the Token Plan's `deepseek-v4-pro-0813` declare that one instead, and the badge's tooltip names the windows of whichever schedule the row follows. The stored price is always the peak one, so what is on disk does not depend on the hour a Project was created or re-synced in. GLM-5.3 Flash appears five times — directly as `glm-5.3-flash`, under the same id on TokenDance, and as OpenRouter's `z-ai/glm-5.3-flash`, Fireworks AI's `accounts/fireworks/models/glm-5p3-flash` and Qwen Pay-As-You-Go's `ZHIPU/GLM-5.3-Flash` — and every row accepts images: AgentHub's GLM client forwards image parts for this one GLM id (every other GLM id refuses them), while the gateway rows go through the generic OpenAI-compatible clients, which carry them for any id. What the rows do not share is the price: each records what its own seller charges, so they disagree while a promotion is running.
-TokenDance rows record the gateway's list price and, where a promotion is running, the rate off it. Nine models are discounted today — `deepseek-v4-flash-0731`, `deepseek-v4-pro-0813` and `kimi-k3` at 20% off, `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%. Two further rows carry no flat discount and instead follow DeepSeek's own off-peak schedule, described above. Their model cards show the price being billed right now, with the rate as a badge. A Project is preset with the **list** price: the server stores the promotion beside it (in `web.db`, not in `.project_config.toml`) and takes it off when usage is priced, so the cost center charges what the gateway charges. Editing a row's price yourself cancels its promotion and keeps any off-peak decoration off the card: the figure is then yours, not the gateway's.
+TokenDance rows record the gateway's list price and, where a promotion is running, the rate off it. Nine 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%, and the three Doubao Seed rows (`seed-2.1-pro`, `seed-2.1-turbo`, `seed-evolving`) at 50%. One further row, `deepseek-v4.1-flash`, carries no flat discount and instead follows DeepSeek's own off-peak schedule, described above. Their model cards show the price being billed right now, with the rate as a badge. A Project is preset with the **list** price: the server stores the promotion beside it (in `web.db`, not in `.project_config.toml`) and takes it off when usage is priced, so the cost center charges what the gateway charges. Editing a row's price yourself cancels its promotion and keeps any off-peak decoration off the card: the figure is then yours, not the gateway's.
## App attribution
diff --git a/packages/docs/content/models.zh.md b/packages/docs/content/models.zh.md
index 13a92e34..47fbe8f3 100644
--- a/packages/docs/content/models.zh.md
+++ b/packages/docs/content/models.zh.md
@@ -81,9 +81,9 @@ api_key = "sk-..."
预置目录还收录了 OpenRouter 的免费档:`:free` 模型变体 `nvidia/nemotron-3-ultra-550b-a55b:free` 与统一路由 `openrouter/free`(Free Models Router),零成本可用,但受 OpenRouter 免费档速率限制与数据政策约束。
-预置目录中的部分模型:deepseek-flash / deepseek-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp(其中 `deepseek-flash`、`deepseek-v4-flash-vision-exp` 支持图像输入,`deepseek-v4-flash` 与 `deepseek-v4-pro` 为纯文本。自 2026-09-10 起,两个 V4 Flash id 已是退役名称,DeepSeek 改由 V4.1 Flash 承接、按 Flash 价计费——变的是价格,不是 V4 Flash 能读什么:要发图请用 `deepseek-flash`)、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、kimi-k3、qwen3.8-max / qwen3.8-flash、seed-2.1-pro / seed-2.1-turbo / seed-evolving、dots-3-note-preview(TokenDance 上免费,512K 上下文)等(非完整清单)。Penguin Go 分组的 DeepSeek 条目跟随 DeepSeek 当前的模型阵容,只收录 `deepseek-flash` 与 `deepseek-v4-pro`。OpenAI 全系列都收录了两份——直连(用自己的 OpenAI Key,记牌价)与 OpenRouter 上的 `openai/<id>`(记网关实际计费价,会随其促销浮动)。DeepSeek 直连分组的条目记录官方高峰档,并声明其空闲时段规则:在北京时间周一至周五 9:00–12:00、14:00–18:00 之外,各档价格减半——模型页以「省 50%」徽标标记,成本中心按此计价。另有三条转售条目沿用同一套时段,因为卖家原样传递了 DeepSeek 自己的窗口:TokenDance 的 `deepseek-v4.1-flash` 与 `deepseek-v4-flash-vision-exp`,以及 OpenRouter 的 `deepseek/deepseek-v4.1-flash`。存盘的始终是高峰价,因此磁盘上的数字不会随 Project 创建或同步预置的时刻而变。`glm-5.3-flash` 收录了三份,三条都支持图像输入:AgentHub 的 GLM 客户端只为这一个 GLM id 转发图像部件(其余 GLM id 一律拒绝),而 OpenRouter 上的 `z-ai/glm-5.3-flash` 与 TokenDance 分组的同名条目走通用 OpenAI 兼容客户端,对任何 id 都能携带图片。三条不一致的是价格:每一条都记录各自卖家的收费,因此促销期间三者不同。
+预置目录中的部分模型:deepseek-flash / deepseek-v4-pro(`deepseek-flash` 即 V4.1 Flash,支持图像输入;`deepseek-v4-pro` 是 V4 Pro 0813 版本,为纯文本。退役的 `deepseek-v4-flash` 与 `deepseek-v4-flash-vision-exp` 仍被 DeepSeek 接受、由 V4.1 Flash 承接。它们不再是预置条目,但目录把它们连同 TokenDance 的 `deepseek-v4-flash-vision-exp` 作为退役条目保留:仍带着这些模型的 Project 照旧显示其名称,「同步预置」会继续更新其价格、但不会把它们补进没有它们的 Project,行上存的是目录价时按空闲时段计价。要发图请用 `deepseek-flash`)、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、kimi-k3、qwen3.8-max / qwen3.8-flash、seed-2.1-pro / seed-2.1-turbo / seed-evolving、dots-3-note-preview(TokenDance 上免费,512K 上下文)等(非完整清单)。Penguin Go 分组的 DeepSeek 条目跟随 DeepSeek 当前的模型阵容,只收录 `deepseek-flash` 与 `deepseek-v4-pro`。OpenAI 全系列都收录了两份——直连(用自己的 OpenAI Key,记牌价)与 OpenRouter 上的 `openai/<id>`(记网关实际计费价,会随其促销浮动)。DeepSeek 直连分组的条目记录官方高峰档,并声明其空闲时段规则:在北京时间周一至周五 9:00–12:00、14:00–18:00 之外,各档价格减半——模型页以「省 50%」徽标标记,成本中心按此计价。另有两条转售条目沿用同一套时段,因为卖家原样传递了 DeepSeek 自己的窗口:TokenDance 的 `deepseek-v4.1-flash` 与 OpenRouter 的 `deepseek/deepseek-v4.1-flash`。Qwen 转售的 DeepSeek 模型则按它自己的时段计费——北京时间每天 22:00 至次日 8:00 半价——因此两个 Qwen 分组的 `deepseek-v4.1-flash` 与 Token Plan 的 `deepseek-v4-pro-0813` 声明的是这一套,折扣徽标的悬停说明写的也是该条目所遵循时段的窗口。存盘的始终是高峰价,因此磁盘上的数字不会随 Project 创建或同步预置的时刻而变。GLM-5.3 Flash 收录了五份——直连的 `glm-5.3-flash`、TokenDance 分组的同名条目,以及 OpenRouter 的 `z-ai/glm-5.3-flash`、Fireworks AI 的 `accounts/fireworks/models/glm-5p3-flash` 与 Qwen 按量付费的 `ZHIPU/GLM-5.3-Flash`——每一条都支持图像输入:AgentHub 的 GLM 客户端只为这一个 GLM id 转发图像部件(其余 GLM id 一律拒绝),而各网关条目走通用 OpenAI 兼容客户端,对任何 id 都能携带图片。各条不一致的是价格:每一条都记录各自卖家的收费,因此促销期间彼此不同。
-TokenDance 分组的条目记录该网关的牌价,并在有促销时记录折扣率。当前有九个模型处于折扣中——`deepseek-v4-flash-0731`、`deepseek-v4-pro-0813` 与 `kimi-k3` 八折,`glm-5.3`、`glm-5.3-flash` 与 `qwen3.8-max` 九折,三条 Doubao Seed 条目(`seed-2.1-pro`、`seed-2.1-turbo`、`seed-evolving`)五折。另有两条条目不走固定折扣,而是沿用上文所述 DeepSeek 自己的空闲时段规则。它们的模型卡片显示当前实际计费的那个价格,并以徽标标出折扣率。新建 Project 预置的是**牌价**:折扣率由服务端另行保存(存于 `web.db`,不写入 `.project_config.toml`),计算成本时再从牌价中扣除,因此成本中心按网关实际收费计价。自行修改条目的价格会取消其促销,也不再显示空闲时段折扣标记:此时那个数字属于你,而不是网关。
+TokenDance 分组的条目记录该网关的牌价,并在有促销时记录折扣率。当前有九个模型处于折扣中——`kimi-k3` 六折,`deepseek-v4-flash-0731`、`deepseek-v4-pro-0813`、`glm-5.3`、`glm-5.3-flash` 与 `qwen3.8-max` 九折,三条 Doubao Seed 条目(`seed-2.1-pro`、`seed-2.1-turbo`、`seed-evolving`)五折。另有一条 `deepseek-v4.1-flash` 不走固定折扣,而是沿用上文所述 DeepSeek 自己的空闲时段规则。它们的模型卡片显示当前实际计费的那个价格,并以徽标标出折扣率。新建 Project 预置的是**牌价**:折扣率由服务端另行保存(存于 `web.db`,不写入 `.project_config.toml`),计算成本时再从牌价中扣除,因此成本中心按网关实际收费计价。自行修改条目的价格会取消其促销,也不再显示空闲时段折扣标记:此时那个数字属于你,而不是网关。
## 应用归因
diff --git a/packages/server/test/models.test.ts b/packages/server/test/models.test.ts
index 9ecd521f..606728e0 100644
--- a/packages/server/test/models.test.ts
+++ b/packages/server/test/models.test.ts
@@ -34,8 +34,10 @@ import { apiClient, createTestApp, loginAdmin, provisionUser, waitFor } from "./
import type { TestApp } from "./helpers.js";
import { wire } from "@prismshadow/penguin-core/kernel";
-/** Catalog paired refs (config primary key = (provider, model_id)). */
-const catalogPairs = MODEL_CATALOG.map((m) => `${m.provider}\0${m.modelId}`);
+/** Preset paired refs (config primary key = (provider, model_id)): retired catalog rows are not presets. */
+const catalogPairs = MODEL_CATALOG.filter((m) => m.retired !== true).map(
+ (m) => `${m.provider}\0${m.modelId}`,
+);
/** Response row → comparable paired key (test-only comparison, not the storage format). */
const pairKey = (m: { provider: string; modelId: string }): string => `${m.provider}\0${m.modelId}`;
/** Fetch a row by its paired ref. */
@@ -110,6 +112,11 @@ describe("models preset & catalog enrichment", () => {
modelId: "deepseek-flash",
});
expect(body.models.map(pairKey)).toEqual(catalogPairs);
+ // A retired catalog row is kept only for the Projects that already carry it, so a new
+ // Project gets none of them.
+ const retired = MODEL_CATALOG.filter((m) => m.retired === true).map(pairKey);
+ expect(retired.length).toBeGreaterThan(0);
+ expect(body.models.map(pairKey).filter((key) => retired.includes(key))).toEqual([]);
const sonnet = pick(body, "anthropic", "claude-sonnet-4-6");
expect(sonnet.isDefault).toBe(false);
@@ -637,8 +644,8 @@ describe("model-reference rekeying and the connectivity test", () => {
// that record's own timestamp when the usage is aggregated, so the price lookup's whole job
// is to say what the two tiers are. The number on disk is the peak one either way.
const svc = wire(ProjectConfigService, { paths: { root: t.root } });
- const rates = await svc.getPricing(projectId, "deepseek", "deepseek-v4-flash");
- const catalogPeak = catalogEntryFor("deepseek", "deepseek-v4-flash")!.pricing!;
+ const rates = await svc.getPricing(projectId, "deepseek", "deepseek-flash");
+ const catalogPeak = catalogEntryFor("deepseek", "deepseek-flash")!.pricing!;
expect(rates!.peak.output).toBe(catalogPeak.output);
expect(rates!.offPeak.output).toBeCloseTo(catalogPeak.output / 2, 5);
expect(rates!.peak.cacheRead).toBe(catalogPeak.cache_read);
@@ -653,7 +660,7 @@ describe("model-reference rekeying and the connectivity test", () => {
...(m.pricing
? {
pricing:
- m.provider === "deepseek" && m.modelId === "deepseek-v4-flash"
+ m.provider === "deepseek" && m.modelId === "deepseek-flash"
? { cacheRead: 1, cacheWrite: 2, output: 3 }
: {
cacheRead: m.pricing.cacheRead,
@@ -668,7 +675,7 @@ describe("model-reference rekeying and the connectivity test", () => {
// Nothing here knows whether 3 is a peak rate, so halving it would invent a discount: the
// two tiers collapse to the typed number and the split costs a row and changes nothing.
const typed = { cacheRead: 1, cacheWrite: 2, output: 3 };
- expect(await svc.getPricing(projectId, "deepseek", "deepseek-v4-flash")).toEqual({
+ expect(await svc.getPricing(projectId, "deepseek", "deepseek-flash")).toEqual({
peak: typed,
offPeak: typed,
});
diff --git a/packages/server/test/trace-service.test.ts b/packages/server/test/trace-service.test.ts
index 88f8c2d6..928cc9d7 100644
--- a/packages/server/test/trace-service.test.ts
+++ b/packages/server/test/trace-service.test.ts
@@ -223,7 +223,7 @@ describe("trace-service", () => {
it("prices each Request at the tier its own timestamp ran in, and the file adds up to what the cost center bills the same rows", async () => {
// A DeepSeek reference carries the catalog's Beijing-hours schedule; the lookup answers
// both tiers, as project-config-service does for a row still at the catalog's price.
- const REF = { provider: "deepseek", model_id: "deepseek-v4-flash" };
+ const REF = { provider: "deepseek", model_id: "deepseek-flash" };
const lookups: string[] = [];
const lookup: PricingLookup = async (projectId, provider, modelId) => {
lookups.push(`${projectId}/${provider}/${modelId}`);
@@ -250,7 +250,7 @@ describe("trace-service", () => {
const peakCost = (10 * 1 + 1 * 2 + 5 * 4) / 1e6;
expect(a.tasks.map((t) => t.cost)).toEqual([peakCost, peakCost / 2, peakCost / 2]);
expect(a.cost).toBeCloseTo(peakCost * 2, 12);
- expect(lookups).toEqual([`${P}/deepseek/deepseek-v4-flash`]);
+ expect(lookups).toEqual([`${P}/deepseek/deepseek-flash`]);
// The same three requests as usage rows, priced by the cost center's session grouping —
// the figure the conversation toolbar shows — land on the file's total.
diff --git a/packages/server/test/usage.test.ts b/packages/server/test/usage.test.ts
index 9adad1c9..f0b1ea5e 100644
--- a/packages/server/test/usage.test.ts
+++ b/packages/server/test/usage.test.ts
@@ -159,10 +159,10 @@ describe("usage-service (cost computed on the fly)", () => {
// is a fact about when each request ran, so it is decided from that record's own `ts`.
//
// 2026-08-31 is a Monday. 01:30Z is 09:30 in Beijing (peak); 12:00Z is 20:00 (off-peak).
- const REF = { provider: "deepseek", modelId: "deepseek-v4-flash" };
+ const REF = { provider: "deepseek", modelId: "deepseek-flash" };
insert("2026-08-31", { ...REF, ts: "2026-08-31T01:30:00.000Z" });
insert("2026-08-31", { ...REF, ts: "2026-08-31T12:00:00.000Z" });
- pricing["deepseek-v4-flash"] = { cacheRead: 1, cacheWrite: 2, output: 4 };
+ pricing["deepseek-flash"] = { cacheRead: 1, cacheWrite: 2, output: 4 };
const tiered = async () => ({
peak: { cacheRead: 1, cacheWrite: 2, output: 4 },
offPeak: { cacheRead: 0.5, cacheWrite: 1, output: 2 },
@@ -183,6 +183,33 @@ describe("usage-service (cost computed on the fly)", () => {
}
});
+ it("each scheduled reference is priced by its own seller's windows in the same query", async () => {
+ // Two schedules in the catalog: Qwen's DeepSeek rows bill peak 08:00-22:00 Beijing every
+ // day, DeepSeek's own rows only in weekday office hours. 2026-09-05 is a Saturday: 02:00Z
+ // is 10:00 in Beijing (peak for Qwen, off-peak for DeepSeek), 15:00Z is 23:00 (off-peak for
+ // both).
+ const QWEN = { provider: "qwen-pay-as-you-go", modelId: "deepseek-v4.1-flash" };
+ const DEEPSEEK = { provider: "deepseek", modelId: "deepseek-flash" };
+ insert("2026-09-05", { ...QWEN, ts: "2026-09-05T02:00:00.000Z" });
+ insert("2026-09-05", { ...QWEN, ts: "2026-09-05T15:00:00.000Z" });
+ insert("2026-09-05", { ...DEEPSEEK, ts: "2026-09-05T02:00:00.000Z" });
+ const svc = wire(UsageService, {
+ usage: repo,
+ errors: wire(ErrorsRepo, { db: db }),
+ lookupPricing: async () => ({
+ peak: { cacheRead: 1, cacheWrite: 2, output: 4 },
+ offPeak: { cacheRead: 0.5, cacheWrite: 1, output: 2 },
+ }),
+ clock: { now: () => new Date("2026-09-05T12:00:00Z") },
+ });
+ const res = await svc.query("p1", { groupBy: "model", from: "2026-09-05", to: "2026-09-05" });
+ const costOf = (ref: { provider: string; modelId: string }) =>
+ res.groups.find((g) => g.provider === ref.provider && g.key === ref.modelId)?.cost;
+ const peakCost = (10 * 1 + 1 * 2 + 5 * 4) / 1e6;
+ expect(costOf(QWEN)).toBeCloseTo(peakCost + peakCost / 2, 10);
+ expect(costOf(DEEPSEEK)).toBeCloseTo(peakCost / 2, 10);
+ });
+
it("summary cards: today / last 7 days / cumulative; Models without pricing flag hasUncosted", async () => {
const now = new Date("2026-07-06T10:00:00");
const today = formatLocalDate(now);
diff --git a/packages/web/src/features/models/catalog-sync.ts b/packages/web/src/features/models/catalog-sync.ts
index 480df29d..0b5972e1 100644
--- a/packages/web/src/features/models/catalog-sync.ts
+++ b/packages/web/src/features/models/catalog-sync.ts
@@ -4,7 +4,9 @@
* entries present on both sides are reset to the catalog's fields (context window, pricing,
* protocol, base URL, vision, and the promotion — the catalog wins wherever the two differ).
* Missing catalog pricing removes local pricing, and a missing catalog promotion removes the
- * stored one. Locally added models (including user-defined groups) are kept untouched.
+ * stored one. Locally added models (including user-defined groups) are kept untouched. A retired
+ * catalog entry (see `ModelCatalogEntry.retired`) is never added, but one configured locally is
+ * reset like any other preset, which is what keeps its stored price on the catalog's.
* Credentials are never touched: merged rows carry no apiKey input (the PUT keeps the stored
* key) and existing rows keep their credential display state.
*
@@ -17,13 +19,13 @@
import {
PENGUIN_GO_PROVIDER_ID,
catalogEntryFor,
- presetModelEntries,
+ catalogModelEntries,
} from "@prismshadow/penguin-core/model-catalog";
import type { ModelsResponse } from "@prismshadow/penguin-server/api";
import { fractionOff } from "./model-grouping";
import type { RowState } from "./models-page";
-type PresetEntry = ReturnType<typeof presetModelEntries>[number];
+type PresetEntry = ReturnType<typeof catalogModelEntries>[number];
/** One saved model entry, as the models endpoint sends it. */
type ModelDto = ModelsResponse["models"][number];
@@ -60,7 +62,7 @@ function presetFields(p: PresetEntry) {
* reported as "") leaves the row labelled by its raw model id and is worth repairing. The cost
* of that trade is that a deliberately cleared name comes back on the next sync.
*
- * The name comes from the catalog rather than from `p`: `presetModelEntries` emits the
+ * The name comes from the catalog rather than from `p`: `catalogModelEntries` emits the
* PERSISTED entry shape, whose `display_name` is only written when it differs from the
* catalog, so a preset entry never carries one. Every catalog entry is named
* (`ModelCatalogEntry.displayName` is required), so the undefined result means the pair is not
@@ -112,6 +114,15 @@ function declared(promotion: CatalogPromotion): Pick<RowState, "discount" | "dis
return { discount: promotion.discount, discountDeclared: true };
}
+/**
+ * Whether the catalog keeps `p` only for the Projects that already carry it (see
+ * `ModelCatalogEntry.retired`): a sync updates such an entry where it is configured and never adds
+ * it where it is not. Looked up in the catalog, like the name and the promotion.
+ */
+function isRetired(p: PresetEntry): boolean {
+ return catalogEntryFor(p.provider, p.model_id)?.retired === true;
+}
+
/** A brand-new row for a catalog entry not configured locally (original: null -> added on PUT). */
function presetToRow(p: PresetEntry): RowState {
const displayName = displayNameFill(p, undefined);
@@ -173,21 +184,23 @@ export interface CatalogDelta {
* anyone opens the page.
*
* The same union `syncRowsWithCatalog` applies, so the two cannot disagree about whether there
- * is anything to do: catalog entries the table does not carry are additions, entries it does
- * carry whose catalog-owned fields differ — a promotion-only difference included, outside the
- * Penguin Go group — or whose display name is blank are updates, and locally added models are
- * invisible to both. `refs` is what a dismissal is stamped against, so a later catalog release
- * touching a different model raises the badge again (see `lib/todo-badges.ts`).
+ * is anything to do: catalog entries the table does not carry are additions (retired ones
+ * never are), entries it does carry whose catalog-owned fields differ — a promotion-only
+ * difference included, outside the Penguin Go group — or whose display name is blank are
+ * updates, and locally added models are invisible to both. `refs` is what a dismissal is stamped
+ * against, so a later catalog release touching a different model raises the badge again (see
+ * `lib/todo-badges.ts`).
*/
export function catalogDelta(
models: readonly ModelDto[],
- preset: PresetEntry[] = presetModelEntries(),
+ preset: PresetEntry[] = catalogModelEntries(),
): CatalogDelta {
const saved = new Map(models.map((m) => [`${m.provider}\0${m.modelId}`, m]));
const delta: CatalogDelta = { added: 0, updated: 0, refs: [] };
for (const p of preset) {
const entry = saved.get(`${p.provider}\0${p.model_id}`);
if (entry === undefined) {
+ if (isRetired(p)) continue;
delta.added += 1;
delta.refs.push(`${p.provider}/${p.model_id}`);
continue;
@@ -211,8 +224,9 @@ export function catalogDelta(
/**
* Merges the current rows with the built-in catalog. Existing rows keep their identity,
* credential state, and list position (fields are updated in place); catalog-only entries
- * are appended in catalog order. Returns the merged rows plus added/updated counts for the
- * success toast (updated counts only rows the merge actually rewrote).
+ * other than retired ones are appended in catalog order. Returns the merged rows plus
+ * added/updated counts for the success toast (updated counts only rows the merge actually
+ * rewrote).
*
* Every preset row outside the Penguin Go group leaves the merge declaring its catalog
* promotion, rewritten or not (see catalogPromotion), so such a row is a new object even when
@@ -221,7 +235,7 @@ export function catalogDelta(
*/
export function syncRowsWithCatalog(
rows: RowState[],
- preset: PresetEntry[] = presetModelEntries(),
+ preset: PresetEntry[] = catalogModelEntries(),
): { rows: RowState[]; added: number; updated: number } {
const key = (provider: string, modelId: string) => `${provider}\0${modelId}`;
const index = new Map(rows.map((r, i) => [key(r.provider, r.modelId), i]));
@@ -231,6 +245,7 @@ export function syncRowsWithCatalog(
for (const p of preset) {
const i = index.get(key(p.provider, p.model_id));
if (i === undefined) {
+ if (isRetired(p)) continue;
next.push(presetToRow(p));
added += 1;
continue;
diff --git a/packages/web/src/features/models/model-grouping.ts b/packages/web/src/features/models/model-grouping.ts
index 6872d52f..3182b910 100644
--- a/packages/web/src/features/models/model-grouping.ts
+++ b/packages/web/src/features/models/model-grouping.ts
@@ -21,7 +21,7 @@ import {
catalogEntryFor,
offPeakAt,
} from "@prismshadow/penguin-core/model-catalog";
-import type { ModelProviderInfo } from "@prismshadow/penguin-core/model-catalog";
+import type { ModelProviderInfo, OffPeakDiscount } from "@prismshadow/penguin-core/model-catalog";
import { orderModelGroups } from "./model-group-order";
@@ -208,10 +208,44 @@ export interface DiscountedPrice {
*/
billed: BucketPrices;
/**
- * True when the saving is the time-of-day tier alone, so the badge can explain when it
- * applies. A row that also runs a promotion is explained as the promotion.
+ * When the saving is the time-of-day tier alone, the peak windows of the row's own schedule —
+ * the hours it bills at list price instead — so the badge can explain when the rate applies.
+ * Absent otherwise: a row that also runs a promotion is explained as the promotion.
*/
- scheduled: boolean;
+ peak?: PeakWindows;
+}
+
+/**
+ * A schedule's peak windows reduced to the parts a sentence about them needs. Each dictionary
+ * spells this one digest in its own words, so the explanation follows the schedule a row
+ * actually declares; the catalog carries more than one vendor's windows. Both name the zone as
+ * Beijing time: every catalog schedule is written in UTC+8, which the catalog's tests pin.
+ */
+export interface PeakWindows {
+ /**
+ * The ISO weekdays the windows fall on (1 = Monday … 7 = Sunday), as inclusive runs of
+ * consecutive days: `[[1, 5]]` is Monday to Friday.
+ */
+ days: Array<[number, number]>;
+ /** The runs cover the whole week, so the windows recur daily. */
+ everyDay: boolean;
+ /** The windows on those days, as whole-hour `[start, end)` pairs in Beijing time. */
+ hours: OffPeakDiscount["peakHours"];
+}
+
+/** The digest of one schedule's peak windows (see PeakWindows). */
+export function peakWindows(schedule: OffPeakDiscount): PeakWindows {
+ const days: Array<[number, number]> = [];
+ for (const day of schedule.peakDays) {
+ const run = days.at(-1);
+ if (run !== undefined && run[1] === day - 1) run[1] = day;
+ else days.push([day, day]);
+ }
+ return {
+ days,
+ everyDay: days.length === 1 && days[0]![0] === 1 && days[0]![1] === 7,
+ hours: schedule.peakHours,
+ };
}
/** The three price buckets in USD per million tokens, in the numeric shape the DTO carries. */
@@ -301,7 +335,9 @@ export function discountedPrice(
return {
percent: Math.round((promotion + tier - promotion * tier) * 100),
billed: { cacheRead: off(cacheRead), cacheWrite: off(cacheWrite), output: off(output) },
- scheduled: tier > 0 && promotion === 0,
+ ...(schedule !== undefined && tier > 0 && promotion === 0
+ ? { peak: peakWindows(schedule) }
+ : {}),
};
}
diff --git a/packages/web/src/features/models/models-page.tsx b/packages/web/src/features/models/models-page.tsx
index c63fbf08..918a7992 100644
--- a/packages/web/src/features/models/models-page.tsx
+++ b/packages/web/src/features/models/models-page.tsx
@@ -2155,8 +2155,8 @@ function ModelCard({
{
key: "discount",
label: S.models.discountBadge(discount.percent),
- title: discount.scheduled
- ? S.models.offPeakTitle(discount.percent)
+ title: discount.peak
+ ? S.models.offPeakTitle(discount.percent, discount.peak)
: S.models.discountTitle(discount.percent),
className: TAG_INK.price,
},
diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.ts
index be7c7c8d..2776e7f8 100644
--- a/packages/web/src/lib/strings-en.ts
+++ b/packages/web/src/lib/strings-en.ts
@@ -5,6 +5,7 @@
* "agent" is a common noun: lowercase mid-sentence, capitalized only at the start
* of a label/sentence or in a proper name (Agent State, AgentHub).
*/
+import type { PeakWindows } from "../features/models/model-grouping";
import type { Strings } from "./strings";
export const en: Strings = {
@@ -1127,8 +1128,19 @@ export const en: Strings = {
recommendedGroup: "Recommended",
discountBadge: (pct: number): string => `${pct}% off`,
discountTitle: (pct: number): string => `Promotion: ${pct}% off the list price`,
- offPeakTitle: (pct: number): string =>
- `Off-peak rate: ${pct}% off list. Peak hours bill at list price — 09:00–12:00 and 14:00–18:00 Beijing time, Monday to Friday`,
+ offPeakTitle: (pct: number, peak: PeakWindows): string => {
+ const day = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
+ const days = peak.everyDay
+ ? "every day"
+ : peak.days
+ .map(([from, to]) =>
+ from === to ? day[from - 1] : `${day[from - 1]} to ${day[to - 1]}`,
+ )
+ .join(", ");
+ const clock = (hour: number): string => `${String(hour).padStart(2, "0")}:00`;
+ const hours = peak.hours.map(([from, to]) => `${clock(from)}–${clock(to)}`).join(" and ");
+ return `Off-peak rate: ${pct}% off list. Peak hours bill at list price — ${hours} Beijing time, ${days}`;
+ },
visionModelBadge: "Proxy vision",
usedTokens: (v: string) => `${v} toks`,
usedTokensTitle: "Tokens this model has used, all time",
diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.ts
index 29412c76..8326712b 100644
--- a/packages/web/src/lib/strings.ts
+++ b/packages/web/src/lib/strings.ts
@@ -11,6 +11,8 @@
* 「智能体」 — the nav entry, the grouping option, the panel — and keeps "Agent" as-is
* inside running prose, where it is the term of art rather than the thing being pointed at.
*/
+import type { PeakWindows } from "../features/models/model-grouping";
+
export const zh = {
appName: "PenguinHarness",
@@ -1128,9 +1130,21 @@ export const zh = {
/** Badge on a row the seller is currently discounting: the rate off its list price. */
discountBadge: (pct: number): string => `省 ${pct}%`,
discountTitle: (pct: number): string => `促销价:已在牌价基础上打 ${pct}% 折扣`,
- /** Same badge as a flat promotion; only the explanation differs, because this rate comes and goes with the clock. */
- offPeakTitle: (pct: number): string =>
- `空闲时段价:比牌价低 ${pct}%。高峰时段按牌价计费——北京时间周一至周五 9:00–12:00、14:00–18:00`,
+ /**
+ * Same badge as a flat promotion; only the explanation differs, because this rate comes and
+ * goes with the clock. `peak` is the row's own schedule (see peakWindows), so each seller's
+ * peak hours are the ones named.
+ */
+ offPeakTitle: (pct: number, peak: PeakWindows): string => {
+ const day = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
+ const days = peak.everyDay
+ ? "每天"
+ : peak.days
+ .map(([from, to]) => (from === to ? day[from - 1] : `${day[from - 1]}至${day[to - 1]}`))
+ .join("、");
+ const hours = peak.hours.map(([from, to]) => `${from}:00–${to}:00`).join("、");
+ return `空闲时段价:比牌价低 ${pct}%。高峰时段按牌价计费——北京时间${days} ${hours}`;
+ },
visionModelBadge: "视觉代理",
/** Card's right-edge figure: what this model has spent over its whole life. The unit stays English and is abbreviated the way the rest of the page abbreviates it — `tok/s`, `/M tok`. */
usedTokens: (v: string) => `${v} toks`,
diff --git a/packages/web/test/catalog-sync.test.ts b/packages/web/test/catalog-sync.test.ts
index a14a0f1b..1e396984 100644
--- a/packages/web/test/catalog-sync.test.ts
+++ b/packages/web/test/catalog-sync.test.ts
@@ -2,8 +2,9 @@
* catalog-sync.ts unit tests: the "sync presets" merge — union of the local model table and
* the built-in catalog, catalog winning on differing preset entries (their promotion included,
* outside the Penguin Go group), local additions and credentials untouched, the display name
- * filled but never overwritten — plus `catalogDelta`, the same question asked of a saved table
- * so the Models nav badge can answer it before the page has loaded any rows.
+ * filled but never overwritten, a retired catalog row updated where the table carries it and
+ * never added — plus `catalogDelta`, the same question asked of a saved table so the Models nav
+ * badge can answer it before the page has loaded any rows.
*
* The last block is the one that matters most: the badge and the button must never disagree
* about whether there is anything to do, so every case above is replayed through both.
@@ -12,6 +13,7 @@ import { describe, expect, it } from "vitest";
import {
PENGUIN_GO_PROVIDER_ID,
catalogEntryFor,
+ catalogModelEntries,
presetModelEntries,
} from "@prismshadow/penguin-core/model-catalog";
import type { ModelsResponse } from "@prismshadow/penguin-server/api";
@@ -89,7 +91,7 @@ const PRESET: PresetEntry[] = [
},
{
provider: "qwen-token-plan",
- model_id: "glm-5.2",
+ model_id: "glm-5.3",
context_window: 1048576,
client_type: "openai-chat",
pricing: { unit: "usd_per_mtok", cache_read: 0.285714, cache_write: 1.142857, output: 4 },
@@ -123,12 +125,23 @@ const PENGUIN_GO: PresetEntry = presetModelEntries().find(
(p) => p.provider === PENGUIN_GO_PROVIDER_ID,
)!;
+/**
+ * A retired catalog row (see `ModelCatalogEntry.retired`), found rather than named: the catalog
+ * keeps one only for the Projects created while it was still a preset.
+ */
+const RETIRED: PresetEntry = catalogModelEntries().find(
+ (p) => catalogEntryFor(p.provider, p.model_id)?.retired === true,
+)!;
+
+/** A price no catalog row carries, standing in for one an older release stored. */
+const STALE_PRICING = { cacheRead: 1, cacheWrite: 2, output: 3 } as ModelDto["pricing"];
+
describe("syncRowsWithCatalog", () => {
it("adds catalog entries missing locally (gateway base URL preset, original null -> new on PUT)", () => {
const { rows, added, updated } = syncRowsWithCatalog([], PRESET);
expect(added).toBe(3);
expect(updated).toBe(0);
- const glm = rows.find((r) => r.provider === "qwen-token-plan" && r.modelId === "glm-5.2")!;
+ const glm = rows.find((r) => r.provider === "qwen-token-plan" && r.modelId === "glm-5.3")!;
expect(glm.original).toBeNull();
expect(glm.clientType).toBe("openai-chat");
expect(glm.baseUrl).toBe("https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1");
@@ -138,7 +151,7 @@ describe("syncRowsWithCatalog", () => {
// The catalog's name travels with the new row: a preset entry carries none (the persisted
// shape only stores a name that differs from the catalog), so a row built without it would
// reach the PUT nameless and be saved as a model whose name the user cleared.
- expect(glm.displayName).toBe(catalogName("qwen-token-plan", "glm-5.2"));
+ expect(glm.displayName).toBe(catalogName("qwen-token-plan", "glm-5.3"));
// The lookup is against the shipped catalog, not against this list: `qwen3.8-max-preview`
// left the Token Plan lineup, so the pair resolves to nothing and the row stays nameless
// (falling back to its model id) rather than picking up an empty name.
@@ -216,7 +229,7 @@ describe("syncRowsWithCatalog", () => {
expect(row.contextWindow).toBe("1000000"); // catalog-owned field reset
expect(row.maxTokens).toBe("4096"); // user field survives the {...row, ...fields} merge
// Fresh catalog rows default to inherit (no preset output cap exists).
- expect(rows.find((r) => r.modelId === "glm-5.2")!.maxTokens).toBe("");
+ expect(rows.find((r) => r.modelId === "glm-5.3")!.maxTokens).toBe("");
});
it("keeps locally added models (including user-defined groups) verbatim and in place", () => {
@@ -395,7 +408,7 @@ describe("catalogDelta", () => {
updated: 1,
refs: [
"deepseek/deepseek-v4-pro",
- "qwen-token-plan/glm-5.2",
+ "qwen-token-plan/glm-5.3",
"qwen-token-plan/qwen3.8-max-preview",
],
});
@@ -411,7 +424,7 @@ describe("catalogDelta", () => {
updated: 1,
refs: [
"deepseek/deepseek-v4-pro",
- "qwen-token-plan/glm-5.2",
+ "qwen-token-plan/glm-5.3",
"qwen-token-plan/qwen3.8-max-preview",
],
});
@@ -439,7 +452,7 @@ describe("catalogDelta", () => {
* read the same way, or a dot would lead to a button answering "already up to date".
*/
it("agrees with the sync merge on every table shape, against the real catalog", () => {
- const presets = [...PRESET, PROMOTED, PENGUIN_GO];
+ const presets = [...PRESET, PROMOTED, PENGUIN_GO, RETIRED];
const tables: ModelDto[][] = [
[],
[makeDto({ provider: "deepseek", modelId: "deepseek-v4-pro" })],
@@ -447,7 +460,7 @@ describe("catalogDelta", () => {
[
makeDto({
provider: "qwen-token-plan",
- modelId: "glm-5.2",
+ modelId: "glm-5.3",
clientType: "openai-chat",
credential: { baseUrl: "http://my-proxy" } as ModelDto["credential"],
}),
@@ -462,6 +475,9 @@ describe("catalogDelta", () => {
[inSyncDto(PROMOTED, { discount: PROMOTED_DISCOUNT })],
[inSyncDto(PRESET[0]!, { discount: 0.3 })],
[inSyncDto(PENGUIN_GO, { discount: 0.5 })],
+ // A retired row, carried in sync and at a stale price (every other table lacks it).
+ [inSyncDto(RETIRED)],
+ [inSyncDto(RETIRED, { pricing: STALE_PRICING })],
];
for (const table of tables) {
const merged = syncRowsWithCatalog(table.map(toRow), presets);
@@ -498,3 +514,44 @@ describe("catalogDelta", () => {
expect((noticeCounts(todo).added ?? 0) + noticeCounts(todo).updated).toBe(todo.count);
});
});
+
+/**
+ * A retired row stays in the catalog only for the Projects that already carry it. The sync keeps
+ * such a row on the catalog's price, the only price its off-peak tier applies to, and never adds
+ * it anywhere else. Both cases run against the shipped catalog, the list the page and the badge
+ * actually use.
+ */
+describe("retired catalog rows", () => {
+ const ref = (p: { provider: string; modelId: string }): string => `${p.provider}/${p.modelId}`;
+
+ it("a retired row the table carries at a stale price is updated, and the badge counts it", () => {
+ const stale = inSyncDto(RETIRED, { pricing: STALE_PRICING });
+ const merged = syncRowsWithCatalog([toRow(stale)]);
+ expect(merged.updated).toBe(1);
+ expect(merged.rows[0]).toMatchObject({
+ provider: RETIRED.provider,
+ modelId: RETIRED.model_id,
+ cacheRead: String(RETIRED.pricing!.cache_read),
+ cacheWrite: String(RETIRED.pricing!.cache_write),
+ output: String(RETIRED.pricing!.output),
+ });
+
+ // The badge raises the same update: the row is one of the entries its dot counts.
+ const todo = presetUpdateTodo(catalogDelta([stale]))!;
+ expect(todo.items).toContain(ref(stale));
+ expect(noticeCounts(todo).updated).toBe(1);
+ // Back on the catalog's price, the row leaves nothing to do.
+ expect(catalogDelta([inSyncDto(RETIRED)]).refs).not.toContain(ref(stale));
+ });
+
+ it("a table without the retired row never gets it, from the sync or the badge", () => {
+ const refOf = (p: PresetEntry): string => ref({ provider: p.provider, modelId: p.model_id });
+ const presets = presetModelEntries().map(refOf);
+ expect(presets).not.toContain(refOf(RETIRED));
+
+ const merged = syncRowsWithCatalog([]);
+ expect(merged.rows.map(ref)).toEqual(presets);
+ expect(merged.added).toBe(presets.length);
+ expect(catalogDelta([]).refs).toEqual(presets);
+ });
+});
diff --git a/packages/web/test/model-grouping.test.ts b/packages/web/test/model-grouping.test.ts
index 13c71bef..921f6e63 100644
--- a/packages/web/test/model-grouping.test.ts
+++ b/packages/web/test/model-grouping.test.ts
@@ -13,8 +13,10 @@
*/
import { describe, expect, it } from "vitest";
import {
+ DEEPSEEK_OFF_PEAK,
MODEL_CATALOG,
MODEL_PROVIDERS,
+ QWEN_OFF_PEAK,
catalogEntryFor,
effectivePricing,
} from "@prismshadow/penguin-core/model-catalog";
@@ -25,10 +27,13 @@ import {
isFreeModel,
matchesQuery,
orderModelsLikeLibrary,
+ peakWindows,
promotedPricing,
visibleChatModels,
} from "../src/features/models/model-grouping";
import type { ModelCredentialRowLike, ModelRowLike } from "../src/features/models/model-grouping";
+import { zh } from "../src/lib/strings";
+import { en } from "../src/lib/strings-en";
const rows: ModelRowLike[] = [
{ provider: "anthropic", modelId: "claude-sonnet-4-6", displayName: "Claude Sonnet 4.6" },
@@ -375,7 +380,6 @@ describe("discountedPrice", () => {
expect(discountedPrice(row)).toEqual({
percent: 50,
billed: { cacheRead: 0.05, cacheWrite: 0.25, output: 1 },
- scheduled: false,
});
// No price check of its own: the server clears a promotion whose price a save changes.
expect(discountedPrice({ ...row, output: "4" })?.billed.output).toBe(2);
@@ -409,18 +413,61 @@ describe("discountedPrice", () => {
});
it("a scheduled row is marked and halved off-peak, and left at list price at peak", () => {
- const row = presetRow("deepseek", "deepseek-v4-flash");
- const entry = catalogEntryFor("deepseek", "deepseek-v4-flash")!;
+ const row = presetRow("deepseek", "deepseek-flash");
+ const entry = catalogEntryFor("deepseek", "deepseek-flash")!;
const off = discountedPrice(row, OFF_PEAK)!;
expect(off.percent).toBe(50);
- expect(off.scheduled).toBe(true);
+ expect(off.peak).toEqual(peakWindows(DEEPSEEK_OFF_PEAK));
expect(off.billed.output).toBeCloseTo(entry.pricing!.output / 2, 6);
// At peak the row carries no mark at all: the stored price is the price.
expect(discountedPrice(row, PEAK)).toBeUndefined();
});
+ it("each scheduled row follows its own seller's windows, and the badge's title names them", () => {
+ // Qwen bills the DeepSeek models it sells at peak 08:00-22:00 Beijing on every day, while
+ // DeepSeek's own peak is weekday office hours: a Saturday morning parts the two.
+ const saturdayMorning = new Date("2026-09-05T02:00:00Z"); // 10:00 Beijing
+ const lateEvening = new Date("2026-08-31T15:00:00Z"); // Monday 23:00 Beijing
+ const qwen = presetRow("qwen-pay-as-you-go", "deepseek-v4.1-flash");
+ const deepseek = presetRow("deepseek", "deepseek-flash");
+ expect(discountedPrice(qwen, saturdayMorning)).toBeUndefined();
+ expect(discountedPrice(deepseek, saturdayMorning)?.peak).toEqual(
+ peakWindows(DEEPSEEK_OFF_PEAK),
+ );
+ const qwenOff = discountedPrice(qwen, lateEvening)!;
+ expect(qwenOff.percent).toBe(50);
+ expect(qwenOff.peak).toEqual({
+ days: [[1, 7]],
+ everyDay: true,
+ hours: [[8, 22]],
+ });
+
+ expect(peakWindows(DEEPSEEK_OFF_PEAK)).toEqual({
+ days: [[1, 5]],
+ everyDay: false,
+ hours: [
+ [9, 12],
+ [14, 18],
+ ],
+ });
+ // The hover text is spelled from the schedule in both dictionaries, so neither vendor's
+ // windows are described with the other's.
+ expect(zh.models.offPeakTitle(50, peakWindows(DEEPSEEK_OFF_PEAK))).toBe(
+ "空闲时段价:比牌价低 50%。高峰时段按牌价计费——北京时间周一至周五 9:00–12:00、14:00–18:00",
+ );
+ expect(en.models.offPeakTitle(50, peakWindows(DEEPSEEK_OFF_PEAK))).toBe(
+ "Off-peak rate: 50% off list. Peak hours bill at list price — 09:00–12:00 and 14:00–18:00 Beijing time, Monday to Friday",
+ );
+ expect(zh.models.offPeakTitle(50, peakWindows(QWEN_OFF_PEAK))).toBe(
+ "空闲时段价:比牌价低 50%。高峰时段按牌价计费——北京时间每天 8:00–22:00",
+ );
+ expect(en.models.offPeakTitle(50, peakWindows(QWEN_OFF_PEAK))).toBe(
+ "Off-peak rate: 50% off list. Peak hours bill at list price — 08:00–22:00 Beijing time, every day",
+ );
+ });
+
it("a promotion on a scheduled row multiplies with the live off-peak tier", () => {
const row = { ...presetRow("deepseek", "deepseek-flash"), discount: 0.2 };
const output = catalogEntryFor("deepseek", "deepseek-flash")!.pricing!.output;
@@ -428,7 +475,7 @@ describe("discountedPrice", () => {
// 20% off, then half of the rest: 60% off, explained as the promotion.
const off = discountedPrice(row, OFF_PEAK)!;
expect(off.percent).toBe(60);
- expect(off.scheduled).toBe(false);
+ expect(off.peak).toBeUndefined();
expect(off.billed.output).toBeCloseTo(output * 0.8 * 0.5, 5);
const peak = discountedPrice(row, PEAK)!;
@@ -443,7 +490,6 @@ describe("discountedPrice", () => {
expect(discountedPrice({ ...row, discount: 0.2 }, OFF_PEAK)).toEqual({
percent: 20,
billed: expect.objectContaining({ output: 0.9872 }),
- scheduled: false,
});
});
@@ -461,7 +507,7 @@ describe("discountedPrice", () => {
// Only the tier is left to report.
expect(discountedPrice({ ...scheduled, discount }, OFF_PEAK)).toMatchObject({
percent: 50,
- scheduled: true,
+ peak: peakWindows(DEEPSEEK_OFF_PEAK),
});
}
});
diff --git a/plugins/agent-development/plugin.json b/plugins/agent-development/plugin.json
index 232fdaf4..fa15bd9a 100644
--- a/plugins/agent-development/plugin.json
+++ b/plugins/agent-development/plugin.json
@@ -3,6 +3,6 @@
"description_zh": "基于 PenguinHarness 的智能体开发:用 SDK 构建应用、经统一的 LLM API 调用任意模型、管理模型与密钥、编排智能体/会话/成本/定时任务。",
"short_description": "SDK, unified LLM API, config and orchestration.",
"short_description_zh": "SDK、统一 LLM API、配置与编排。",
- "version": "2026.09.14.1",
+ "version": "2026.09.16.1",
"category": "ai-app-development"
}
diff --git a/plugins/agent-development/skills/unified-llm-api/SKILL.md b/plugins/agent-development/skills/unified-llm-api/SKILL.md
index 0224827d..ddfd308f 100644
--- a/plugins/agent-development/skills/unified-llm-api/SKILL.md
+++ b/plugins/agent-development/skills/unified-llm-api/SKILL.md
@@ -62,7 +62,7 @@ Use exact model ids. If an id is not in the table below and the user has not giv
| Kimi K3 | `kimi-k3` | OpenRouter `moonshotai/kimi-k3` |
| Kimi K2.7 Code | — | SiliconFlow `moonshotai/Kimi-K2.7-Code`; Fireworks AI `accounts/fireworks/models/kimi-k2p7-code` |
| Kimi K2.6 | `kimi-k2.6` | OpenRouter `moonshotai/kimi-k2.6`; SiliconFlow `Pro/moonshotai/Kimi-K2.6` |
-| DeepSeek V4 | `deepseek-flash`, `deepseek-v4-pro`, `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` | OpenRouter `deepseek/deepseek-v4.1-flash`, `deepseek/deepseek-v4-pro-0813`, `deepseek/deepseek-v4-pro`, `deepseek/deepseek-v4-flash`, `deepseek/deepseek-v4-flash-0731`, `deepseek/deepseek-v4-flash-vision-exp`; Fireworks AI `accounts/fireworks/models/deepseek-v4-flash-0731`; SiliconFlow `deepseek-ai/DeepSeek-V4-Pro`, `deepseek-ai/DeepSeek-V4-Flash` |
+| DeepSeek V4 | `deepseek-flash`, `deepseek-v4-pro` | OpenRouter `deepseek/deepseek-v4.1-flash`, `deepseek/deepseek-v4-pro-0813`, `deepseek/deepseek-v4-pro`, `deepseek/deepseek-v4-flash`, `deepseek/deepseek-v4-flash-0731`, `deepseek/deepseek-v4-flash-vision-exp`; Fireworks AI `accounts/fireworks/models/deepseek-v4p1-flash`, `accounts/fireworks/models/deepseek-v4-pro-0813`, `accounts/fireworks/models/deepseek-v4-flash-0731`; SiliconFlow `deepseek-ai/DeepSeek-V4-Pro`, `deepseek-ai/DeepSeek-V4-Flash` |
| GLM 5.3 | `glm-5.3`, `glm-5.3-flash` | OpenRouter `z-ai/glm-5.3`, `z-ai/glm-5.3-flash` |
| GLM 5.2 | `glm-5.2` | OpenRouter `z-ai/glm-5.2`; SiliconFlow `zai-org/GLM-5.2` |
| GLM 5.1 | `glm-5.1` | — |