dsh-newapi-provider 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/PUBLISHING.md CHANGED
@@ -6,13 +6,15 @@
6
6
 
7
7
  | 项目 | 状态 |
8
8
  | --- | --- |
9
- | 版本 | 0.8.1(未发布) |
10
- | 包名 | `dsh-newapi-provider` — npm 上仍是 404,名称可用 |
9
+ | npm | **已发布 0.8.3** — https://www.npmjs.com/package/dsh-newapi-provider (`latest`,2026-10-23 17:48 东八区) |
10
+ | 包内容校验 | 下载 tarball 与仓库逐文件字节一致,19 个文件,shasum 一致,无凭据泄漏 |
11
+ | Git tag | `v0.8.3` 已推送 |
11
12
  | 仓库 | https://github.com/zenVibeCoding/dsh-newapi-provider (公开,已加 `dsh-plugin` topic) |
13
+ | 市场投稿 | **未提交**,条目文件已备好:[docs/market-entry.yml](docs/market-entry.yml),卡片图 [assets/icon-180.png](assets/icon-180.png) |
14
+ | 可投稿时间 | 仓库创建 2026-10-23 07:01 UTC,满 24 小时 = **2026-10-24 15:01(东八区)之后** |
12
15
  | 许可证 | MIT,作者 `zenVibeCoding` |
13
16
  | 验证环境 | DSH 0.2.1-rc.2 / Node.js 22.19+,`engines.dsh: >=0.2.1-rc.1 <0.3.0-0` |
14
17
  | 离线测试 | `npm test`,103 项全过 |
15
- | 打包 | 19 个文件,无凭据/本机路径 |
16
18
  | 真实生图 | **未验证**(网关返回 503 无可用渠道) |
17
19
  | 真实视频 | **未验证**(无视频渠道),工具为实验性 |
18
20
 
@@ -85,25 +87,28 @@ dsh plugin add dsh-newapi-provider # 走 npm 而非本地目录
85
87
 
86
88
  **时间门槛**:仓库创建于 2026-10-23 07:01 UTC,需满 24 小时,即 **2026-10-24 15:01(东八区)之后**再提 PR。
87
89
 
88
- 投稿文件内容(保存为 `data/plugins/zenVibeCoding__dsh-newapi-provider.yml`):
90
+ 条目已经写好并校验通过:**[docs/market-entry.yml](docs/market-entry.yml)**(用 js-yaml 解析验证过,分类合法、描述以句号结尾)。目标路径是 `data/plugins/zenVibeCoding__dsh-newapi-provider.yml`,直接复制即可:
89
91
 
90
92
  ```yaml
91
93
  url: https://github.com/zenVibeCoding/dsh-newapi-provider
92
94
  name: zenVibeCoding/dsh-newapi-provider
93
95
  category: model
94
96
  description:
95
- en: 'New API gateway provider: multi-channel models with context and modality details, quota, and image and video generation.'
96
- zh: 'New API 网关提供商:多渠道模型管理与上下文/多模态标注、额度查询,以及生图与视频生成。'
97
+ en: 'New API gateway provider: several gateways with one active at a time, per-gateway model lists with context and modality details, quota, and image and video generation tools.'
98
+ zh: 'New API 网关提供商:多网关同一时间激活一个,每个网关独立的模型清单与上下文/多模态标注、额度查询,以及生图与视频生成工具。'
99
+ icon: https://raw.githubusercontent.com/zenVibeCoding/dsh-newapi-provider/master/assets/icon-180.png
97
100
  ```
98
101
 
99
- > 描述里有 `: ` 必须加引号,否则 YAML 解析失败。
102
+ > 描述里有 `: ` 必须加引号,否则 YAML 解析失败(上面英文描述就是这种情况)。
103
+ > 卡片图是 `assets/icon-180.png`(180×180 PNG),市场要求 GitHub 托管的位图;仓库里的 `icon.svg` 是 DSH 插件页用的,不适用于市场卡片。
100
104
 
101
105
  提交步骤:
102
106
 
103
107
  ```sh
104
108
  gh repo fork awesome-dsh-plugin/awesome-dsh-plugin --clone
105
109
  cd awesome-dsh-plugin
106
- # 写入上面那个 yml(文件名必须是 owner__repo.yml)
110
+ mkdir -p data/plugins
111
+ cp ~/dsh-newapi-provider/docs/market-entry.yml data/plugins/zenVibeCoding__dsh-newapi-provider.yml
107
112
  git checkout -b add-dsh-newapi-provider
108
113
  git add data/plugins/zenVibeCoding__dsh-newapi-provider.yml
109
114
  git commit -m "Add dsh-newapi-provider"
package/README.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  English · [中文](README.zh.md)
4
4
 
5
- A New API gateway workbench for DeepSeek Harness: several gateways with one active at a time, per-gateway model lists and parameter overrides, quota, and image and experimental video generation. **Development build; not published to npm yet.**
5
+ A New API gateway workbench for DeepSeek Harness: several gateways with one active at a time, per-gateway model lists and parameter overrides, quota, and image and experimental video generation.
6
+
7
+ [![npm](https://img.shields.io/npm/v/dsh-newapi-provider.svg)](https://www.npmjs.com/package/dsh-newapi-provider)
8
+ [![license](https://img.shields.io/npm/l/dsh-newapi-provider.svg)](LICENSE)
6
9
 
7
10
  ![Settings → New API Provider: gateways and connections](docs/screenshots/channels.png)
8
11
 
@@ -16,54 +19,52 @@ A New API gateway workbench for DeepSeek Harness: several gateways with one acti
16
19
 
17
20
  The screenshots render this plugin's real components and stylesheet with sample data; gateway names, URLs and amounts are examples. The UI follows the DSH theme, so colours adapt to your skin and dark mode.
18
21
 
19
- ## Features
22
+ ## Install
20
23
 
21
- - Save multiple gateways and activate exactly one. Each keeps its own URL, credential reference, model list and model overrides.
22
- - Channel-scoped model management: fetch what a gateway lists, choose which models appear in DSH, test one model, remove with undo, add models the gateway does not list.
23
- - Capability data from models.dev (context window, output cap, modalities, reasoning), correctable per model, with an optional per-model upstream name mapping.
24
- - Token quota plus account balance when the token is allowed to query it; unlimited tokens show used quota instead of a negative remainder.
25
- - Generate images as durable DSH attachments; experimental video through the unified `/v1/videos` interface with background polling and restart recovery.
24
+ Requires **DSH 0.2.1-rc.1 or newer** (verified on 0.2.1-rc.2) and Node.js 22.19+.
26
25
 
27
- ## Requirements and local installation
26
+ Install `dsh-newapi-provider` with DSH's plugin manager, then refresh the page and open **Settings → New API Provider**. No separate web server is needed.
28
27
 
29
- Verified runtime: **DSH 0.2.1-rc.2**, Node.js 22.19+. Install the local project directory with DSH's plugin manager, refresh the page, then open **Settings → New API Provider**. No separate web server is needed. Do not install this name from npm before it is published.
28
+ 1. **Add gateway** — name, New API site URL, calling token.
29
+ 2. **Fetch models** — read what the gateway lists, select the ones you want.
30
+ 3. **Activate the gateway** — this plugin's model route now serves those models.
30
31
 
31
- This replaces, rather than depends on, `dsh-gateway-provider`; two adapters cannot own the same provider route. The development installation uses the `newapi-provider` route.
32
+ The token is stored in the DSH credential service, never in the gateway configuration, and is never sent back to the browser.
32
33
 
33
- ## Migrating from the former name (v0.7.0)
34
-
35
- The plugin was called `dsh-newapi-studio`. The rename covers the package, the loader row and provider route (`newapi-provider`), the HTTP prefix (`/newapi-provider/api/`) and the data directory (`plugin-data/dsh-newapi-provider`).
36
-
37
- To migrate an existing installation, back up the profile patch and plugin data, then keep each channel's id, credential reference, model list and overrides while moving the data directory to the new name. This release does not read the old directory automatically. Keep existing credential references even if they contain `STUDIO`: they still hold the working tokens; new references use the `NEWAPI_PROVIDER_` prefix.
38
-
39
- Sessions pinned to the old `newapi-studio` route must pick models again under the new route. Other adapters are unaffected. Tool names (`newapi_channels`, `newapi_models`, …) did not change.
34
+ ## Features
40
35
 
41
- ## Gateways
36
+ - Several gateways, exactly one active; each keeps its own URL, credential reference, model list and model overrides.
37
+ - Channel-scoped model management: fetch what a gateway lists, choose which models appear in DSH, test one model, remove with undo, add models the gateway does not list.
38
+ - Capability data from models.dev (context window, output cap, modalities, reasoning), correctable per model, with an optional per-model upstream name mapping.
39
+ - Token quota in the settings summary and at the sidebar foot, plus the account balance when the token is allowed to query it.
40
+ - Image generation saved as durable DSH attachments with a generation history; experimental video through the unified `/v1/videos` interface with background polling and restart recovery.
42
41
 
43
- 1. **Add gateway**: name, site URL and a New API calling token.
44
- 2. **Test connection** reads the model list only and does not make paid model calls; it also shows the gateway version and model counts.
45
- 3. **Activate** switches every subsequent call made through this plugin, or tick "activate after saving".
46
- 4. Switching never rewrites other adapters or your default provider.
47
- 5. Submitted video tasks keep their originating gateway and are never polled on a newly activated one.
42
+ ## Gateways and quota
48
43
 
49
- Legacy flat `baseURL` / `apiKeyEnv` settings are still readable and are migrated to `channels` on the first settings-page save. Tokens live only in the DSH credential service: they are never echoed to the browser, never written into gateway configuration, never sent to a changed address without being re-entered, and are redacted from errors. Configuration writes carry a revision, so a stale editor gets a conflict instead of overwriting another window.
44
+ 1. **Test connection** reads the model list only and does not make paid model calls; it also shows the gateway version and model counts.
45
+ 2. **Activate** switches every subsequent call made through this plugin, or tick "activate after saving".
46
+ 3. Switching never rewrites other adapters or your default provider.
47
+ 4. Submitted video tasks keep their originating gateway and are never polled on a newly activated one.
50
48
 
51
- ## Balance
49
+ Quota details:
52
50
 
53
51
  - Quota comes from `GET /api/usage/token/` (note the trailing slash).
54
52
  - Amounts are converted with `/api/status` (`quota_per_unit`, `quota_display_type`, `usd_exchange_rate`), never the top-up price.
55
53
  - A token that allows user-quota queries also reports the account balance.
54
+ - An unlimited token shows used quota instead of a meaningless negative remainder.
56
55
  - Both numbers are the site's own; a present catalog or balance does not prove an upstream channel can serve a model.
57
56
 
57
+ The sidebar shows the active gateway's name and amount, with a health dot; click it to refresh. It collapses to a status dot when the sidebar is a rail.
58
+
58
59
  ## Per-gateway model lists
59
60
 
60
61
  Each gateway keeps an independent list, even when two gateways point at the same site with the same token:
61
62
 
62
63
  - **Model capabilities tab** has a gateway picker; the active gateway is marked and its list edits apply to that gateway only.
63
- - **Fetch models** reads the gateway catalog with a search box plus status (new / added / removed upstream) and kind filters; filtering only changes what is listed, never the current selection. The list scrolls on its own and the action bar stays in view.
64
+ - **Fetch models** reads the gateway catalog with a search box plus status (new / added / removed upstream) and kind filters, grouped by kind; filtering only changes what is listed, never the current selection. The list scrolls on its own and the action bar stays in view.
64
65
  - **Remove** only removes the model from this gateway; custom parameters can be kept and the removal can be undone briefly.
65
66
  - **Add manually** is for models the gateway can serve but does not list.
66
- - Gateways created in this version start with an empty list; channels saved before the feature existed stay in automatic mode (all gateway models) until their first edit, which materialises the list from what the gateway currently lists.
67
+ - Gateways created in current versions start with an empty list; channels saved before the feature existed stay in automatic mode (all gateway models) until their first edit, which materialises the list from what the gateway currently lists.
67
68
 
68
69
  ## Testing models
69
70
 
@@ -79,7 +80,13 @@ Each gateway keeps an independent list, even when two gateways point at the same
79
80
  - **Upstream model name** (`upstreamModel`): the `model` actually sent. Empty means the local id. Mapping is one hop and applies to chat, image generation, image edits, video and model tests.
80
81
  - The editor previews the mapping, resolves automatic protocol/capabilities/pricing from the mapping target, and lets input modalities and reasoning follow the catalog or be pinned. Reset clears every override including the mapping.
81
82
 
82
- Capability data is a hint, not proof: a relay may list a model and still fail to serve it. DSH chat currently accepts text and image input only; PDF, audio and video tags are informational.
83
+ Capability data is a hint, not proof: a relay may list a model and still fail to serve it.
84
+
85
+ ## Models and modalities
86
+
87
+ models.dev data is cached. Exact matches win; when nothing matches, defaults apply. Base-model matches, defaults and manual overrides are all marked in the UI. Never treat a guessed capability as something the gateway has proven.
88
+
89
+ The DSH chat interface currently accepts text and image input only. PDF, audio and video tags are catalog metadata and cannot be sent to a DSH chat. Image and video models serve the generation tools and do not appear as chat models.
83
90
 
84
91
  ## Tools
85
92
 
@@ -94,7 +101,9 @@ Capability data is a hint, not proof: a relay may list a model and still fail to
94
101
 
95
102
  Settings-page actions and these tools share one service, so nothing can drift between the UI and the agent.
96
103
 
97
- ## Paid results (v0.7.1)
104
+ **Image and video generation cost money.** A submission whose outcome is unknown is never resent automatically; check the gateway's task log first. Stopping a local watch does not cancel or refund the upstream task.
105
+
106
+ ## Paid results
98
107
 
99
108
  - A video submission that loses the connection or returns an unreadable body after HTTP 200 is reported as **submission unknown, possibly billed**, and is never resent automatically.
100
109
  - A video that finished upstream but failed to download stays **generated, retrying download**. Only GET requests are retried, against refreshed URLs; when the recovery deadline passes it becomes **generated, download unsuccessful**. Do not regenerate.
@@ -103,10 +112,18 @@ Settings-page actions and these tools share one service, so nothing can drift be
103
112
 
104
113
  ## Verification status
105
114
 
106
- - Real chat, model discovery, quota and per-channel lists have been exercised against a local New API instance.
115
+ - Real chat, model discovery, quota, per-gateway lists and gateway editing have been exercised against a local New API instance (v1.0.0-rc.45).
107
116
  - A real image request was rejected with HTTP 503 (no available upstream channel). Successful paid image generation is therefore **not yet verified**; the attachment pipeline is covered by offline tests.
108
117
  - Video is **experimental**: no real video channel was available. Submission, polling, download recovery, restart recovery and duplicate-submission prevention are covered offline only.
109
- - The settings page has been rendered and checked locally against the plugin stylesheet; final visual acceptance requires the connected DSH window.
118
+ - Only one New API deployment has been tested. Other versions and relays may differ in endpoint details.
119
+
120
+ ## Migrating from the former name (v0.7.0)
121
+
122
+ The plugin was called `dsh-newapi-studio`. The rename covers the package, the loader row and provider route (`newapi-provider`), the HTTP prefix (`/newapi-provider/api/`) and the data directory (`plugin-data/dsh-newapi-provider`).
123
+
124
+ To migrate an existing installation, back up the profile patch and plugin data, then keep each channel's id, credential reference, model list and overrides while moving the data directory to the new name. Current releases do not read the old directory automatically. Keep existing credential references even if they contain `STUDIO`: they still hold the working tokens; new references use the `NEWAPI_PROVIDER_` prefix.
125
+
126
+ Sessions pinned to the old `newapi-studio` route must pick models again under the new route. Other adapters are unaffected. Tool names (`newapi_channels`, `newapi_models`, …) did not change.
110
127
 
111
128
  ## Development
112
129
 
@@ -117,9 +134,11 @@ node --check client.js
117
134
  npm pack --dry-run --ignore-scripts
118
135
  ```
119
136
 
120
- DSH runtime imports are optional peerDependencies supplied by the host, so no DSH package is installed or copied here. Tests use local fake gateways and never read personal credentials.
137
+ To work on a checkout instead of the published package, install the project directory with DSH's plugin manager.
138
+
139
+ DSH runtime imports are optional peerDependencies supplied by the host, so no DSH package is installed or copied here. Tests use local fake gateways and never read personal credentials. This repository replaces, rather than depends on, `dsh-gateway-provider`; two adapters cannot own the same provider route.
121
140
 
122
- npm publishing, creating a public repository and marketplace submission are separate manual steps; see [PUBLISHING.md](PUBLISHING.md). Keep personal gateway data, credentials, research notes and session screenshots out of the package.
141
+ Release steps are in [PUBLISHING.md](PUBLISHING.md).
123
142
 
124
143
  MIT License. Uses public DSH exports and pi-ai protocol implementations; no third-party plugin source is vendored.
125
144
 
package/README.zh.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  [English](README.md) · 中文
4
4
 
5
- DeepSeek Harness 的 New API 渠道与模型工作台。**开发中,尚未发布到 npm。**
5
+ DeepSeek Harness 的 New API 渠道与模型工作台:多网关同一时间激活一个,每个网关独立的模型清单与参数覆盖,额度查询,以及生图与实验性视频生成。
6
+
7
+ [![npm](https://img.shields.io/npm/v/dsh-newapi-provider.svg)](https://www.npmjs.com/package/dsh-newapi-provider)
8
+ [![license](https://img.shields.io/npm/l/dsh-newapi-provider.svg)](LICENSE)
6
9
 
7
10
  ![设置 → New API 提供商:渠道与连接](docs/screenshots/channels.png)
8
11
 
@@ -16,65 +19,61 @@ DeepSeek Harness 的 New API 渠道与模型工作台。**开发中,尚未发
16
19
 
17
20
  截图使用插件真实的组件与样式渲染,数据为示例(渠道名、地址、金额均为虚构)。界面跟随 DSH 主题,配色会随你的皮肤和深色模式变化。
18
21
 
19
- ## 能做什么
20
-
21
- - 保存多个网关,每个渠道独立保存地址、凭据引用与模型参数;一次只激活一个。
22
- - 在「渠道与连接」中新增、编辑、测试、激活和删除渠道。
23
- - 查询令牌的剩余额度和已用量;无限额度显示累计已用,不展示无意义的负余额。
24
- - 从网关发现模型,从 models.dev 补充上下文、输出上限和输入/输出能力。
25
- - 在「模型能力」中搜索模型,直接编辑上下文、输出上限、模型类型、输入能力与显隐。
26
- - 生图工具返回 DSH 图片附件;视频工具使用统一 `/v1/videos` 接口后台轮询。
22
+ ## 安装
27
23
 
28
- ## 环境与安装
24
+ 需要 **DSH 0.2.1-rc.1 或以上**(已在 0.2.1-rc.2 验证),Node.js 22.19 或以上。
29
25
 
30
- 目前验证环境为 DSH **0.2.1-rc.2**,Node.js 22.19 或以上;Web 与 Desktop 配置页通过 DSH 原生插槽显示。不需要单独启动网页服务器。
26
+ 用 DSH 的插件管理工具安装 `dsh-newapi-provider`,安装后刷新页面,打开「设置 → New API 提供商」。不需要单独启动网页服务器。
31
27
 
32
- 通过 DSH 的插件管理工具安装本地项目目录。安装后刷新现有 DSH 页面,打开「设置 → New API 提供商」。未发布到 npm 前不要直接执行 `npm install dsh-newapi-provider`。
28
+ 1. **添加渠道** —— 填名称、New API 站点地址和调用令牌。
29
+ 2. **获取模型列表** —— 读取网关目录,勾选要用的模型。
30
+ 3. **激活渠道** —— 本插件的模型路由开始提供这些模型。
33
31
 
34
- 本插件不依赖 `dsh-gateway-provider`。若需要保留旧会话的 provider 名称,可使用相同的 `providerId`,但不能让两个适配器占用同一路由。当前开发安装保留独立的 `newapi-provider` 路由。
32
+ 令牌存在 DSH 凭据服务里,不写进渠道配置,也不会回传到浏览器。
35
33
 
36
- ## 从旧开发名称迁移(v0.7.0)
37
-
38
- 旧名称为 `dsh-newapi-studio`。此版本统一改为 `dsh-newapi-provider`:配置行与模型路由为 `newapi-provider`,HTTP 接口为 `/newapi-provider/api/`,数据目录为 `plugin-data/dsh-newapi-provider`。
39
-
40
- 已有安装迁移时需先备份配置和数据,再保留各渠道的 ID、凭据引用、模型清单及覆盖参数,将旧数据目录迁移至新名称。不要直接新装后丢弃旧配置;本版本不自动从旧目录读取。既有凭据引用即使含有 `STUDIO` 也应保留,新建引用使用 `NEWAPI_PROVIDER_` 前缀,无需复制令牌。
41
-
42
- 使用旧 `newapi-studio` 路由的会话需要重新选择新路由下的模型;其他适配器不受影响。工具名 `newapi_channels`、`newapi_models` 等保持不变。
43
-
44
- ## 渠道管理
34
+ ## 能做什么
45
35
 
46
- 1. 点击「添加渠道」,填写名称、New API 站点地址与调用令牌。
47
- 2. 「测试连接」只查询模型目录,不产生生成费用;能列出模型不代表上游渠道实际可调用。
48
- 3. 保存后点击「激活此渠道」,或勾选「保存后激活」。
49
- 4. 切换影响所有通过本插件路由发起的后续调用,不修改官方适配器或其他插件。
50
- 5. 已提交视频任务保持原始渠道,不应转向新激活的网关轮询。
36
+ - 保存多个网关,一次只激活一个;每个渠道独立保存地址、凭据引用、模型清单和模型参数覆盖。
37
+ - 按渠道管理模型:读取网关目录、挑选哪些模型出现在 DSH、单个测试、删除后撤销、手动添加网关未列出的模型。
38
+ - 能力数据来自 models.dev(上下文窗口、输出上限、多模态、推理),可按模型校正,并支持为单个模型设置上游映射名。
39
+ - 设置页汇总和侧栏底部都能看到令牌额度;令牌允许查询用户额度时同时显示账户余额。
40
+ - 生图结果保存为 DSH 附件并进入生成记录;视频使用统一 `/v1/videos` 接口、后台轮询与重启恢复,属实验性能力。
51
41
 
52
- 现有单渠道 `baseURL` / `apiKeyEnv` 配置可继续读取;第一次在页面保存渠道时迁移到 `channels` 数组。凭据只经 DSH 凭据服务读写,不在渠道配置中存明文,也不把已有令牌发回浏览器。
42
+ ## 渠道与额度
53
43
 
54
- 模型覆盖属于渠道;在编辑器里修改参数时,绑定打开编辑器时的渠道。出现配置冲突提示后应刷新再编辑,避免覆盖另一个窗口的修改。
44
+ 1. **测试连接**只读取模型目录,不产生生成费用;同时显示网关版本与模型数量。
45
+ 2. **激活**切换本插件后续所有调用,或勾选「保存后激活」。
46
+ 3. 切换不会修改官方适配器或其他插件。
47
+ 4. 已提交的视频任务保持原始渠道,不会转向新激活的网关轮询。
55
48
 
56
- ## 额度含义
49
+ 额度说明:
57
50
 
58
51
  - 主接口为 `GET /api/usage/token/`,注意末尾斜杠。
59
- - 金额换算使用 `/api/status` 的 `quota_per_unit`、`quota_display_type` 和 `usd_exchange_rate`,不使用充值单价 `price`。
60
- - 在 New API 为令牌开启「允许查询用户额度」后,较新版本可同时返回账户余额。
52
+ - 金额换算使用 `/api/status` 的 `quota_per_unit`、`quota_display_type`、`usd_exchange_rate`,不使用充值单价。
53
+ - 在 New API 为令牌开启「允许查询用户额度」后,可同时返回账户余额。
54
+ - 无限额度令牌显示累计已用,不展示无意义的负余额。
61
55
  - 这些数字来自站点;模型目录存在、余额可查,都不保证站点已配置可调用的上游。
62
56
 
63
- ## 模型清单与测试(v0.3.0 起,v0.6.0 支持按渠道独立)
57
+ 侧栏显示当前激活渠道的名称与金额,带健康状态点,点击即刷新;侧栏收成 56px 窄栏时只保留状态点。
58
+
59
+ ## 模型清单(按渠道独立)
64
60
 
65
61
  每个渠道独立维护自己的模型清单,即使两个渠道指向同一个站点、使用同一个令牌也互不影响:
66
62
 
67
63
  - 「模型能力」页顶部有渠道切换器。激活的渠道带标记,编辑只作用于当前选中的渠道。
68
- - 「获取模型列表」只读取网关目录,可按模型 ID/厂商搜索,并按状态(新增/已添加/网关已下架)和类型(对话/生图/视频/其他)筛选;筛选只影响显示,已勾选的模型不会丢失。列表自身滚动,底部操作栏始终可见。
69
- - 新增渠道的清单默认为空;旧渠道兼容原自动模式,第一次添加或删除时按网关当前目录物化清单。
64
+ - 「获取模型列表」只读取网关目录,可按模型 ID/厂商搜索,按状态(新增/已添加/网关已下架)和类型(对话/生图/视频/其他)筛选,并按类型分组显示。筛选只影响显示,已勾选的模型不会丢失;列表自身滚动,底部操作栏始终可见。
65
+ - 新增渠道的清单默认为空;旧渠道兼容原有自动模式,第一次添加或删除时按网关当前目录物化清单。
70
66
  - 删除只影响当前渠道,不删除上游模型;可以保留自定义参数,并短暂提供撤销。刷新不会把删除的模型自动加回来。
71
67
  - 「手动添加」适合网关未列出但可调用的自定义模型。已从网关下架的模型会单独标注,不自动删除。
72
- - 对话模型测试发送一条很短的真实请求,**会产生调用费用**,显示总耗时、首包时间、最近结果和脱敏错误。首包时间不等于首字时间。
73
- - 生图/视频测试每次需要二次确认,实际产生一个生成任务;视频提交成功只显示「任务已接受」,不等于生成验证通过。
74
- - 批量测试只针对当前筛选下的对话模型,最多3个并发。停止阻止后续排队请求;已发出的请求仍会完成并可能计费。
75
- - 当前测试器支持 OpenAI Chat、Responses 和 Anthropic Messages;Gemini专用协议测试会明确提示暂不支持,不会悄悄换协议测试。
76
68
 
77
- ## 模型名称映射(v0.4.0)
69
+ ## 模型测试
70
+
71
+ - 对话模型测试发送一条很短的真实请求,**会产生调用费用**,显示总耗时、首包时间、最近结果和脱敏错误。只有 `[DONE]` 而没有协议响应的流不算成功。
72
+ - 生图/视频测试每次需要二次确认,实际产生一个生成任务。签名图片链接无法安全展示时仍记录为已生成,但不会暴露链接;界面会提示不要因为看不到预览而重复生成。
73
+ - 批量测试只针对当前筛选下的对话模型,最多 3 个并发。停止会阻止后续排队请求;已发出的请求仍会完成并可能计费。
74
+ - 测试器支持 OpenAI Chat、Responses 和 Anthropic Messages;Gemini 专用协议会明确提示暂不支持,不会悄悄换协议。
75
+
76
+ ## 模型名称映射
78
77
 
79
78
  在模型编辑器的「名称与映射」中,三个名称各司其职:
80
79
 
@@ -86,7 +85,7 @@ DeepSeek Harness 的 New API 渠道与模型工作台。**开发中,尚未发
86
85
 
87
86
  编辑器显示请求映射预览。自动协议、能力、额度参数和定价优先从映射目标补全,手动覆盖仍然优先;输入能力可选自动或自定义,推理支持也可恢复为跟随目录。恢复默认会清除该模型的全部覆盖,包括上游映射。
88
87
 
89
- 当前映射有离线回归覆盖;未对真实上游追加付费映射调用。SDK 的模型专属请求兼容逻辑仍可能依赖本地 ID,所以跨厂商或跨模型系列映射需要检查协议、容量和能力是否合适。
88
+ 跨厂商或跨模型系列映射需要检查协议、容量和能力是否合适。模型编辑器修改参数时绑定打开时的渠道;出现配置冲突提示应刷新再编辑,避免覆盖另一个窗口的修改。
90
89
 
91
90
  ## 模型与多模态
92
91
 
@@ -109,20 +108,27 @@ DSH 当前对话接口只支持文本和图片输入。PDF、音频、视频标
109
108
 
110
109
  **生图和视频可能扣费。** 提交结果不确定时不会自动重新提交;请先到网关任务日志核对。停止本地观察任务不代表取消网关端生成或退款。
111
110
 
112
- ## 付费结果保护(v0.7.1)
111
+ ## 付费结果保护
113
112
 
114
113
  - 视频提交在收到响应头后断流、超时或响应不可解析,显示「提交结果未知,可能已计费」;不会自动重发提交。
115
- - 视频上游已生成、仅下载失败时显示「已生成,等待下载重试」。仅重试 GET 状态/下载,重新获取可能过期的下载链接;下载恢复期限届满则显示「已生成,下载未成功」。不要因此重新生成。
114
+ - 视频上游已生成、仅下载失败时显示「已生成,等待下载重试」。仅重试 GET 状态/下载,并重新获取可能过期的下载链接;下载恢复期限届满则显示「已生成,下载未成功」。不要因此重新生成。
116
115
  - 同一任务的并发查询合并为一个请求流程,卸载时中止在途网络请求,防止旧实例覆盖新实例缓存。
117
- - 模型测试必须有有效协议响应,仅有 `[DONE]` 不算成功。签名图片链接无法安全展示时仍记录已生成,不暴露签名链接;界面明确提示不要因没有预览而重复生成。
118
- - 本轮只使用离线假网关回归。视频仍属实验性功能,尚无真实视频渠道完成端到端验证。
116
+ - 失败的付费请求不会自动重试。
119
117
 
120
- ## 当前验证范围与限制
118
+ ## 验证范围与限制
121
119
 
122
- - 对话、目录与额度:已在本地 New API 上验证过。
123
- - 生图真实调用曾返回 503「无可用渠道」;模拟网关的附件保存链路通过,真实生成成功尚未验证。
124
- - 视频没有真实上游渠道,只做离线提交、后台轮询、下载、重启恢复与不重复提交测试,属于实验性能力。
125
- - 页面最新视觉效果仍需在连接的 DSH 窗口确认;不能以插槽注册成功代替视觉验收。
120
+ - 对话、模型目录、额度、按渠道独立清单与渠道编辑:已在本地 New API(v1.0.0-rc.45)上验证过。
121
+ - 生图真实调用曾返回 503「无可用渠道」,**真实生成成功尚未验证**;附件保存链路由离线测试覆盖。
122
+ - 视频属**实验性**能力:没有真实上游渠道,只做离线提交、后台轮询、下载恢复、重启恢复与不重复提交测试。
123
+ - 只测过一种 New API 部署;其他版本与中转站的接口细节可能不同。
124
+
125
+ ## 从旧开发名称迁移(v0.7.0)
126
+
127
+ 旧名称为 `dsh-newapi-studio`。此版本统一改为 `dsh-newapi-provider`:配置行与模型路由为 `newapi-provider`,HTTP 接口为 `/newapi-provider/api/`,数据目录为 `plugin-data/dsh-newapi-provider`。
128
+
129
+ 已有安装迁移时需先备份配置和数据,再保留各渠道的 ID、凭据引用、模型清单及覆盖参数,将旧数据目录迁移至新名称。当前版本不自动从旧目录读取。既有凭据引用即使含有 `STUDIO` 也应保留,新建引用使用 `NEWAPI_PROVIDER_` 前缀,无需复制令牌。
130
+
131
+ 使用旧 `newapi-studio` 路由的会话需要重新选择新路由下的模型;其他适配器不受影响。工具名 `newapi_channels`、`newapi_models` 等保持不变。
126
132
 
127
133
  ## 开发
128
134
 
@@ -133,9 +139,11 @@ node --check client.js
133
139
  npm pack --dry-run --ignore-scripts
134
140
  ```
135
141
 
136
- 无需安装或复制 DSH 官方包;运行时引用通过 optional peerDependencies 声明,由 DSH 宿主提供。测试不依赖真实网关、不读取用户密钥。
142
+ 要针对源码目录开发,用 DSH 插件管理工具安装该项目目录,而不是 npm 包。
143
+
144
+ 无需安装或复制 DSH 官方包;运行时引用通过 optional peerDependencies 声明,由 DSH 宿主提供。测试不依赖真实网关、不读取用户密钥。本插件替代而非依赖 `dsh-gateway-provider`,两个适配器不能占用同一路由。
137
145
 
138
- npm 发布、创建公开仓库和插件市场投稿是独立的人工确认步骤,见 [PUBLISHING.md](PUBLISHING.md)。测试与发布包都不应包含个人网关数据、凭据、调研记录或会话截图。
146
+ 发布步骤见 [PUBLISHING.md](PUBLISHING.md)。
139
147
 
140
148
  MIT License。使用 DSH 的公开导出与 pi-ai 协议实现,不包含第三方插件的源码副本。
141
149
 
package/client.js CHANGED
@@ -1086,7 +1086,7 @@ window.__ModuleLoader__.load({
1086
1086
  const modelChannel = channels.find((c) => c.id === modelChannelId) || active;
1087
1087
  const count = (kind) => entries.filter((e) => e.kind === kind).length;
1088
1088
  const operate = (path, ch, key) => a.run(async () => { await store.mutate(path, { id: ch.id, revision: state.revision }); notify(key); });
1089
- return h('div', { className: 'nas nas-page', 'data-newapi-provider-version': '0.8.3' }, h(Styles), header,
1089
+ return h('div', { className: 'nas nas-page', 'data-newapi-provider-version': '0.8.4' }, h(Styles), header,
1090
1090
  notice && h('div', { className: 'nas-feedback', role: 'status' }, h(Icon, { name: 'check', size: 14 }), notice),
1091
1091
  h(ErrorText, { text: a.error || error }),
1092
1092
  h('div', { className: 'nas-summary' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-newapi-provider",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "New API gateway for DeepSeek Harness: models with context and modality details, balance, image and video generation.",
5
5
  "license": "MIT",
6
6
  "author": "zenVibeCoding",