A local-first multi-agent app development platform, built on PenguinHarness
fix(core,cli): AgentHub 0.4.12 so an image read by a tool reaches the model behind a strict OpenAI-compatible gateway (#692)
Yaowei Zheng18eb9b001ae5
diff --git a/changelog/unreleased/2026-09-11-agenthub-0.4.12.md b/changelog/unreleased/2026-09-11-agenthub-0.4.12.mdnew file mode 100644index 00000000..734dc3a1--- /dev/null+++ b/changelog/unreleased/2026-09-11-agenthub-0.4.12.md@@ -0,0 +1,16 @@+# AgentHub 0.4.12: an image read by a tool reaches the model behind a strict OpenAI-compatible gateway++- **Date:** 2026-09-11+- **Type:** fix+- **Scope:** `core`, `cli`, `docs`+- **PR:** [#692](https://github.com/Prism-Shadow/penguin-harness/pull/692)++[中文版](2026-09-11-agenthub-0.4.12.zh.md)++`@prismshadow/agenthub` moved from 0.4.11 to 0.4.12 (agenthub [#209](https://github.com/Prism-Shadow/agenthub/pull/209)). Reading an image with `read_file`, or calling an MCP tool that returns one, on a model reached over the `openai-chat` protocol, on a Kimi K3 row or on a `glm-5.3-flash` row no longer fails with `400 Failed to deserialize the JSON body into the target type: data did not match any variant of untagged enum ChatCompletionRequestToolMessageContent`: the client sends the tool's images in the user message that follows the turn's tool messages, the one placement the Chat Completions schema documents, instead of inside the `tool` message. A gateway that validates the schema rejected the whole request, which ended the turn with that error.++## Details++- The fix lives in AgentHub's `openai_chat`, `kimi_k3` and `glm5_3` clients, so every row pinned to `openai-chat` (the TokenDance, OpenRouter, Fireworks, SiliconFlow and Qwen groups, and custom OpenAI-protocol entries), the vLLM rows, whose `openai-chat-vllm-adapter` subclasses that client, the Moonshot direct rows and the `glm-5.3-flash` rows are covered alike. Every tool result now goes out as a plain string on those clients. The Responses-protocol clients were not affected.+- `pnpm-workspace.yaml`'s `minimumReleaseAgeExclude` entry names 0.4.12 in place of 0.4.11.+- The last `gpt5_6` spellings, in the fast-mode table on the models page and in a core test title, read `gpt6`, the name AgentHub 0.4.11 gave the client.diff --git a/changelog/unreleased/2026-09-11-agenthub-0.4.12.zh.md b/changelog/unreleased/2026-09-11-agenthub-0.4.12.zh.mdnew file mode 100644index 00000000..940aac7e--- /dev/null+++ b/changelog/unreleased/2026-09-11-agenthub-0.4.12.zh.md@@ -0,0 +1,16 @@+# AgentHub 0.4.12:工具读到的图片能穿过严格校验的 OpenAI 兼容网关送达模型++- **Date:** 2026-09-11+- **Type:** fix+- **Scope:** `core`, `cli`, `docs`+- **PR:** [#692](https://github.com/Prism-Shadow/penguin-harness/pull/692)++[English](2026-09-11-agenthub-0.4.12.md)++`@prismshadow/agenthub` 从 0.4.11 升至 0.4.12(agenthub [#209](https://github.com/Prism-Shadow/agenthub/pull/209))。在走 `openai-chat` 协议的模型、Kimi K3 行或 `glm-5.3-flash` 行上用 `read_file` 读图片,或调用返回图片的 MCP 工具,不再报 `400 Failed to deserialize the JSON body into the target type: data did not match any variant of untagged enum ChatCompletionRequestToolMessageContent`:client 把工具的图片放进本轮 tool 消息之后的 user 消息,即 Chat Completions schema 唯一记载的位置,而不再塞进 `tool` 消息。校验 schema 的网关此前会拒绝整个请求,该轮随即以这个错误终止。++## 细节++- 修复位于 AgentHub 的 `openai_chat`、`kimi_k3` 与 `glm5_3` 三个 client,因此所有钉在 `openai-chat` 上的行(TokenDance、OpenRouter、Fireworks、SiliconFlow、Qwen 各组以及自定义 OpenAI 协议条目)、vLLM 行(`openai-chat-vllm-adapter` 是该 client 的子类)、Moonshot 直连行和 `glm-5.3-flash` 行一并生效。这些 client 的每条工具结果现在都以纯字符串发出。Responses 协议的 client 不受影响。+- `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude` 条目改为 0.4.12,替换 0.4.11。+- 最后几处 `gpt5_6` 写法(模型页的快速模式表格与一个 core 测试标题)改为 `gpt6`,即 AgentHub 0.4.11 给该 client 的名字。diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 900141df..22412b1a 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -36,7 +36,7 @@"@penguinharness/use-bento-slides": "workspace:*","@penguinharness/use-firecrawl": "workspace:*","@penguinharness/use-claude-code": "workspace:*",- "@prismshadow/agenthub": "^0.4.11",+ "@prismshadow/agenthub": "^0.4.12","@prismshadow/penguin-core": "workspace:*","@prismshadow/penguin-server": "workspace:*","commander": "^13.0.0",diff --git a/packages/core/package.json b/packages/core/package.jsonindex be0ab010..d4d12ddb 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -69,7 +69,7 @@"@penguinharness/use-bento-slides": "workspace:*","@penguinharness/use-firecrawl": "workspace:*","@penguinharness/use-claude-code": "workspace:*",- "@prismshadow/agenthub": "^0.4.11",+ "@prismshadow/agenthub": "^0.4.12","arktype": "^2.2.3","smol-toml": "^1.3.0","yaml": "^2.5.0"diff --git a/packages/core/test/model-catalog.test.ts b/packages/core/test/model-catalog.test.tsindex 14e70546..0e2fbec9 100644--- a/packages/core/test/model-catalog.test.ts+++ b/packages/core/test/model-catalog.test.ts@@ -1178,7 +1178,7 @@ describe("resolveModelEnv (PRN-021: env fallback resolved by AgentHub routing ru});describe("fastModeProtocol (which models may be offered AgentHub's fast_mode, and on which protocol)", () => {- it("OpenAI-protocol clients carry it: openai_chat / openai_responses / gpt5_6 / minimax_m3", () => {+ it("OpenAI-protocol clients carry it: openai_chat / openai_responses / gpt6 / minimax_m3", () => {// Bare "openai" is the alias the web pins on custom, user-defined and gateway rows.expect(fastModeProtocol("anything-at-all", "openai")).toBe("openai");expect(fastModeProtocol("local-qwen", "openai-responses")).toBe("openai");diff --git a/packages/docs/content/models.en.md b/packages/docs/content/models.en.mdindex 9f2d3fa3..2ddea917 100644--- a/packages/docs/content/models.en.md+++ b/packages/docs/content/models.en.md@@ -159,7 +159,7 @@ Whether a fast tier exists is decided by the AgentHub client a model routes to,| Routed client | Fast mode || --- | --- |-| OpenAI protocol (`openai_chat`, `openai_responses`, `gpt5_6`, `minimax_m3`) | sent as `service_tier: "priority"` |+| OpenAI protocol (`openai_chat`, `openai_responses`, `gpt6`, `minimax_m3`) | sent as `service_tier: "priority"` || Anthropic protocol (`ant_messages`, `claude5`) | sent as `speed: "fast"` plus the beta header || Gemini, GLM, Kimi, DeepSeek, OpenAI embeddings | rejected — no toggle || Claude on Bedrock, or a Claude 4.6 id | rejected — no toggle |diff --git a/packages/docs/content/models.zh.md b/packages/docs/content/models.zh.mdindex 19f34bbd..42706b23 100644--- a/packages/docs/content/models.zh.md+++ b/packages/docs/content/models.zh.md@@ -159,7 +159,7 @@ DeepSeek V4 只接受 `low`/`high`/`max`,服务端会把 `medium` 与 `xhigh`| 路由到的 client | 快速模式 || --- | --- |-| OpenAI 协议(`openai_chat`、`openai_responses`、`gpt5_6`、`minimax_m3`) | 发送 `service_tier: "priority"` |+| OpenAI 协议(`openai_chat`、`openai_responses`、`gpt6`、`minimax_m3`) | 发送 `service_tier: "priority"` || Anthropic 协议(`ant_messages`、`claude5`) | 发送 `speed: "fast"` 并附带 beta 请求头 || Gemini、GLM、Kimi、DeepSeek、OpenAI embedding | 拒绝——不提供开关 || Bedrock 上的 Claude,或 Claude 4.6 系列 id | 拒绝——不提供开关 |diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 160ac5f0..5b92de28 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -88,8 +88,8 @@ importers:specifier: workspace:*version: link:../../plugins/use-firecrawl'@prismshadow/agenthub':- specifier: ^0.4.11+ specifier: ^0.4.12'@prismshadow/penguin-core':specifier: workspace:*version: link:../core@@ -167,8 +167,8 @@ importers:specifier: workspace:*version: link:../../plugins/use-firecrawl'@prismshadow/agenthub':- specifier: ^0.4.11+ specifier: ^0.4.12arktype:specifier: ^2.2.3version: 2.2.3@@ -1506,8 +1506,8 @@ packages:engines: {node: '>=18'}hasBin: true- '@prismshadow/[email protected]':- resolution: {integrity: sha512-BuLjkGhlihbtDQjyFkWhrBlTAxqi9xNqfhNeP0BEQy8it2D/DxoLqhs74EhmMUlWRRoxNEIJzlQFnLWGWzUUwg==}+ '@prismshadow/[email protected]':+ resolution: {integrity: sha512-e739bkRsP8OGhNzeDNm64ki7Fry44u9esxYuqFB687GfflXeOW7Ot9oq1GNiPvEWNGf4Qu6vWM12V7G1MORf7g==}'@prismshadow/penguin-cli@file:packages/cli':resolution: {directory: packages/cli, type: directory}@@ -5408,7 +5408,7 @@ snapshots:dependencies:playwright: 1.61.1dependencies:'@anthropic-ai/bedrock-sdk': 0.26.4([email protected])'@anthropic-ai/sdk': 0.91.1([email protected])@@ -5423,7 +5423,7 @@ snapshots:- ws- zoddependencies:'@anthropic-ai/bedrock-sdk': 0.26.4([email protected])'@anthropic-ai/sdk': 0.91.1([email protected])@@ -5453,7 +5453,7 @@ snapshots:'@penguinharness/use-bento-slides': file:plugins/use-bento-slides'@penguinharness/use-claude-code': file:plugins/use-claude-code'@penguinharness/use-firecrawl': file:plugins/use-firecrawl- '@prismshadow/agenthub': 0.4.11([email protected])([email protected])+ '@prismshadow/agenthub': 0.4.12([email protected])([email protected])'@prismshadow/penguin-core': file:packages/core([email protected])([email protected])'@prismshadow/penguin-server': file:packages/server([email protected])commander: 13.1.0@@ -5484,7 +5484,7 @@ snapshots:'@penguinharness/use-bento-slides': file:plugins/use-bento-slides'@penguinharness/use-claude-code': file:plugins/use-claude-code'@penguinharness/use-firecrawl': file:plugins/use-firecrawl- '@prismshadow/agenthub': 0.4.11([email protected])([email protected])+ '@prismshadow/agenthub': 0.4.12([email protected])([email protected])arktype: 2.2.3smol-toml: 1.6.1yaml: 2.9.0@@ -5511,7 +5511,7 @@ snapshots:'@penguinharness/use-bento-slides': file:plugins/use-bento-slides'@penguinharness/use-claude-code': file:plugins/use-claude-code'@penguinharness/use-firecrawl': file:plugins/use-firecrawlarktype: 2.2.3smol-toml: 1.6.1yaml: 2.9.0diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 5b82af06..c593d992 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -61,4 +61,4 @@ minimumReleaseAgeExclude:- "@deepseek-ai/[email protected]"- "@deepseek-ai/[email protected]"- "@microsoft/[email protected]"- - "@prismshadow/[email protected]"+ - "@prismshadow/[email protected]"