A local-first multi-agent app development platform, built on PenguinHarness
feat(model-catalog): add GLM-5.3 Flash (direct + OpenRouter) and Qwen 3.8 Flash presets (#469)
Yaowei Zheng7bbe1846805a
diff --git a/changelog/unreleased/2026-08-26-flash-model-presets.md b/changelog/unreleased/2026-08-26-flash-model-presets.mdnew file mode 100644index 00000000..775b9d7e--- /dev/null+++ b/changelog/unreleased/2026-08-26-flash-model-presets.md@@ -0,0 +1,29 @@+# Three Flash presets: GLM-5.3 Flash (direct + OpenRouter) and Qwen 3.8 Flash++- **Date:** 2026-08-26+- **Type:** feature+- **Scope:** `model-catalog`, `core`, `cli`, `docs`, `skills`+- **PR:** [#469](https://github.com/Prism-Shadow/penguin-harness/pull/469)++[中文版](2026-08-26-flash-model-presets.zh.md)++The built-in model catalog gained three low-cost rows: `glm-5.3-flash` in the direct Z.AI (GLM) group, its gateway listing `z-ai/glm-5.3-flash` on OpenRouter, and `qwen3.8-flash` in the Qwen Pay-As-You-Go group. All three carry a million-token context window and prices roughly an order of magnitude below their non-Flash siblings.++## Details++- **`glm-5.3-flash` (provider `zhipu`)** — display name GLM-5.3 Flash, 1,000,000-token context window, $0.03 / $0.15 / $0.50 per MTok (cache read / cache write / output), read on 2026-08-26 from https://docs.z.ai/guides/overview/pricing and https://docs.z.ai/guides/vlm/glm-5.3-flash. Direct-vendor rows record the vendor's list price, so the row stores it and its comment names the 50% promotion that halves all three rates through 24:00 on 2026-09-09 (UTC+8). Like every direct Z.AI preset it pins neither `client_type` nor `base_url`: AgentHub routes the id by its `glm-5` substring to the unified GLM client, and a blank credential falls back to `ZAI_API_KEY` / `ZAI_BASE_URL`.+- **The direct row is marked `vision = true`.** The model is natively multimodal and AgentHub's GLM client forwards its images — as `image_url` parts, in a prompt and in a tool result alike — for this one GLM id; every other GLM id, `glm-5v-turbo` among them, refuses an image with `"GLM <id> does not support image inputs."`, which is why the rest of the direct Z.AI group stays vision-off. That forwarding arrived in agenthub [v0.4.8](https://github.com/Prism-Shadow/agenthub/releases/tag/v0.4.8), so `core` and `cli` raise their declared `@prismshadow/agenthub` range to `^0.4.8` and the lockfile resolves both — previously 0.4.7 and 0.4.6 — to that one version.+- **`z-ai/glm-5.3-flash` (provider `openrouter`)** — 1,048,576-token context length, `vision = true`, `client_type = "openai-chat"` and the preset OpenRouter base URL, matching its sibling `z-ai/glm-5.3` row. It sits on a 50%-off ZAI promotion running through 2026-09-09 16:00 UTC; gateway rows store what the gateway actually bills, so the row carries $0.015 / $0.075 / $0.25 and its comment names $0.03 / $0.15 / $0.50 as the rates to restore when the promotion lapses. Both routes carry images, so price is the only thing the two rows disagree on, and only while the promotion runs.+- **`qwen3.8-flash` (provider `qwen-pay-as-you-go`)** — display name Qwen 3.8 Flash, 1,000,000-token input window (131K output cap), `vision = true`, `client_type = "openai-chat"` and the preset DashScope base URL. Official CNY list price from https://www.qianwenai.com/models/qwen3.8-flash, read on 2026-08-26: CNY 1 input / CNY 0.1 cache hit / CNY 3 output per MTok, stored through the catalog's 7:1 display conversion.+- Each row sits at the position the catalog's ordering rule dictates — dictionary order by model id within a provider, newer versions of a series first — so `glm-5.3-flash` follows `glm-5.3`, `z-ai/glm-5.3-flash` follows `z-ai/glm-5.3`, and `qwen3.8-flash` precedes `qwen3.8-max`. Tests pin all three positions along with each row's price, context window, vision flag and protocol pin, and pin that `glm-5.3-flash` still resolves to the `ZAI_*` pair.++## Docs and skill++- The bilingual `models` page names the three ids in its sample of the preset catalog and records why `glm-5.3-flash` is listed twice — both rows vision-capable, their prices apart only while the promotion runs.+- The `agenthub-models` skill (v17) carries the three ids in its model-id table — `glm-5.3-flash` and `z-ai/glm-5.3-flash` in the GLM 5.3 row, `qwen3.8-flash` in a new Qwen 3.8 Flash row — with a note naming `glm-5.3-flash` as the one GLM id whose images the client forwards, the case-insensitive match that also covers its gateway spellings, and the two refusals every other GLM id answers with, and names DashScope's endpoint alongside the other Qwen gateways.++## Compatibility++Existing Projects do not pick the presets up on their own: presets are copied into `.project_config.toml` when the Project is created, and nothing rewrites them afterwards. Use **sync presets** on the models page to bring the rows into a Project that already exists — it appends catalog entries the Project is missing and updates catalog-owned fields on the ones it has, deleting nothing and touching neither the stored default model nor any credential.++`vision` is one of those catalog-owned fields, so whatever a Project has stored stands until a sync rewrites it. All three rows are new to the catalog, so an existing Project carries none of them and none of their flags: the first **sync presets** appends them as they now stand, `glm-5.3-flash` included, with `vision = true`.diff --git a/changelog/unreleased/2026-08-26-flash-model-presets.zh.md b/changelog/unreleased/2026-08-26-flash-model-presets.zh.mdnew file mode 100644index 00000000..2d96713e--- /dev/null+++ b/changelog/unreleased/2026-08-26-flash-model-presets.zh.md@@ -0,0 +1,29 @@+# 三个 Flash 预设:GLM-5.3 Flash(直连 + OpenRouter)与 Qwen 3.8 Flash++- **Date:** 2026-08-26+- **Type:** feature+- **Scope:** `model-catalog`, `core`, `cli`, `docs`, `skills`+- **PR:** [#469](https://github.com/Prism-Shadow/penguin-harness/pull/469)++[English](2026-08-26-flash-model-presets.md)++内置模型目录新增三条低价条目:直连 Z.AI (GLM) 分组的 `glm-5.3-flash`、它在 OpenRouter 上的网关条目 `z-ai/glm-5.3-flash`,以及 Qwen 按量付费分组的 `qwen3.8-flash`。三者都是百万级 Token 上下文,价格比各自的非 Flash 同系列条目低约一个数量级。++## 细节++- **`glm-5.3-flash`(provider `zhipu`)**——展示名 GLM-5.3 Flash,1,000,000 Token 上下文,每百万 Token $0.03 / $0.15 / $0.50(缓存读取 / 缓存写入 / 输出),于 2026-08-26 从 https://docs.z.ai/guides/overview/pricing 与 https://docs.z.ai/guides/vlm/glm-5.3-flash 读取。直连厂商条目记录厂商牌价,因此该行存的是牌价,并在注释中点明那场把三档价格各打对折、持续到 2026-09-09 24:00(UTC+8)的 50% 促销。与其余直连 Z.AI 预设一样,它既不固定 `client_type` 也不固定 `base_url`:AgentHub 依据 `glm-5` 子串把该 id 路由到统一 GLM 客户端,凭证留空时回退到 `ZAI_API_KEY` / `ZAI_BASE_URL`。+- **直连条目标记为 `vision = true`**。该模型原生支持多模态,而 AgentHub 的 GLM 客户端只为这一个 GLM id 转发图像——以 `image_url` 部件的形式,提示词与工具结果中皆可;其余 GLM id(包括 `glm-5v-turbo`)都会以 `"GLM <id> does not support image inputs."` 拒绝图像,直连 Z.AI 分组其余条目因此保持 vision 关闭。该转发能力自 agenthub [v0.4.8](https://github.com/Prism-Shadow/agenthub/releases/tag/v0.4.8) 起提供,因此 `core` 与 `cli` 把声明的 `@prismshadow/agenthub` 范围提到 `^0.4.8`,lockfile 也把两者(此前分别是 0.4.7 与 0.4.6)统一解析到该版本。+- **`z-ai/glm-5.3-flash`(provider `openrouter`)**——1,048,576 Token 上下文,`vision = true`,固定 `client_type = "openai-chat"` 与预置的 OpenRouter base URL,与同组的 `z-ai/glm-5.3` 一致。它正处在一场持续到 2026-09-09 16:00 UTC 的 ZAI 五折促销中;网关条目记录网关实际计费的价格,因此该行存 $0.015 / $0.075 / $0.25,并在注释中点明促销结束后应恢复的 $0.03 / $0.15 / $0.50。两条路径都能携带图片,因此两条条目唯一不同的是价格,且仅在促销期间不同。+- **`qwen3.8-flash`(provider `qwen-pay-as-you-go`)**——展示名 Qwen 3.8 Flash,1,000,000 Token 输入窗口(输出上限 131K),`vision = true`,固定 `client_type = "openai-chat"` 与预置的 DashScope base URL。官方 CNY 牌价于 2026-08-26 从 https://www.qianwenai.com/models/qwen3.8-flash 读取:每百万 Token 输入 CNY 1 / 缓存命中 CNY 0.1 / 输出 CNY 3,按目录 7:1 的展示口径换算后存储。+- 每条都放在目录排序规则要求的位置——分组内按 model id 字典序排列、同一系列的新版本在前——因此 `glm-5.3-flash` 紧随 `glm-5.3`、`z-ai/glm-5.3-flash` 紧随 `z-ai/glm-5.3`、`qwen3.8-flash` 位于 `qwen3.8-max` 之前。测试固定了这三处位置,以及每条的价格、上下文窗口、视觉标记与协议固定值,并固定了 `glm-5.3-flash` 仍解析到 `ZAI_*` 变量对。++## 文档与 Skill++- 中英文 `models` 页在预置目录的示例清单中列出这三个 id,并记下 `glm-5.3-flash` 为何被收录两份——两条都支持图像输入,仅在促销期间价格不同。+- `agenthub-models` skill(v17)的模型 id 表收入这三个 id——`glm-5.3-flash` 与 `z-ai/glm-5.3-flash` 并入 GLM 5.3 行,`qwen3.8-flash` 新起一行 Qwen 3.8 Flash——并补了一条说明:`glm-5.3-flash` 是 GLM 系列中唯一会被客户端转发图像的 id,版本匹配不区分大小写因而也覆盖它的网关拼写,其余 GLM id 则以两条固定信息拒绝;同时在其余 Qwen 网关旁点出 DashScope 的端点。++## 兼容性++既有 Project 不会自动获得这些预设:预设是在 Project 创建时复制进 `.project_config.toml` 的,此后没有任何机制会改写它们。对已经存在的 Project,请在模型页面使用**同步预设**把这些条目引入——它只会追加 Project 缺少的目录条目、并更新已有条目中由目录所有的字段,不删除任何内容,也不会改动已存的默认模型与任何凭证。++`vision` 正是这类由目录所有的字段,因此 Project 中已存的取值会一直保留,直到一次同步将其改写。这三条都是目录中的新条目,既有 Project 既不持有它们,也不持有它们的标记:首次运行**同步预设**时会按当前状态追加,其中 `glm-5.3-flash` 的 `vision = true`。diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 8a89f24b..29b83e23 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -24,7 +24,7 @@},"dependencies": {"@modelcontextprotocol/client": "^2.0.0",- "@prismshadow/agenthub": "^0.4.6",+ "@prismshadow/agenthub": "^0.4.8","@prismshadow/penguin-core": "workspace:*","@prismshadow/penguin-server": "workspace:*","@prismshadow/penguin-skills": "workspace:*",diff --git a/packages/core/package.json b/packages/core/package.jsonindex 4d5c95a0..88527054 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -49,7 +49,7 @@},"dependencies": {"@modelcontextprotocol/client": "^2.0.0",- "@prismshadow/agenthub": "^0.4.7",+ "@prismshadow/agenthub": "^0.4.8","@prismshadow/penguin-skills": "workspace:*","arktype": "^2.2.3","smol-toml": "^1.3.0",diff --git a/packages/core/src/state/model-catalog.ts b/packages/core/src/state/model-catalog.tsindex d422d403..86838137 100644--- a/packages/core/src/state/model-catalog.ts+++ b/packages/core/src/state/model-catalog.ts@@ -4,7 +4,8 @@* Data verified as of 2026-07-10 (Qwen Token Plan entries: 2026-07-20; MiniMax: 2026-08-03;* DeepSeek, Gemini 3.7, GLM-5.3 and the whole OpenAI line-up (direct + OpenRouter):* 2026-08-18; the direct Anthropic group: 2026-08-20; the DeepSeek V4 Flash Vision Exp rows:- * 2026-08-21 — per each provider's docs).+ * 2026-08-21; the GLM-5.3 Flash rows (direct + OpenRouter) and qwen3.8-flash: 2026-08-26 —+ * 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.*@@ -19,8 +20,9 @@* single rate, so long-context usage will be underestimated).** Scope: excludes deepseek-chat / deepseek-reasoner legacy aliases that AgentHub cannot- * auto-route (deprecated 2026-07-24), glm-5v-turbo (image input unsupported by AgentHub's GLM- * client), the OpenRouter z-ai/glm-5.1 and SiliconFlow Pro/zai-org/GLM-5.1 gateway listings+ * auto-route (deprecated 2026-07-24), glm-5v-turbo (AgentHub's GLM client forwards images+ * only for glm-5.3-flash, so a vision model cannot do the one thing it exists for), the+ * OpenRouter z-ai/glm-5.1 and SiliconFlow Pro/zai-org/GLM-5.1 gateway listings* (delisted 2026-08-06; the Z.AI direct glm-5.1 remains), the OpenRouter* inclusionai/ling-3.0-flash:free listing (delisted from OpenRouter, removed 2026-08-18),* non-chat models (embedding / image generation / TTS), and Bedrock. Direct-vendor ids are@@ -717,6 +719,21 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [clientType: "openai-chat",baseUrl: OPENROUTER_BASE_URL,},+ {+ // The gateway listing of the direct glm-5.3-flash row below, sitting on a 50%-off ZAI+ // promotion through 2026-09-09 16:00 UTC (Z.AI's own price list names the same window as+ // 24:00 on 2026-09-09, UTC+8). Stored at the discounted rate the gateway actually bills;+ // when it lapses, restore 0.03 / 0.15 / 0.5. The listing takes text, images and video,+ // and the generic openai-chat client it pins converts image_url parts.+ modelId: "z-ai/glm-5.3-flash",+ displayName: "GLM-5.3 Flash",+ provider: "openrouter",+ contextWindow: 1048576,+ pricing: usd(0.015, 0.075, 0.25),+ supportsVision: true,+ clientType: "openai-chat",+ baseUrl: OPENROUTER_BASE_URL,+ },{modelId: "z-ai/glm-5.2",displayName: "GLM-5.2",@@ -966,6 +983,20 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [clientType: "openai-chat",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.+ modelId: "qwen3.8-flash",+ displayName: "Qwen 3.8 Flash",+ provider: "qwen-pay-as-you-go",+ contextWindow: 1000000,+ pricing: cny(0.1, 1, 3),+ supportsVision: true,+ clientType: "openai-chat",+ baseUrl: QWEN_PAYG_BASE_URL,+ },{modelId: "qwen3.8-max",displayName: "Qwen 3.8 Max",@@ -1218,6 +1249,26 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [pricing: usd(0.26, 1.4, 4.4),supportsVision: false,},+ {+ // Z.AI's price list (docs.z.ai/guides/overview/pricing) publishes $0.15 input / $0.03+ // cached input / $0.50 output; a 50% promotion halves all three through 24:00 on+ // 2026-09-09 (UTC+8). Direct-vendor rows record the vendor's list price, so that is what+ // is stored here — the OpenRouter z-ai/glm-5.3-flash row above carries the promotional+ // rate it is actually billed at.+ //+ // The model is natively multimodal (docs.z.ai/guides/vlm/glm-5.3-flash: images, video+ // and files), and it is the one GLM id whose images AgentHub's GLM client forwards — as+ // image_url parts, in a prompt and in a tool result alike. Every other GLM id refuses+ // one outright ("GLM <id> does not support image inputs."), which is why the rest of+ // this group is vision-off. That forwarding is why core's dependency range floors+ // @prismshadow/agenthub at 0.4.8.+ modelId: "glm-5.3-flash",+ displayName: "GLM-5.3 Flash",+ provider: "zhipu",+ contextWindow: 1000000,+ pricing: usd(0.03, 0.15, 0.5),+ supportsVision: true,+ },{modelId: "glm-5.2",displayName: "GLM-5.2",diff --git a/packages/core/test/model-catalog.test.ts b/packages/core/test/model-catalog.test.tsindex bed503b3..7852e1b5 100644--- a/packages/core/test/model-catalog.test.ts+++ b/packages/core/test/model-catalog.test.ts@@ -204,6 +204,7 @@ describe("model-catalog", () => {"x-ai/grok-4.5","xiaomi/mimo-v2.5","z-ai/glm-5.3",+ "z-ai/glm-5.3-flash","z-ai/glm-5.2",]);for (const m of or) {@@ -276,6 +277,7 @@ describe("model-catalog", () => {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],@@ -401,6 +403,7 @@ describe("model-catalog", () => {]);expect(MODEL_CATALOG.filter((m) => m.provider === "zhipu").map((m) => m.modelId)).toEqual(["glm-5.3",+ "glm-5.3-flash","glm-5.2","glm-5.1","glm-5",@@ -433,6 +436,46 @@ describe("model-catalog", () => {const glm53 = catalogEntryFor("zhipu", "glm-5.3")!;expect([glm53.contextWindow, glm53.supportsVision]).toEqual([1000000, false]);expect(glm53.pricing).toEqual(catalogEntryFor("zhipu", "glm-5.2")!.pricing);+ // GLM-5.3 Flash is listed both directly and on OpenRouter, and the two rows deliberately+ // disagree on price: the direct row keeps Z.AI's list price while the gateway row stores+ // the 50%-off rate OpenRouter actually bills through 2026-09-09, so the gateway figures+ // are exactly half the direct ones.+ const glm53f = catalogEntryFor("zhipu", "glm-5.3-flash")!;+ expect([glm53f.contextWindow, glm53f.supportsVision]).toEqual([1000000, true]);+ expect([+ glm53f.pricing!.cache_read,+ glm53f.pricing!.cache_write,+ glm53f.pricing!.output,+ ]).toEqual([0.03, 0.15, 0.5]);+ const glm53for = catalogEntryFor("openrouter", "z-ai/glm-5.3-flash")!;+ expect([glm53for.contextWindow, glm53for.supportsVision]).toEqual([1048576, true]);+ expect([+ glm53for.pricing!.cache_read,+ glm53for.pricing!.cache_write,+ glm53for.pricing!.output,+ ]).toEqual([0.015, 0.075, 0.25]);+ // Vision agrees on both routes: the direct row's AgentHub GLM client forwards image_url+ // parts for this one id, and the gateway row's generic openai-chat client carries them+ // for any id. It is the only vision-capable row in the direct Z.AI group.+ expect(glm53f.clientType).toBeUndefined();+ expect(glm53for.clientType).toBe("openai-chat");+ for (const m of MODEL_CATALOG.filter((m) => m.provider === "zhipu")) {+ expect(m.supportsVision, m.modelId).toBe(m.modelId === "glm-5.3-flash");+ }+ // 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,+ ]);// 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]);@@ -643,6 +686,9 @@ describe("resolveModelEnv (PRN-021: env fallback resolved by AgentHub routing ruexpect(resolveModelEnv("glm-5.2")?.envKey).toBe("ZAI_API_KEY");// glm-5.3 is served by agenthub 0.4.2's unified GLM client (same ZAI_* pair).expect(resolveModelEnv("glm-5.3")?.envKey).toBe("ZAI_API_KEY");+ // glm-5.3-flash carries the glm-5 substring, so it reaches the same client and pair.+ expect(resolveModelEnv("glm-5.3-flash")?.envKey).toBe("ZAI_API_KEY");+ expect(resolveModelEnv("glm-5.3-flash")?.envBaseUrlKey).toBe("ZAI_BASE_URL");expect(resolveModelEnv("kimi-k2.6")?.envBaseUrlKey).toBe("MOONSHOT_BASE_URL");// agenthub 0.4.2 unified the Kimi clients; every spelling reads the same env pair// (kimi-k3 matches no k2.x substring, so it must resolve on its own).diff --git a/packages/docs/content/models.en.md b/packages/docs/content/models.en.mdindex 98fc8fe0..e2d7901e 100644--- a/packages/docs/content/models.en.md+++ b/packages/docs/content/models.en.md@@ -77,7 +77,7 @@ The gateway groups (openrouter / fireworks / siliconflow / qwen-token-plan / qweThe 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-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp (the DeepSeek group's only vision-capable model), MiniMax-M3, gemini-3.7-flash, claude-opus-5 / claude-opus-4-8 / claude-sonnet-5, gpt-5.6 / gpt-5.5, glm-5.3, kimi-k3, qwen3.8-max (not exhaustive). 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 prices record the official off-peak tier (peak hours, Beijing 9:00–12:00 and 14:00–18:00, bill double).+Some models in the preset catalog: deepseek-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp (the DeepSeek group's only vision-capable model), MiniMax-M3, gemini-3.7-flash, claude-opus-5 / claude-opus-4-8 / claude-sonnet-5, gpt-5.6 / gpt-5.5, glm-5.3 / glm-5.3-flash, kimi-k3, qwen3.8-max / qwen3.8-flash (not exhaustive). 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 prices record the official off-peak tier (peak hours, Beijing 9:00–12:00 and 14:00–18:00, bill double). `glm-5.3-flash` appears twice, and both rows accept images: AgentHub's GLM client forwards image parts for this one GLM id (every other GLM id refuses them), and the OpenRouter row `z-ai/glm-5.3-flash` goes through the generic OpenAI-compatible client, which carries them for any id. What the two rows do not share is the price — the direct row records Z.AI's list price and the OpenRouter row the discounted rate the gateway bills, so they disagree while a promotion is running.## Local / self-hosted OpenAI-compatible endpoints (e.g. vLLM)diff --git a/packages/docs/content/models.zh.md b/packages/docs/content/models.zh.mdindex 59b85ba2..97e26ddc 100644--- a/packages/docs/content/models.zh.md+++ b/packages/docs/content/models.zh.md@@ -77,7 +77,7 @@ api_key = "sk-..."预置目录还收录了 OpenRouter 的免费档:`:free` 模型变体 `nvidia/nemotron-3-ultra-550b-a55b:free` 与统一路由 `openrouter/free`(Free Models Router),零成本可用,但受 OpenRouter 免费档速率限制与数据政策约束。-预置目录中的部分模型:deepseek-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp(DeepSeek 分组中唯一支持图像输入的模型)、MiniMax-M3、gemini-3.7-flash、claude-opus-5 / claude-opus-4-8 / claude-sonnet-5、gpt-5.6 / gpt-5.5、glm-5.3、kimi-k3、qwen3.8-max 等(非完整清单)。OpenAI 全系列都收录了两份——直连(用自己的 OpenAI Key,记牌价)与 OpenRouter 上的 `openai/<id>`(记网关实际计费价,会随其促销浮动)。DeepSeek 直连分组的价格记录官方低谷时段档(高峰时段——北京时间 9:00–12:00、14:00–18:00——按双倍计费)。+预置目录中的部分模型:deepseek-v4-pro / deepseek-v4-flash / deepseek-v4-flash-vision-exp(DeepSeek 分组中唯一支持图像输入的模型)、MiniMax-M3、gemini-3.7-flash、claude-opus-5 / claude-opus-4-8 / claude-sonnet-5、gpt-5.6 / gpt-5.5、glm-5.3 / glm-5.3-flash、kimi-k3、qwen3.8-max / qwen3.8-flash 等(非完整清单)。OpenAI 全系列都收录了两份——直连(用自己的 OpenAI Key,记牌价)与 OpenRouter 上的 `openai/<id>`(记网关实际计费价,会随其促销浮动)。DeepSeek 直连分组的价格记录官方低谷时段档(高峰时段——北京时间 9:00–12:00、14:00–18:00——按双倍计费)。`glm-5.3-flash` 收录了两份,两条都支持图像输入:AgentHub 的 GLM 客户端只为这一个 GLM id 转发图像部件(其余 GLM id 一律拒绝),而 OpenRouter 上的 `z-ai/glm-5.3-flash` 走通用 OpenAI 兼容客户端,对任何 id 都能携带图片。两条不一致的是价格——直连条目记 Z.AI 牌价,OpenRouter 条目记网关实际计费的折后价,因此促销期间两者不同。## 本地 / 自建 OpenAI 兼容端点(如 vLLM)diff --git a/packages/skills/skills/agenthub-models/SKILL.md b/packages/skills/skills/agenthub-models/SKILL.mdindex 79236dc0..5e428580 100644--- a/packages/skills/skills/agenthub-models/SKILL.md+++ b/packages/skills/skills/agenthub-models/SKILL.md@@ -3,8 +3,8 @@ name: agenthub-modelsdescription: Call model APIs through @prismshadow/agenthub — streaming text generation, image generation, speech synthesis, embeddings and the supported-model registry with one client.short_description: Call model APIs with one AgentHub client.short_description_zh: 用一个 AgentHub 客户端调用模型 API。-version: 15-updated: 2026-08-21T00:00:00Z+version: 17+updated: 2026-08-26T00:00:00Z---# AgentHub Model APIs@@ -65,15 +65,18 @@ Use exact model ids. If an id is not in the table below and the user has not giv| 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-v4-pro`, `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` | OpenRouter `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` |-| GLM 5.3 | `glm-5.3` | OpenRouter `z-ai/glm-5.3` |+| 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` | — || Qwen 3.8 Max | — | OpenRouter `qwen/qwen3.8-max` |+| Qwen 3.8 Flash | — | Qwen DashScope `qwen3.8-flash` || Qwen 3.6 | — | OpenRouter `qwen/qwen3.6-35b-a3b`; SiliconFlow `Qwen/Qwen3.6-35B-A3B` || Inkling | — | OpenRouter `thinkingmachines/inkling`; Fireworks AI `accounts/fireworks/models/inkling` |The image endpoint dropped its preview suffix: `gemini-3.1-flash-image-preview` is deprecated, use `gemini-3.1-flash-image`.+`glm-5.3-flash` is the one GLM model that reads images (`@prismshadow/agenthub` >= 0.4.8). The GLM client sends an `image_url` item as an `image_url` part, in a prompt and in a tool result alike, and both an HTTP(S) URL and a base64 data URL pass through unchanged. The version match is case-insensitive, so the gateway spellings `z-ai/glm-5.3-flash` and `zai-org/GLM-5.3-Flash` are recognised too. Every other GLM id refuses an image rather than dropping it — `GLM <id> does not support image inputs.` in a prompt, `GLM <id> does not support images in tool results.` in a tool result — and that includes `glm-5v-turbo`.+Gateway model lists can be queried online:```bash@@ -103,7 +106,7 @@ The registry is the curated current line-up, so prefer it when picking a model o- Without `clientType`, the client auto-routes by model id substring, in this order: `minimax-m3` (exact), `gemini-3*` / `gemini-embedding`, `claude` 4-6/4-7/4-8/-5, `gpt-5.4`/`gpt-5.5`/`gpt-5.6`, `glm-5` (whole series, 5.3 included), `kimi-k3`/`kimi-k2.5`/`kimi-k2.6`, `deepseek-v4`, `ant-messages`, `openai-responses`, `openai`+`embedding` (embeddings), `openai` (chat). Ids matching none of these throw. Most gateway variants in the table above hit the same substrings, so they route to the right family — just set `baseUrl` to the gateway endpoint.- Three generic protocol clients cover everything else (all take `baseUrl` + `apiKey`):- - `clientType: "openai-chat"` — any OpenAI Chat Completions compatible endpoint (gateway models, Qwen via OpenRouter/SiliconFlow, local vLLM, …). Renamed from `openai` in AgentHub 0.4.2; the bare `openai` string still routes as a deprecated alias.+ - `clientType: "openai-chat"` — any OpenAI Chat Completions compatible endpoint (gateway models, Qwen via OpenRouter/SiliconFlow or DashScope `https://dashscope.aliyuncs.com/compatible-mode/v1`, local vLLM, …). Renamed from `openai` in AgentHub 0.4.2; the bare `openai` string still routes as a deprecated alias.- `clientType: "openai-responses"` — OpenAI Responses-compatible endpoints (OpenAI, OpenRouter, DeepSeek, Z.AI, MiniMax all serve one).- `clientType: "ant-messages"` — Anthropic Messages-compatible endpoints (Anthropic, OpenRouter `https://openrouter.ai/api`, DeepSeek `https://api.deepseek.com/anthropic`, Z.AI, MiniMax).- Exception: an id served by an OpenAI-compatible gateway that still matches a first-party substring (e.g. OpenRouter's `google/gemini-3.7-flash`, `anthropic/claude-sonnet-5` or `openai/gpt-5.6-sol` on the `/api/v1` endpoint) would auto-route to the vendor protocol client — and a dotted id like `anthropic/claude-opus-4.8` matches nothing and throws. Always pass an explicit `clientType` for gateway ids; never rely on the id. Routing reads `clientType` (or the model id) as a plain lowercased string and never looks at `baseUrl`, so the vendor prefix gives no protection.diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e48ad9fd..f27b8b66 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -49,8 +49,8 @@ importers:specifier: ^2.0.0version: 2.0.0'@prismshadow/agenthub':- specifier: ^0.4.6+ specifier: ^0.4.8'@prismshadow/penguin-core':specifier: workspace:*version: link:../core@@ -95,8 +95,8 @@ importers:specifier: ^2.0.0version: 2.0.0'@prismshadow/agenthub':- specifier: ^0.4.7+ specifier: ^0.4.8'@prismshadow/penguin-skills':specifier: workspace:*version: link:../skills@@ -951,11 +951,8 @@ packages:engines: {node: '>=18'}hasBin: true- '@prismshadow/[email protected]':- resolution: {integrity: sha512-0umTpATCfaPpxI9wRwC19oLJswbBKUOvMOCAQMiVcUXALQ6EoDC7sPnciDuFh2F17MLJZUajsVZWGjaBN4V/tQ==}-- '@prismshadow/[email protected]':- resolution: {integrity: sha512-TmsWkFSu/O0Esk9jHyb4BRU0WUD1IZADsmpyPc8jATnxrUA0yVUG7gXttlf8W2cWjmWm58T4h7/R5I421H+dPw==}+ '@prismshadow/[email protected]':+ resolution: {integrity: sha512-d+NBK/KaJeAA0kICkT1Ww4yVOf5TwuENsHXAxPp4LHMKL9CDIQotK9Wcb9jVa5WUjVEqLg/5Tiu/MhmlW7IW8A==}'@prismshadow/penguin-cli@file:packages/cli':resolution: {directory: packages/cli, type: directory}@@ -4508,7 +4505,7 @@ snapshots:dependencies:playwright: 1.61.1dependencies:'@anthropic-ai/bedrock-sdk': 0.26.4([email protected])'@anthropic-ai/sdk': 0.91.1([email protected])@@ -4523,7 +4520,7 @@ snapshots:- ws- zoddependencies:'@anthropic-ai/bedrock-sdk': 0.26.4([email protected])'@anthropic-ai/sdk': 0.91.1([email protected])@@ -4538,13 +4535,17 @@ snapshots:- ws- zod+ '@prismshadow/penguin-cli@file:packages/cli([email protected])':dependencies:- '@anthropic-ai/bedrock-sdk': 0.26.4([email protected])- '@anthropic-ai/sdk': 0.91.1([email protected])- '@google/genai': 1.52.0([email protected])- express: 4.22.2([email protected])- openai: 6.42.0([email protected])([email protected])+ '@modelcontextprotocol/client': 2.0.0+ '@prismshadow/agenthub': 0.4.8([email protected])([email protected])+ '@prismshadow/penguin-core': file:packages/core([email protected])+ '@prismshadow/penguin-server': file:packages/server([email protected])+ '@prismshadow/penguin-skills': file:packages/skills+ commander: 13.1.0+ dotenv: 17.4.2+ smol-toml: 1.6.1+ yaml: 2.9.0transitivePeerDependencies:- '@modelcontextprotocol/sdk'- bufferutil@@ -4553,15 +4554,12 @@ snapshots:- ws- zod- '@prismshadow/penguin-cli@file:packages/cli([email protected])':+ '@prismshadow/penguin-core@file:packages/core([email protected])':dependencies:'@modelcontextprotocol/client': 2.0.0- '@prismshadow/penguin-core': file:packages/core([email protected])([email protected])- '@prismshadow/penguin-server': file:packages/server([email protected])+ '@prismshadow/agenthub': 0.4.8([email protected])([email protected])'@prismshadow/penguin-skills': file:packages/skills- commander: 13.1.0- dotenv: 17.4.2+ arktype: 2.2.3smol-toml: 1.6.1yaml: 2.9.0transitivePeerDependencies:@@ -4575,7 +4573,7 @@ snapshots:'@prismshadow/penguin-core@file:packages/core([email protected])([email protected])':dependencies:'@modelcontextprotocol/client': 2.0.0- '@prismshadow/agenthub': 0.4.7([email protected])([email protected])+ '@prismshadow/agenthub': 0.4.8([email protected])([email protected])'@prismshadow/penguin-skills': file:packages/skillsarktype: 2.2.3smol-toml: 1.6.1@@ -4591,7 +4589,7 @@ snapshots:'@prismshadow/penguin-core@file:packages/core([email protected])([email protected])([email protected])':dependencies:'@modelcontextprotocol/client': 2.0.0'@prismshadow/penguin-skills': file:packages/skillsarktype: 2.2.3smol-toml: 1.6.1diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex a29602b7..1fb82a21 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -31,8 +31,9 @@ allowBuilds:# targets NSIS only, so the script is deliberately not run.electron-winstaller: false# pnpm 11 withholds freshly published versions by default (supply-chain gate), which-# would resolve agenthub back to 0.4.6 and lose the Gemini function-response content-# split. This package is first-party, so the exemption carries no third-party risk.-# Remove the entry at the next agenthub bump — by then 0.4.7 is long past the age gate.+# would resolve agenthub back to 0.4.7 and lose the GLM image input that the glm-5.3-flash+# preset's vision flag rests on. This package is first-party, so the exemption carries no+# third-party risk.+# Remove the entry at the next agenthub bump — by then 0.4.8 is long past the age gate.minimumReleaseAgeExclude:- - "@prismshadow/[email protected]"+ - "@prismshadow/[email protected]"