Skip to content

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

fix(model-catalog): use Responses for ModelScope presets (#820)

Laodouuu77230c4cdfa0
diff --git a/changelog/unreleased/2026-09-22-modelscope-responses-protocol.md b/changelog/unreleased/2026-09-22-modelscope-responses-protocol.md
new file mode 100644
index 00000000..b5a7f19f
--- /dev/null
+++ b/changelog/unreleased/2026-09-22-modelscope-responses-protocol.md
@@ -0,0 +1,15 @@
+# ModelScope presets on the Responses protocol
+
+- **Date:** 2026-09-22
+- **Type:** fix
+- **Scope:** `model-catalog`, `web`, `docs`
+- **PR:** [#820](https://github.com/Prism-Shadow/penguin-harness/pull/820)
+
+[中文版](2026-09-22-modelscope-responses-protocol.zh.md)
+
+Moved all three built-in ModelScope presets to AgentHub's generic OpenAI Responses client.
+
+## Details
+
+- Pinned `deepseek-ai/DeepSeek-V4.1-Flash`, `Qwen/Qwen3.8-27B` and `Qwen/Qwen3.8-Flash-Next` to `client_type = "openai-responses"`, sending inference requests to the existing api-inference base URL's `/responses` path.
+- Existing Projects keep their stored protocol until **Sync presets** or the next ModelScope authorization updates the catalog-owned client type. No Project config fields or database migration were added.
diff --git a/changelog/unreleased/2026-09-22-modelscope-responses-protocol.zh.md b/changelog/unreleased/2026-09-22-modelscope-responses-protocol.zh.md
new file mode 100644
index 00000000..24829b10
--- /dev/null
+++ b/changelog/unreleased/2026-09-22-modelscope-responses-protocol.zh.md
@@ -0,0 +1,15 @@
+# ModelScope 预置改用 Responses 协议
+
+- **Date:** 2026-09-22
+- **Type:** fix
+- **Scope:** `model-catalog`, `web`, `docs`
+- **PR:** [#820](https://github.com/Prism-Shadow/penguin-harness/pull/820)
+
+[English](2026-09-22-modelscope-responses-protocol.md)
+
+将三条内置 ModelScope 预置统一切换到 AgentHub 通用 OpenAI Responses 客户端。
+
+## 细节
+
+- 将 `deepseek-ai/DeepSeek-V4.1-Flash`、`Qwen/Qwen3.8-27B` 和 `Qwen/Qwen3.8-Flash-Next` 固定为 `client_type = "openai-responses"`,推理请求发往既有 api-inference base URL 的 `/responses` 路径。
+- 既有 Project 会保留已存协议,直到执行**同步预置**或下一次 ModelScope 授权,由目录更新其客户端类型。本次没有新增 Project 配置字段或数据库迁移。
diff --git a/packages/core/src/state/model-catalog.ts b/packages/core/src/state/model-catalog.ts
index 81392f0e..4a29d42f 100644
--- a/packages/core/src/state/model-catalog.ts
+++ b/packages/core/src/state/model-catalog.ts
@@ -45,8 +45,7 @@
* auto-routed by AgentHub and leave client_type unset; seven gateway groups (OpenRouter,
* Fireworks AI, SiliconFlow, TokenDance, OpenCode Go, Qwen Pay-As-You-Go and Qwen Token Plan)
* can't be auto-routed, so every gateway row **always pins an explicit client_type** and
- * inlines its preset base URL. ModelScope is a mixed-protocol aggregator like Penguin Go:
- * each row pins the AgentHub protocol that its upstream model should display and use.
+ * inlines its preset base URL. ModelScope's rows pin one protocol too (see below).
* Two groups pin at GROUP level as well (ModelProviderInfo.clientType, read
* through providerClientType), so that a model the user adds there speaks the same protocol
* as the presets: vLLM, whose added models have no preset base URL to inherit either, and
@@ -68,9 +67,9 @@
* - `ant-messages` for the OpenCode Go rows its endpoint table serves on the Anthropic
* Messages API. That group pins row by row, since its models sit on three protocols: the
* rest of it is `openai-chat` and `openai-responses` — see its block comment.
- * ModelScope's rows follow the same explicit-row rule as Penguin Go even though the endpoint is
- * one gateway: its Qwen rows pin the vLLM adapter, while its DeepSeek row pins `deepseek-v4` so
- * the frontend shows each model's actual AgentHub protocol instead of flattening the group.
+ * ModelScope's rows all pin `openai-responses`: ModelScope serves every preset through its
+ * OpenAI Responses endpoint, and the explicit pin keeps a Qwen or DeepSeek id from auto-routing
+ * to a vendor client with a different request shape.
*
* Two direct-vendor rows pin anyway, because their own id does not route: the MiniMax M3
* preset pins AgentHub's first-party `minimax-m3` protocol and direct API endpoint, and
@@ -289,8 +288,8 @@ export const MODELSCOPE_PROVIDER_ID = "modelscope";
* group records the OPENAI_* pair as the fact it is — and that is exactly why a keyless
* gateway row is refused the fallback (see modelEnvFallback): the variable holds the user's
* OpenAI (or Anthropic) key, and a gateway is neither. ModelScope also records the OPENAI_*
- * pair because its group credential is an api-inference access token even when a row's
- * protocol is model-specific; its rows are refused the fallback on the same terms.
+ * pair because its group credential is an api-inference access token; its rows are refused
+ * the fallback on the same terms.
*/
export const MODEL_PROVIDERS: ModelProviderInfo[] = [
{
@@ -2348,11 +2347,9 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
// own `org/Model-Name` spelling; DeepSeek was read from the endpoint's public /v1/models
// listing (2026-09-18), and the Qwen additions from their public model pages (2026-09-20).
//
- // Like Penguin Go, this is a mixed-protocol aggregate: rows pin the AgentHub protocol the
- // upstream model should display and use. The Qwen ids have no native AgentHub qwen client and
- // therefore use the vLLM Chat Completions adapter, which maps thinking controls onto their
- // chat templates; the DeepSeek id pins `deepseek-v4` so it shows the same protocol family as
- // the direct and Penguin Go DeepSeek V4 rows instead of flattening the group to one protocol.
+ // ModelScope serves all three presets through its OpenAI Responses endpoint, so every row pins
+ // AgentHub's generic Responses client. Keeping the protocol explicit also prevents ids from
+ // auto-routing to vendor-specific clients with a different request shape.
//
// The window and vision flags are NOT read from ModelScope's own docs — its model pages are
// client-rendered and carry no price. They repeat what other rows of the same models record,
@@ -2369,7 +2366,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
provider: MODELSCOPE_PROVIDER_ID,
contextWindow: 1000000,
supportsVision: true,
- clientType: "deepseek-v4",
+ clientType: "openai-responses",
baseUrl: MODELSCOPE_BASE_URL,
},
{
@@ -2378,7 +2375,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
provider: MODELSCOPE_PROVIDER_ID,
contextWindow: 262144,
supportsVision: true,
- clientType: VLLM_CLIENT_TYPE,
+ clientType: "openai-responses",
baseUrl: MODELSCOPE_BASE_URL,
},
{
@@ -2387,7 +2384,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
provider: MODELSCOPE_PROVIDER_ID,
contextWindow: 262144,
supportsVision: true,
- clientType: VLLM_CLIENT_TYPE,
+ clientType: "openai-responses",
baseUrl: MODELSCOPE_BASE_URL,
},
// -- MiniMax (direct M3 Responses client; official USD pay-as-you-go list prices, standard
@@ -2999,9 +2996,9 @@ export function resolveModelEnv(modelId: string, clientType?: string): ModelEnvI
/**
* Resolves the credential environment for a configured model entry. Most groups follow the
* AgentHub client selected by model id / protocol. Aggregate groups are deliberately different:
- * Penguin Go's Google and DeepSeek routes share one relay credential, and ModelScope's Qwen and
- * DeepSeek routes share one api-inference token, so the provider-scoped variable must win over
- * the selected protocol everywhere the harness resolves a key. Whether a keyless row may use
+ * Penguin Go's Google and DeepSeek routes share one relay credential, and ModelScope's rows
+ * share one api-inference token, so the provider-scoped variable must win over the selected
+ * protocol everywhere the harness resolves a key. Whether a keyless row may use
* that variable is modelEnvFallback's decision: ModelScope's is OPENAI_*, a vendor variable, so
* its rows get no fallback.
*/
diff --git a/packages/core/test/model-catalog.test.ts b/packages/core/test/model-catalog.test.ts
index 48402994..ec3f0cae 100644
--- a/packages/core/test/model-catalog.test.ts
+++ b/packages/core/test/model-catalog.test.ts
@@ -880,11 +880,10 @@ describe("model-catalog", () => {
expect(m.baseUrl).toBe("https://dashscope.aliyuncs.com/compatible-mode/v1");
}
const ms = MODEL_CATALOG.filter((m) => m.provider === "modelscope");
- // Preset rows keep ModelScope's upstream ids. Like Penguin Go, this group is an aggregate:
- // the row's client type tracks the upstream model family for display/request semantics, while
- // the group credential remains ModelScope's api-inference token. Pricing is deliberately
- // absent (see UNPRICED above); the windows and vision flags repeat what other rows of the
- // same models record.
+ // Preset rows keep ModelScope's upstream ids and pin the Responses protocol served by its
+ // api-inference endpoint, while the group credential remains ModelScope's token. Pricing is
+ // deliberately absent (see UNPRICED above); the windows and vision flags repeat what other
+ // rows of the same models record.
expect(
ms.map((m) => [m.modelId, m.contextWindow, m.supportsVision, m.clientType, m.baseUrl]),
).toEqual([
@@ -892,21 +891,21 @@ describe("model-catalog", () => {
"deepseek-ai/DeepSeek-V4.1-Flash",
1000000,
true,
- "deepseek-v4",
+ "openai-responses",
"https://api-inference.modelscope.cn/v1",
],
[
"Qwen/Qwen3.8-27B",
262144,
true,
- "openai-chat-vllm-adapter",
+ "openai-responses",
"https://api-inference.modelscope.cn/v1",
],
[
"Qwen/Qwen3.8-Flash-Next",
262144,
true,
- "openai-chat-vllm-adapter",
+ "openai-responses",
"https://api-inference.modelscope.cn/v1",
],
]);
diff --git a/packages/docs/content/configuration.en.md b/packages/docs/content/configuration.en.md
index 881be455..0ce73c51 100644
--- a/packages/docs/content/configuration.en.md
+++ b/packages/docs/content/configuration.en.md
@@ -79,7 +79,7 @@ When a model entry has no inline `api_key`, it falls back to the provider's envi
| zhipu | `ZAI_API_KEY` | `ZAI_BASE_URL` |
| moonshot | `MOONSHOT_API_KEY` | `MOONSHOT_BASE_URL` |
-The openrouter, fireworks, siliconflow, tokendance, opencode-go, qwen-pay-as-you-go, qwen-token-plan, vllm and custom groups speak an OpenAI-compatible protocol, hence the shared `OPENAI_*` variables — which, by the rule above, their rows do not fall back to: the variable holds your OpenAI key, and a gateway is not OpenAI. The same holds for the opencode-go models on Anthropic Messages, whose client reads `ANTHROPIC_*`. ModelScope also shares `OPENAI_*` because its group credential is an api-inference token, even when a preset row pins a model-specific protocol; its rows do not fall back to it either. The Penguin Go relay keeps a pair of its own, so the app never offers a vendor credential for it. The direct MiniMax M3 Responses client uses `MINIMAX_*`, and the built-in MiniMax preset already pins the official endpoint. For provider groups and the built-in model catalog, see [Models & Providers](/models).
+The openrouter, fireworks, siliconflow, tokendance, opencode-go, qwen-pay-as-you-go, qwen-token-plan, vllm and custom groups speak an OpenAI-compatible protocol, hence the shared `OPENAI_*` variables — which, by the rule above, their rows do not fall back to: the variable holds your OpenAI key, and a gateway is not OpenAI. The same holds for the opencode-go models on Anthropic Messages, whose client reads `ANTHROPIC_*`. ModelScope also shares `OPENAI_*` because its group credential is an api-inference token, and all three presets pin the generic Responses client; its rows do not fall back to it either. The Penguin Go relay keeps a pair of its own, so the app never offers a vendor credential for it. The direct MiniMax M3 Responses client uses `MINIMAX_*`, and the built-in MiniMax preset already pins the official endpoint. For provider groups and the built-in model catalog, see [Models & Providers](/models).
## Project config
diff --git a/packages/docs/content/configuration.zh.md b/packages/docs/content/configuration.zh.md
index da64c042..d4b6aadf 100644
--- a/packages/docs/content/configuration.zh.md
+++ b/packages/docs/content/configuration.zh.md
@@ -79,7 +79,7 @@ Agent 运行的每条命令,PATH 的第一位都是本安装自带的 `penguin
| zhipu | `ZAI_API_KEY` | `ZAI_BASE_URL` |
| moonshot | `MOONSHOT_API_KEY` | `MOONSHOT_BASE_URL` |
-openrouter、fireworks、siliconflow、tokendance、opencode-go、qwen-pay-as-you-go、qwen-token-plan、vllm 和 custom 这几组供应商使用 OpenAI 兼容协议,因此共用 `OPENAI_*` 变量——按上面的规则,它们的条目并不会回退到这对变量:变量里存的是你的 OpenAI key,而网关不是 OpenAI。opencode-go 分组中走 Anthropic Messages 的模型同理,其客户端读取的是 `ANTHROPIC_*`。ModelScope 也共用 `OPENAI_*`,因为它的分组凭据是 api-inference token,即使某条预置固定了模型专属协议也是如此;它的条目同样不会回退到这对变量。Penguin Go 中转分组单独使用一对自己的变量,应用因此不会为它推荐任何厂商凭证。MiniMax M3 的直连 Responses 客户端使用 `MINIMAX_*`,内置的 MiniMax 预设也已经固定为官方端点。供应商分组和内置模型目录见[模型与供应商](/models)。
+openrouter、fireworks、siliconflow、tokendance、opencode-go、qwen-pay-as-you-go、qwen-token-plan、vllm 和 custom 这几组供应商使用 OpenAI 兼容协议,因此共用 `OPENAI_*` 变量——按上面的规则,它们的条目并不会回退到这对变量:变量里存的是你的 OpenAI key,而网关不是 OpenAI。opencode-go 分组中走 Anthropic Messages 的模型同理,其客户端读取的是 `ANTHROPIC_*`。ModelScope 也共用 `OPENAI_*`,因为它的分组凭据是 api-inference token,三条预置都固定使用通用 Responses 客户端;它的条目同样不会回退到这对变量。Penguin Go 中转分组单独使用一对自己的变量,应用因此不会为它推荐任何厂商凭证。MiniMax M3 的直连 Responses 客户端使用 `MINIMAX_*`,内置的 MiniMax 预设也已经固定为官方端点。供应商分组和内置模型目录见[模型与供应商](/models)。
## Project 配置
diff --git a/packages/docs/content/models.en.md b/packages/docs/content/models.en.md
index d71a44bc..e5ba8335 100644
--- a/packages/docs/content/models.en.md
+++ b/packages/docs/content/models.en.md
@@ -422,11 +422,11 @@ The table below lists the built-in groups and the environment variables their mo
| vllm | `OPENAI_API_KEY` | Self-hosted vLLM servers: protocol fixed to `openai-chat-vllm-adapter`, no preset base URL, eight preset models priced at 0 (see [Connect a local or self-hosted endpoint](#connect-a-local-or-self-hosted-endpoint)) |
| custom | `OPENAI_API_KEY` | Any OpenAI-protocol endpoint; ships one preset, Atria Dawn Preview (Anthropic Messages API at `api.atria-asi.ai`, needs its own key, 256K window, priced at $0 until the vendor publishes prices) |
-The OpenAI-compatible gateway groups (openrouter / fireworks / siliconflow / tokendance / qwen-pay-as-you-go / qwen-token-plan) go through AgentHub's generic OpenAI-protocol clients, whose variable is `OPENAI_API_KEY`; a keyless row there is refused rather than sent your OpenAI key. The same holds for custom, vLLM and user-created groups unless the row's base URL is the vendor's own endpoint. ModelScope also uses the `OPENAI_*` credential variables because its credential is an api-inference token, but its preset rows can pin a model-specific protocol; a keyless ModelScope row is refused the same way.
+The OpenAI-compatible gateway groups (openrouter / fireworks / siliconflow / tokendance / qwen-pay-as-you-go / qwen-token-plan) go through AgentHub's generic OpenAI-protocol clients, whose variable is `OPENAI_API_KEY`; a keyless row there is refused rather than sent your OpenAI key. The same holds for custom, vLLM and user-created groups unless the row's base URL is the vendor's own endpoint. ModelScope also uses the `OPENAI_*` credential variables because its credential is an api-inference token, and all three presets pin the generic Responses protocol; a keyless ModelScope row is refused the same way.
- The OpenRouter group uses the Responses client (`client_type = "openai-responses"`) for its presets and for any model you add to it, because OpenRouter serves the Responses API at that same base URL for every model it resells.
- The other gateway presets use the Chat Completions client (`client_type = "openai-chat"`).
-- ModelScope is an aggregate gateway like Penguin Go: its Qwen presets use `openai-chat-vllm-adapter`, carrying Qwen template thinking controls over Chat Completions, while its DeepSeek preset pins `deepseek-v4` and uses AgentHub's Responses client.
+- ModelScope is an aggregate gateway like Penguin Go, but all three of its presets use AgentHub's generic Responses client (`client_type = "openai-responses"`).
- Those gateway clients read the same `OPENAI_*` variables, so the credential rules are identical either way.
- The OpenCode Go group is the exception: its models use three protocols, so each one pins its own; see [The OpenCode Go group](#the-opencode-go-group).
@@ -455,7 +455,7 @@ The platform quotes peak rates in USD per million Tokens. The group's DeepSeek r
### The ModelScope group
-`modelscope` is an aggregate gateway group: one ModelScope api-inference endpoint behind the preset base URL `https://api-inference.modelscope.cn/v1`, with each preset row carrying the protocol that AgentHub should use for that upstream model. Model ids are upstream repo names, so they keep their vendor prefix (`deepseek-ai/DeepSeek-V4.1-Flash`, `Qwen/Qwen3.8-27B`). The Qwen rows use `openai-chat-vllm-adapter`, retaining Chat Completions on the wire while mapping thinking controls to the Qwen template; the DeepSeek row pins `deepseek-v4`, matching the direct and Penguin Go DeepSeek V4 rows. A new Project gets these presets right away; a Project created earlier adds them with **Sync presets**.
+`modelscope` is an aggregate gateway group: one ModelScope api-inference endpoint behind the preset base URL `https://api-inference.modelscope.cn/v1`. Model ids are upstream repo names, so they keep their vendor prefix (`deepseek-ai/DeepSeek-V4.1-Flash`, `Qwen/Qwen3.8-27B`). All three preset rows pin AgentHub's generic Responses client (`client_type = "openai-responses"`) and send inference requests to `{base_url}/responses`. A new Project gets these presets right away; an existing Project updates its stored protocol with **Sync presets** or the next ModelScope authorization.
The group's key comes from its header; see [Authorize a new API key](#authorize-a-new-api-key). Authorization goes through an authorization bridge, which holds the ModelScope client secret and returns an api-inference access token / refresh token pair, rather than through ModelScope's own pages. Nothing else about the group is special: inference requests go straight to `https://api-inference.modelscope.cn/v1` and never through the bridge. The access token is written into `.project_config.toml` like any other group key, while the refresh token stays only in the server DB. The access token expires, and PenguinHarness silently renews it before model requests; re-authorize from the header only when the refresh token is missing or no longer valid.
diff --git a/packages/docs/content/models.zh.md b/packages/docs/content/models.zh.md
index c2afd6e7..2ee2e83b 100644
--- a/packages/docs/content/models.zh.md
+++ b/packages/docs/content/models.zh.md
@@ -421,11 +421,11 @@ PenguinHarness 升级可能改变内置的预置模型目录。一旦发生,Pr
| vllm | `OPENAI_API_KEY` | 自托管 vLLM 服务器:协议固定为 `openai-chat-vllm-adapter`,无预置 base URL,八个预置模型价格均为 0(见[连接本地或自托管端点](#连接本地或自托管端点)) |
| custom | `OPENAI_API_KEY` | 任意 OpenAI 协议端点;自带一个预置模型 Atria Dawn Preview(Anthropic Messages API,地址 `api.atria-asi.ai`,需要自己的 key,上下文窗口 256K,供应商公布价格之前定价 $0) |
-OpenAI 兼容网关分组(openrouter / fireworks / siliconflow / tokendance / qwen-pay-as-you-go / qwen-token-plan)走的是 AgentHub 通用的 OpenAI 协议客户端,对应变量是 `OPENAI_API_KEY`;其中没有 key 的条目会被拒绝,而不是把你的 OpenAI key 发过去。custom、vLLM 和自建分组同样如此,除非条目的 base URL 就是厂商自己的端点。ModelScope 也使用 `OPENAI_*` 凭据变量,因为它的凭据是 api-inference token,但它的预置条目可以逐条固定模型专属协议;没有 key 的 ModelScope 条目同样会被拒绝。
+OpenAI 兼容网关分组(openrouter / fireworks / siliconflow / tokendance / qwen-pay-as-you-go / qwen-token-plan)走的是 AgentHub 通用的 OpenAI 协议客户端,对应变量是 `OPENAI_API_KEY`;其中没有 key 的条目会被拒绝,而不是把你的 OpenAI key 发过去。custom、vLLM 和自建分组同样如此,除非条目的 base URL 就是厂商自己的端点。ModelScope 也使用 `OPENAI_*` 凭据变量,因为它的凭据是 api-inference token,三条预置都固定使用通用 Responses 协议;没有 key 的 ModelScope 条目同样会被拒绝。
- OpenRouter 分组的预置模型,以及你添加到该分组的任何模型,都使用 Responses 客户端(`client_type = "openai-responses"`),因为 OpenRouter 在同一个 base URL 上为它转售的每一个模型提供 Responses API。
- 其他网关的预置模型使用 Chat Completions 客户端(`client_type = "openai-chat"`)。
-- ModelScope 像 Penguin Go 一样是聚合网关:Qwen 预置使用 `openai-chat-vllm-adapter`,在 Chat Completions 上按 Qwen 模板传递思考参数;DeepSeek 预置固定为 `deepseek-v4`,运行时走 AgentHub Responses client。
+- ModelScope 像 Penguin Go 一样是聚合网关,但三条预置都使用 AgentHub 通用 Responses 客户端(`client_type = "openai-responses"`)。
- 这些网关客户端读取相同的 `OPENAI_*` 变量,所以无论哪种方式,凭据规则完全一致。
- OpenCode Go 分组是例外:它的模型用到三种协议,因此每个模型各自固定协议,见 [OpenCode Go 分组](#opencode-go-分组)。
@@ -454,7 +454,7 @@ OpenAI 兼容网关分组(openrouter / fireworks / siliconflow / tokendance /
### ModelScope 分组
-`modelscope` 是聚合网关分组:同一个魔搭 api-inference 端点,预置 base URL `https://api-inference.modelscope.cn/v1`,每条预置各自写明 AgentHub 应该为这个上游模型使用的协议。模型 id 就是上游仓库名,因此保留供应商前缀(`deepseek-ai/DeepSeek-V4.1-Flash`、`Qwen/Qwen3.8-27B`)。Qwen 条目使用 `openai-chat-vllm-adapter`,在线路仍为 Chat Completions 的同时正确控制 Qwen 模板的思考参数;DeepSeek 条目固定为 `deepseek-v4`,与直连 DeepSeek 和 Penguin Go 的 DeepSeek V4 条目保持一致。新建的 Project 立即带上这些预置;更早创建的 Project 用**同步预置**补上。
+`modelscope` 是聚合网关分组:三条预置共用魔搭 api-inference 端点,预置 base URL 为 `https://api-inference.modelscope.cn/v1`。模型 id 就是上游仓库名,因此保留供应商前缀(`deepseek-ai/DeepSeek-V4.1-Flash`、`Qwen/Qwen3.8-27B`)。三条预置都固定使用 AgentHub 通用 Responses 客户端(`client_type = "openai-responses"`),推理请求发往 `{base_url}/responses`。新建的 Project 立即带上这些预置;既有 Project 可通过**同步预置**或下一次 ModelScope 授权更新已存的协议。
分组的 key 从标题栏取得,见[授权获取新 API key](#授权获取新-api-key)。授权走一台授权中转层,由中转层持有魔搭的 client secret 并交回一组 api-inference access token / refresh token,而不是经过魔搭自己的页面。除此之外这个分组没有特别之处:推理请求直接发给 `https://api-inference.modelscope.cn/v1`,从不经过中转层;access token 和其他分组的 key 一样写进 `.project_config.toml`,refresh token 只保存在服务端 DB。access token 会过期,PenguinHarness 会在模型请求前静默续期;refresh token 缺失或失效时,才需要从标题栏重新授权一次。
diff --git a/packages/server/test/modelscope-auth.test.ts b/packages/server/test/modelscope-auth.test.ts
index 7e571c4d..c3e104f8 100644
--- a/packages/server/test/modelscope-auth.test.ts
+++ b/packages/server/test/modelscope-auth.test.ts
@@ -587,6 +587,7 @@ describe("ModelScope key authorization routes", () => {
"Qwen/Qwen3.8-27B",
"Qwen/Qwen3.8-Flash-Next",
]);
+ expect(preset.every((model) => model.clientType === "openai-responses")).toBe(true);
expect(preset.every((model) => model.credential?.apiKeyMasked === undefined)).toBe(true);
expect((await memberClient.post(`${base}/start`, {})).status).toBe(403);
diff --git a/packages/web/test/protocol-path.test.ts b/packages/web/test/protocol-path.test.ts
index 9e52e6e9..3d14cfd2 100644
--- a/packages/web/test/protocol-path.test.ts
+++ b/packages/web/test/protocol-path.test.ts
@@ -30,11 +30,8 @@ describe("protocolPathForModel", () => {
expect(protocolPathForModel("myproxy", "deepseek-v4")).toBe("/responses");
});
- it("ModelScope aggregate presets display the path for their pinned protocol", () => {
- expect(protocolPathForModel("modelscope", "deepseek-v4")).toBe("/responses");
- expect(protocolPathForModel("modelscope", "openai-chat-vllm-adapter")).toBe(
- "/chat/completions",
- );
+ it("ModelScope aggregate presets display the Responses path", () => {
+ expect(protocolPathForModel("modelscope", "openai-responses")).toBe("/responses");
});
it("the remaining direct vendors speak chat completions", () => {