dsh-plugin-effort-declare 0.1.3 → 0.1.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/CONTRIBUTING.en.md +18 -9
- package/CONTRIBUTING.md +22 -13
- package/INSTALL.en.md +9 -9
- package/INSTALL.md +16 -16
- package/README.en.md +25 -21
- package/README.md +28 -24
- package/lib/client.js +113 -30
- package/lib/client.js.map +1 -1
- package/lib/types/client/EffortDeclareSection.d.ts +2 -2
- package/lib/types/client/EffortDeclareSection.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/core/catalog.d.ts +8 -0
- package/lib/types/core/catalog.d.ts.map +1 -1
- package/lib/types/core/drafts.d.ts +8 -4
- package/lib/types/core/drafts.d.ts.map +1 -1
- package/lib/types/core/input.d.ts +15 -0
- package/lib/types/core/input.d.ts.map +1 -0
- package/lib/types/core/validate.d.ts +3 -0
- package/lib/types/core/validate.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/README.en.md +2 -2
- package/src/README.md +2 -2
- package/src/client/EffortDeclareSection.tsx +18 -6
- package/src/client/README.en.md +3 -3
- package/src/client/README.md +3 -3
- package/src/client/locales.ts +13 -4
- package/src/core/README.en.md +8 -7
- package/src/core/README.md +8 -7
- package/src/core/catalog.ts +11 -0
- package/src/core/drafts.ts +40 -26
- package/src/core/input.ts +49 -0
- package/src/core/validate.ts +8 -0
package/CONTRIBUTING.en.md
CHANGED
|
@@ -11,19 +11,28 @@ Back to the [README](./README.en.md). Issues and pull requests are welcome.
|
|
|
11
11
|
|
|
12
12
|
## Boundary
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
This plugin writes official `llm-pi-ai` settings only. It does not add a parallel store and does not change Harness runtime paths.
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- Do not auto-write efforts onto undeclared models at Host start (dict merge cannot delete; it would mutate models the user never saved)
|
|
16
|
+
- Do not intercept `llm/stream`
|
|
17
|
+
- Do not fork the official Models page
|
|
18
|
+
- Do not keep a parallel effort table or modality table
|
|
19
|
+
- Do not stamp per-model `reasoningEfforts` or `input` in the bundle layer (settings dict merge has no delete semantics)
|
|
20
|
+
- Do not auto-write efforts or image modalities onto undeclared models at Host start (dict merge cannot delete; it would mutate models the user never saved)
|
|
21
21
|
- Do not hook `agent/request` to fill a default effort for subagents
|
|
22
22
|
- Do not set route-level `reasoning` to `high`
|
|
23
|
+
- Do not set route-level `defaultInput` to enable images for a whole route (mixed text/vision routes would over-claim)
|
|
23
24
|
|
|
24
25
|
Any new model-visible input must land in a session-log-rebuildable mechanism. This plugin does not inject prompt text.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
## Write semantics
|
|
28
|
+
|
|
29
|
+
| Action | Correct write | Forbidden |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Clear effort declaration | Delete `reasoningEfforts` (absence = default off) | Write `false` (official meaning: strip reasoning from a catalog model) |
|
|
32
|
+
| Disable image input | Delete the `input` key | Write `[]` or `['text']` (the resolver treats an empty list as absent; a bad stamp must not be re-saved) |
|
|
33
|
+
| Enable image input | Write `input: ['text', 'image']` | Write image-only, or change route-level `defaultInput` |
|
|
34
|
+
|
|
35
|
+
**Clear this model’s declaration** deletes `reasoningEfforts` only and leaves `input` unchanged. The two overlay keys merge independently.
|
|
27
36
|
|
|
28
37
|
## Development
|
|
29
38
|
|
|
@@ -38,9 +47,9 @@ pnpm build
|
|
|
38
47
|
- The client bundle must not inline `@deepseek-ai/*` except platform modules in the shell’s frozen table. Collaborate through Cordis services; do not value-import the official Models page
|
|
39
48
|
- Source: [src/README.md](./src/README.md); domain logic: [src/core/README.md](./src/core/README.md); settings UI: [src/client/README.md](./src/client/README.md); tests: [tests/README.md](./tests/README.md)
|
|
40
49
|
|
|
41
|
-
Before sending a change, say whether it is a
|
|
50
|
+
Before sending a change, say whether it is a bug fix, a feature, or an alignment with a newer DSH / pi-ai schema. Update zh and en docs together. The root README and [INSTALL.en.md](./INSTALL.en.md) are for users; this file and the READMEs under `src/` and `tests/` are for people changing code.
|
|
42
51
|
|
|
43
|
-
Canonical level names
|
|
52
|
+
Canonical level names, `thinkingFormat` enums, and `models[].input` values come from the installed `llm-pi-ai` schema / catalog. The live `thinkingFormat` schema contract is [`tests/fixtures/pi-ai-thinking-format-union.ts`](./tests/fixtures/pi-ai-thinking-format-union.ts). When upgrading DSH, refresh that fixture from `dsh --dump-config` or the settings describe schema, then update `src/core/catalog.ts` and UI copy. Do not value-import `@deepseek-ai/dsh-llm-pi-ai` into the client bundle. Effort keys stay a locally pinned whitelist; if the schema drifts, change the fixture / tests first. Do not offer that list as writable dropdown choices.
|
|
44
53
|
|
|
45
54
|
## Publishing to npm
|
|
46
55
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -11,19 +11,28 @@
|
|
|
11
11
|
|
|
12
12
|
## 边界
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
- 不要 fork
|
|
18
|
-
-
|
|
19
|
-
- 不要在 bundle 层预置 per-model `reasoningEfforts`(settings 字典合并没有删除语义)
|
|
20
|
-
- 不要在 Host
|
|
21
|
-
- 不要挂 `agent/request`
|
|
14
|
+
本插件只写入官方 `llm-pi-ai` 设置,不增加平行数据源,也不改 Harness 运行时路径。
|
|
15
|
+
|
|
16
|
+
- 不要拦截 `llm/stream`
|
|
17
|
+
- 不要 fork 官方「模型」页
|
|
18
|
+
- 不要平行再存一份档位表或模态表
|
|
19
|
+
- 不要在 bundle 层预置 per-model `reasoningEfforts` 或 `input`(settings 字典合并没有删除语义)
|
|
20
|
+
- 不要在 Host 启动时给未声明的模型自动写入档位或图片模态(字典合并无法删除,会改写用户尚未保存的模型)
|
|
21
|
+
- 不要挂 `agent/request` 为 subagent 填默认档
|
|
22
22
|
- 不要把路由级 `reasoning` 写成 `high`
|
|
23
|
+
- 不要写路由级 `defaultInput` 为整条路由打开图片(文生与图生混部时会误开)
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
新增任何模型可见输入,必须落在会话日志可重建的机制里。本插件不向模型注入提示词。
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
## 写入语义
|
|
28
|
+
|
|
29
|
+
| 操作 | 正确写法 | 禁止 |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| 清除档位声明 | 删除 `reasoningEfforts`(缺席 = 默认关闭) | 写成 `false`(官方语义是从 catalog 模型剥掉推理) |
|
|
32
|
+
| 取消图片输入 | 删除 `input` 键 | 写成空数组或 `['text']`(空列表会被解析器当成缺席,坏戳记不应被重新保存) |
|
|
33
|
+
| 声明图片输入 | 写入 `input: ['text', 'image']` | 只写 `image`,或改路由级 `defaultInput` |
|
|
34
|
+
|
|
35
|
+
「清除本模型声明」只删除 `reasoningEfforts`,不修改 `input`。两套 overlay 在草稿合并中相互独立。
|
|
27
36
|
|
|
28
37
|
## 开发
|
|
29
38
|
|
|
@@ -38,13 +47,13 @@ pnpm build
|
|
|
38
47
|
- 客户端 bundle 禁止把 `@deepseek-ai/*` 打进包内(shell 冻结模块表里的平台模块除外)。跨插件协作走 Cordis 服务,不要 value-import 官方模型页
|
|
39
48
|
- 源码:[src/README.md](./src/README.md);领域逻辑:[src/core/README.md](./src/core/README.md);设置页:[src/client/README.md](./src/client/README.md);测试:[tests/README.md](./tests/README.md)
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
提交前请说明改动是缺陷修复、功能增强,还是对齐新的 DSH / pi-ai schema。中英文档一并更新。根 README 与 [INSTALL.md](./INSTALL.md) 面向使用者;本文件与 `src/`、`tests/` 下的 README 面向改代码的人。
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
上游档位名、`thinkingFormat` 枚举与 `models[].input` 取值以 DSH 安装中 `llm-pi-ai` 的 schema / catalog 为准。`thinkingFormat` 的现场 schema 契约在 [`tests/fixtures/pi-ai-thinking-format-union.ts`](./tests/fixtures/pi-ai-thinking-format-union.ts)。升级 DSH 时用 `dsh --dump-config` 或设置 describe 的 schema 更新该 fixture,再改 `src/core/catalog.ts` 与 UI。不要把 `@deepseek-ai/dsh-llm-pi-ai` 打进 client bundle。档位键仍由测试钉本地白名单;schema 漂移时应先改 fixture / 测试再改 UI。不要把这份名单当作可写入下拉选项。
|
|
44
53
|
|
|
45
54
|
## 发布到 npm
|
|
46
55
|
|
|
47
|
-
包名 `dsh-plugin-effort-declare`(未加 scope)。先 `npm login
|
|
56
|
+
包名 `dsh-plugin-effort-declare`(未加 scope)。先 `npm login`,工作区干净后再执行:
|
|
48
57
|
|
|
49
58
|
```bash
|
|
50
59
|
pnpm test && pnpm typecheck && pnpm build
|
package/INSTALL.en.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
</samp>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
Back to the [README](./README.en.md). Requires DeepSeek Harness **0.1.0-rc.8 or
|
|
10
|
+
Back to the [README](./README.en.md). Requires DeepSeek Harness **0.1.0-rc.8** or later. Do not use `npm install`; use `dsh plugin` below.
|
|
11
11
|
|
|
12
|
-
## Third-party
|
|
12
|
+
## Third-party distributions: set DSH_HOME first
|
|
13
13
|
|
|
14
|
-
`dsh plugin` installs into the **current** `DSH_HOME`. If unset, that is `.dsh`
|
|
14
|
+
`dsh plugin` installs into the **current** `DSH_HOME`. If unset, that is `.dsh` under the user folder. Third-party distributions often use a different home; point it at the home this DSH instance actually uses.
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
# Linux / macOS
|
|
@@ -23,7 +23,7 @@ export DSH_HOME=/path/to/your/dsh-home
|
|
|
23
23
|
$env:DSH_HOME = "X:\path\to\your\dsh-home"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Set this before the install command. The profile name is usually `web`.
|
|
26
|
+
Set this before running the install command. The profile name is usually `web`.
|
|
27
27
|
|
|
28
28
|
## From npm (recommended)
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ Set this before the install command. The profile name is usually `web`.
|
|
|
31
31
|
dsh plugin --profile web add dsh-plugin-effort-declare
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Optional: confirm
|
|
34
|
+
Optional: confirm the layer is loaded:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
dsh --profile web --dump-config
|
|
@@ -43,9 +43,9 @@ The output should mention `dsh-plugin-effort-declare`.
|
|
|
43
43
|
|
|
44
44
|
The plugin is published to npm. Updates also go through `dsh plugin` (the official CLI forwards the rest of the line to pnpm). Do not use `npm update`.
|
|
45
45
|
|
|
46
|
-
Third-party
|
|
46
|
+
Third-party distributions still need `DSH_HOME` set first, same as install.
|
|
47
47
|
|
|
48
|
-
Already installed from npm, upgrade to the newest version
|
|
48
|
+
Already installed from npm, upgrade to the newest version within the existing semver range:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
dsh plugin --profile web update dsh-plugin-effort-declare
|
|
@@ -59,7 +59,7 @@ dsh plugin --profile web add dsh-plugin-effort-declare@latest
|
|
|
59
59
|
|
|
60
60
|
Then restart DSH. Use `dsh --profile web --dump-config` to confirm the layer is still present.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Copies installed from GitHub: run `add` again, or pin a commit:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
dsh plugin --profile web add github:zimodzh/dsh-plugin-effort-declare
|
|
@@ -83,7 +83,7 @@ dsh plugin --profile web add file:/absolute/path/to/dsh-plugin-effort-declare
|
|
|
83
83
|
|
|
84
84
|
## After install
|
|
85
85
|
|
|
86
|
-
Restart DSH. Open **Settings → Reasoning efforts
|
|
86
|
+
Restart DSH. Open **Settings → Reasoning efforts**, declare reasoning levels per model, and check **Accepts image input** for vision models. The footer is the installed version (for example `0.1.4 © 2026 Stardust`). Bumping `package.json` version only appears after you rebuild and reinstall. Add a custom provider on the Models page first; otherwise this page has nothing to edit.
|
|
87
87
|
|
|
88
88
|
## Uninstall
|
|
89
89
|
|
package/INSTALL.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
</samp>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
回到 [README](./README.md)。需要 DeepSeek Harness **0.1.0-rc.8
|
|
10
|
+
回到 [README](./README.md)。需要 DeepSeek Harness **0.1.0-rc.8** 或更高版本。不要使用 `npm install`,必须使用下面的 `dsh plugin` 命令。
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 第三方发行版:先设置 DSH_HOME
|
|
13
13
|
|
|
14
|
-
`dsh plugin` 会装进**当前** `DSH_HOME
|
|
14
|
+
`dsh plugin` 会装进**当前** `DSH_HOME`。未设置时默认为用户目录下的 `.dsh`。第三方发行版的数据目录往往不是这条路径,请改为这份 DSH 实际使用的 home。
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
# Linux / macOS
|
|
@@ -23,7 +23,7 @@ export DSH_HOME=/path/to/your/dsh-home
|
|
|
23
23
|
$env:DSH_HOME = "X:\path\to\your\dsh-home"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
设置完成后再执行安装命令。配置档名称一般为 `web`。
|
|
27
27
|
|
|
28
28
|
## 从 npm 安装(推荐)
|
|
29
29
|
|
|
@@ -31,35 +31,35 @@ $env:DSH_HOME = "X:\path\to\your\dsh-home"
|
|
|
31
31
|
dsh plugin --profile web add dsh-plugin-effort-declare
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
可选:确认层已加载:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
dsh --profile web --dump-config
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
输出中应出现 `dsh-plugin-effort-declare`。
|
|
41
41
|
|
|
42
42
|
## 更新
|
|
43
43
|
|
|
44
|
-
插件已发布到 npm
|
|
44
|
+
插件已发布到 npm。更新同样通过 `dsh plugin`(官方 CLI 将参数转给 pnpm),不要使用 `npm update`。
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
第三方发行版仍须先设置 `DSH_HOME`,与安装相同。
|
|
47
47
|
|
|
48
|
-
已从 npm
|
|
48
|
+
已从 npm 安装、且只需升级到现有 semver 范围内的新版本:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
dsh plugin --profile web update dsh-plugin-effort-declare
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
需要最新正式版(含改写依赖范围)时:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
57
|
dsh plugin --profile web add dsh-plugin-effort-declare@latest
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
然后重启 DSH。可用 `dsh --profile web --dump-config`
|
|
60
|
+
然后重启 DSH。可用 `dsh --profile web --dump-config` 确认层仍在。
|
|
61
61
|
|
|
62
|
-
从 GitHub
|
|
62
|
+
从 GitHub 安装的副本:再执行一次下面的命令,或使用带 commit 的规格:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
dsh plugin --profile web add github:zimodzh/dsh-plugin-effort-declare
|
|
@@ -73,17 +73,17 @@ GitHub:
|
|
|
73
73
|
dsh plugin --profile web add github:zimodzh/dsh-plugin-effort-declare
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
如果 pnpm
|
|
76
|
+
如果 pnpm 拒绝构建,将该包名加入此配置档 `pnpm-workspace.yaml` 的 `allowBuilds`,再执行一次 `add`。
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
本地文件夹(仓库中须已有 `lib/`;Windows 建议使用正斜杠):
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
dsh plugin --profile web add file:/绝对路径/dsh-plugin-effort-declare
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## 安装之后
|
|
85
85
|
|
|
86
|
-
重启 DSH。打开 **设置 →
|
|
86
|
+
重启 DSH。打开 **设置 → 推理档位**,按模型声明推理档位;视觉模型再勾选 **支持图片输入**。页脚为当前安装版本(例如 `0.1.4 © 2026 Stardust`)。修改 `package.json` 的 version 后须重新打包并安装才会更新页脚。请先在「模型」页添加第三方提供方,本页才会出现可编辑条目。
|
|
87
87
|
|
|
88
88
|
## 卸载
|
|
89
89
|
|
package/README.en.md
CHANGED
|
@@ -15,26 +15,28 @@
|
|
|
15
15
|
<a href="https://github.com/deepseek-ai/deepseek-harness" target="_blank" rel="noopener noreferrer"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
A settings plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). It declares reasoning levels and image input for hand-added OpenAI-compatible models. After a declaration, the composer shows the Effort row and accepts image attachments; undeclared models are treated as text-only.
|
|
19
19
|
|
|
20
|
-
>
|
|
20
|
+
> A community-maintained third-party DSH plugin. It is not an official DeepSeek project and is not endorsed by DeepSeek. Requires **DeepSeek Harness 0.1.0-rc.8** or later. Earlier versions have not been tested.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Purpose
|
|
23
23
|
|
|
24
|
-
Hand-added third-party providers on the Models page
|
|
24
|
+
Hand-added third-party providers on the Models page typically omit `reasoningEfforts` and `input`. DeepSeek Harness uses those fields to decide whether the Effort picker appears and whether image attachments are admitted. This plugin adds a **Reasoning efforts** page in Settings and writes both capabilities into the official `llm-pi-ai` namespace. The per-turn level and the HTTP request still go through Harness. This plugin does not change API keys, endpoints, or the model list.
|
|
25
25
|
|
|
26
|
-
- Does not
|
|
26
|
+
- Does not rewrite models the user has not saved
|
|
27
27
|
- Does not change the current or default effort
|
|
28
28
|
- Does not replace the official Models page
|
|
29
|
+
- Does not intercept model streams or replace adapters
|
|
29
30
|
|
|
30
31
|
## Features
|
|
31
32
|
|
|
32
|
-
| Feature |
|
|
33
|
+
| Feature | Description |
|
|
33
34
|
| --- | --- |
|
|
34
|
-
| Reasoning
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
35
|
+
| Reasoning levels | Choose offered levels per model; override the on-the-wire spelling when the gateway differs |
|
|
36
|
+
| Image input | Declare whether a model accepts images. Checking writes `input: ['text', 'image']`; unchecking deletes the key and does not write an empty list |
|
|
37
|
+
| Presets | DeepSeek-compatible, OpenAI-compatible, or on/off only. A preset replaces the current dialect; it does not stack |
|
|
38
|
+
| Versus Models | Models owns the endpoint, keys, and model list; this page only declares reasoning levels and image input |
|
|
39
|
+
| Version footer | The page footer shows the plugin version and copyright years frozen at pack time; starting Harness does not advance the date |
|
|
38
40
|
|
|
39
41
|
## Install
|
|
40
42
|
|
|
@@ -44,35 +46,37 @@ Do not use `npm install`. In a terminal:
|
|
|
44
46
|
dsh plugin --profile web add dsh-plugin-effort-declare
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
If you
|
|
49
|
+
If you run a third-party DeepSeek Harness distribution, set `DSH_HOME` first, or the package lands in another directory. See the [install guide](./INSTALL.en.md). To update an npm install:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
dsh plugin --profile web update dsh-plugin-effort-declare
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
Or `add dsh-plugin-effort-declare@latest`. Details: [install guide](./INSTALL.en.md) **Update**.
|
|
55
|
+
Or `add dsh-plugin-effort-declare@latest`. Details: [install guide](./INSTALL.en.md), **Update**.
|
|
54
56
|
|
|
55
|
-
Restart DSH, then open **Settings → Reasoning efforts**. The footer shows
|
|
57
|
+
Restart DSH, then open **Settings → Reasoning efforts**. The footer shows the installed version. Add a custom provider on the Models page first. GitHub, local folder, and uninstall: [install guide](./INSTALL.en.md).
|
|
56
58
|
|
|
57
59
|
## Usage
|
|
58
60
|
|
|
59
61
|
1. Open the provider card, or apply a preset first.
|
|
60
|
-
2. Check the levels that should appear in the picker. Change the spelling if the gateway uses different names. Off (no thinking) can be
|
|
61
|
-
3.
|
|
62
|
-
4.
|
|
62
|
+
2. Check the reasoning levels that should appear in the picker. Change the on-the-wire spelling if the gateway uses different names. Off (no thinking) can be omitted, offered without sending a parameter, or sent as `none` (or another string).
|
|
63
|
+
3. If the model supports vision, check **Accepts image input**. Check this only when the model actually accepts images: an incorrect declaration admits the picture into session history, after which the gateway rejects the turn.
|
|
64
|
+
4. **Advanced** protocol options can usually stay collapsed.
|
|
65
|
+
5. Save. Selecting no thinking level, or Off alone, shows an error on that card. Saving image input without changing efforts is allowed. Clearing the effort declaration does not clear image input.
|
|
63
66
|
|
|
64
67
|
Saving is disabled when settings are read-only.
|
|
65
68
|
|
|
66
|
-
##
|
|
69
|
+
## Limitations
|
|
67
70
|
|
|
68
|
-
- Only custom providers
|
|
71
|
+
- Only custom providers added on the Models page that use the OpenAI Completions protocol
|
|
69
72
|
- Official DeepSeek, catalog models, and Anthropic endpoints are not edited here
|
|
70
|
-
- **Clear this model’s declaration** hides the Effort row
|
|
71
|
-
-
|
|
73
|
+
- **Clear this model’s declaration** removes `reasoningEfforts` only, which hides the Effort row; uncheck image input separately to drop the vision declaration
|
|
74
|
+
- Does not turn thinking on by default for background work such as title generation or compaction
|
|
75
|
+
- Does not enable image input for an entire route or for every model automatically
|
|
72
76
|
|
|
73
77
|
## Development
|
|
74
78
|
|
|
75
|
-
Code, pull requests, and npm publishing: [CONTRIBUTING.en.md](./CONTRIBUTING.en.md).
|
|
79
|
+
Code changes, pull requests, and npm publishing: [CONTRIBUTING.en.md](./CONTRIBUTING.en.md).
|
|
76
80
|
|
|
77
81
|
## License
|
|
78
82
|
|
package/README.md
CHANGED
|
@@ -15,36 +15,38 @@
|
|
|
15
15
|
<a href="https://github.com/deepseek-ai/deepseek-harness" target="_blank" rel="noopener noreferrer"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
这是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的设置插件:为手工添加的 OpenAI 兼容模型声明推理档位与图片输入。声明之后,对话输入框才会出现 Effort 行,并允许附加图片;未声明则按纯文本模型处理。
|
|
19
19
|
|
|
20
|
-
>
|
|
20
|
+
> 社区维护的第三方 DSH 插件,并非 DeepSeek 官方项目,亦未经官方背书。要求 **DeepSeek Harness 0.1.0-rc.8** 或更高版本;更早版本未经测试。
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## 作用
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
在「模型」页手工添加的第三方提供方,默认不会声明 `reasoningEfforts` 与 `input`。DeepSeek Harness 据此决定是否展示 Effort 选择器、是否接受图片附件。本插件在设置中增加 **推理档位** 页,向官方 `llm-pi-ai` 命名空间写入这两项能力。每轮选用哪一档、请求如何发往网关,仍由 Harness 处理。本插件不修改 API 密钥、端点或模型名单。
|
|
25
25
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
26
|
+
- 不改写用户尚未保存的模型
|
|
27
|
+
- 不改写当前或默认推理档
|
|
28
|
+
- 不替换官方「模型」页
|
|
29
|
+
- 不拦截模型流,也不替换适配器
|
|
29
30
|
|
|
30
31
|
## 功能
|
|
31
32
|
|
|
32
33
|
| 功能 | 说明 |
|
|
33
34
|
| --- | --- |
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
35
|
+
| 推理档位 | 按模型勾选可选档位;网关拼写不同时可改写线上名称 |
|
|
36
|
+
| 图片输入 | 按模型声明是否接受图片。勾选写入 `input: ['text', 'image']`;取消则删除该键,不写空列表 |
|
|
37
|
+
| 预设 | DeepSeek 兼容、OpenAI 兼容、仅开/关。预设替换当前协议方言,而非叠加 |
|
|
38
|
+
| 与「模型」页 | 「模型」页管理端点、密钥与模型名单;本页只声明推理档位与图片输入 |
|
|
39
|
+
| 版本页脚 | 页面底部显示打包时写入的插件版本与版权年;启动 Harness 不会更新日期 |
|
|
38
40
|
|
|
39
41
|
## 安装
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
不要使用 `npm install`。在终端执行:
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
46
|
dsh plugin --profile web add dsh-plugin-effort-declare
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
若使用第三方发行的 DeepSeek Harness,必须先设置 `DSH_HOME`,否则会装到另一目录。步骤见 [安装说明](./INSTALL.md)。更新已安装的 npm 包:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
dsh plugin --profile web update dsh-plugin-effort-declare
|
|
@@ -52,27 +54,29 @@ dsh plugin --profile web update dsh-plugin-effort-declare
|
|
|
52
54
|
|
|
53
55
|
或 `add dsh-plugin-effort-declare@latest`。详见 [安装说明](./INSTALL.md) 的「更新」。
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
安装后重启 DSH,打开 **设置 → 推理档位**。页脚可核对已安装版本。请先在「模型」页添加第三方提供方。从 GitHub、本地文件夹安装以及卸载,见 [安装说明](./INSTALL.md)。
|
|
56
58
|
|
|
57
59
|
## 使用
|
|
58
60
|
|
|
59
|
-
1.
|
|
60
|
-
2.
|
|
61
|
-
3.
|
|
62
|
-
4.
|
|
61
|
+
1. 打开对应提供方卡片,或先应用一套预设。
|
|
62
|
+
2. 勾选应出现在选择器中的推理档。网关名称不同时修改线上拼写。关闭思考(Off)可以:不提供、提供但不发送参数,或发送 `none` 等字符串。
|
|
63
|
+
3. 若该模型支持视觉,勾选 **支持图片输入**。仅在模型确实接受图片时勾选:误声明会使图片进入会话历史,随后被网关拒绝。
|
|
64
|
+
4. 「高级」协议选项通常可保持折叠。
|
|
65
|
+
5. 保存。未选择任何思考档、或只开启 Off 时,错误显示在该卡片上。只修改图片输入、不改档位,也可以保存。清除档位声明不会清除图片输入。
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
设置为只读时无法保存。
|
|
65
68
|
|
|
66
69
|
## 限制
|
|
67
70
|
|
|
68
|
-
-
|
|
69
|
-
- 官方 DeepSeek
|
|
70
|
-
-
|
|
71
|
-
-
|
|
71
|
+
- 仅适用于在「模型」页**手工添加**、协议为 OpenAI Completions 的提供方
|
|
72
|
+
- 官方 DeepSeek、目录自带模型、Anthropic 接口不在本页编辑
|
|
73
|
+
- 「清除本模型声明」只移除 `reasoningEfforts`,Effort 行随之隐藏;图片声明需单独取消勾选
|
|
74
|
+
- 不会为标题生成、压缩等后台请求默认打开思考
|
|
75
|
+
- 不会为整条路由或全部模型自动打开图片输入
|
|
72
76
|
|
|
73
77
|
## 开发
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
修改代码、提交 Pull Request、发布到 npm:见 [CONTRIBUTING.md](./CONTRIBUTING.md)。
|
|
76
80
|
|
|
77
81
|
## License
|
|
78
82
|
|