dsh-subagent-default-model 0.3.0 → 0.3.1
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/CHANGELOG.md +6 -0
- package/README.en.md +129 -0
- package/README.md +39 -37
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/README.en.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# dsh-subagent-default-model
|
|
2
|
+
|
|
3
|
+
English | [中文](README.md)
|
|
4
|
+
|
|
5
|
+
Pick the default model for subagent delegations in [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness), configurable via `~/.dsh/settings.yaml`.
|
|
6
|
+
|
|
7
|
+
When a subagent is created without an explicit `model`, this plugin injects the configured default — so every `subagent`, `subagent_fork`, and any tool that omits `agentOptions` routes through it. Explicit per-call overrides always win; an absent or incomplete settings section keeps the historical behavior (children inherit the parent route).
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Single model** — all subagents run on one configured model.
|
|
12
|
+
- **Multi-model** — a `models` list with `round-robin` or `random` strategy spreads parallel subagents across models.
|
|
13
|
+
- **Reasoning strength** — optionally specify `reasoningEffort` per model entry (e.g. `high`, `medium`, `low`); the Web UI loads available efforts from the model catalog.
|
|
14
|
+
- **Hot-reload** — settings changes apply to the very next delegation.
|
|
15
|
+
- **Clean teardown** — Cordis disposal restores the original service methods.
|
|
16
|
+
|
|
17
|
+
## Screenshots
|
|
18
|
+
|
|
19
|
+
**Settings panel** (`Settings → General → Subagent default model`): configure one or more model routes with `round-robin` / `random` strategy and per-route reasoning effort.
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
**Effect verification**: 10 subagents split 5/5 between `deepseek-v4-flash` and `Kimi-k3` (round-robin).
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
## Marketplace
|
|
28
|
+
|
|
29
|
+
[](https://dshfind.com/plugins/dingminhua/dsh-subagent-default-model)
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
Install from the npm registry:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install dsh-subagent-default-model
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or via the DSH plugin command (equivalent; it goes through npm internally):
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
dsh plugin --profile desktop add dsh-subagent-default-model
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Release / Publish
|
|
46
|
+
|
|
47
|
+
Publish to the npm registry:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
# 1. Bump the version (plugin/package.json `version`) and update CHANGELOG.md
|
|
51
|
+
# 2. Commit and tag
|
|
52
|
+
git add -A
|
|
53
|
+
git commit -m "feat: ..."
|
|
54
|
+
git tag v0.3.1
|
|
55
|
+
git push origin main --tags
|
|
56
|
+
|
|
57
|
+
# 3. Publish to npm
|
|
58
|
+
cd plugin
|
|
59
|
+
npm login # Log in once before the first publish; if the account has 2FA, confirm in the browser during publish
|
|
60
|
+
npm publish # `files` limits the published content: lib/, cordis.patch.yml, etc.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> ⚠️ Run the tests first: `npm --prefix plugin test`.
|
|
64
|
+
> The `files` field in `package.json` limits publishing to `lib/`, `cordis.patch.yml`, `LICENSE`, `README.md`, `README.en.md`, `CHANGELOG.md` — `test/` and `node_modules/` are never packed.
|
|
65
|
+
|
|
66
|
+
Local install (DSH Desktop / desktop profile):
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
# Run under ~/.dsh/profiles/desktop (or use the dsh plugin command)
|
|
70
|
+
npm install dsh-subagent-default-model
|
|
71
|
+
# Or local dev: dsh plugin --profile desktop add /path/plugin (link: install, changes apply immediately)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Notes:
|
|
75
|
+
|
|
76
|
+
- Local dev uses a `link:` install: `dsh plugin --profile desktop add /Users/dmh2002/DshProject/dsh-subagent-default-model/plugin` — `node_modules` holds a source symlink, so **restart DSH Desktop** after changing code.
|
|
77
|
+
- Production / other machines use the npm registry version (see Install above).
|
|
78
|
+
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
Add to `~/.dsh/settings.yaml`:
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
# Single model
|
|
85
|
+
subagent-default-model:
|
|
86
|
+
provider: deepseek-official
|
|
87
|
+
model: deepseek-v4-pro
|
|
88
|
+
|
|
89
|
+
# Or multiple models
|
|
90
|
+
subagent-default-model:
|
|
91
|
+
provider: deepseek-official
|
|
92
|
+
models:
|
|
93
|
+
- deepseek-v4-pro
|
|
94
|
+
- deepseek-v4-flash
|
|
95
|
+
strategy: round-robin # round-robin | random
|
|
96
|
+
|
|
97
|
+
# With reasoning strength
|
|
98
|
+
subagent-default-model:
|
|
99
|
+
provider: deepseek-official
|
|
100
|
+
models:
|
|
101
|
+
- model: deepseek-v4-reasoner
|
|
102
|
+
reasoningEffort: high
|
|
103
|
+
- provider: other-provider
|
|
104
|
+
model: gpt-5.6
|
|
105
|
+
reasoningEffort: max
|
|
106
|
+
strategy: round-robin # round-robin | random
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
| Field | Type | Default | Description |
|
|
110
|
+
| --- | --- | --- | --- |
|
|
111
|
+
| `provider` | string | — | Provider for string-type model entries. |
|
|
112
|
+
| `model` | string | — | Single model id (backward compatible). |
|
|
113
|
+
| `models` | array | `[]` | List of model entries (string or `{provider, model, reasoningEffort?}` pair). |
|
|
114
|
+
| `strategy` | string | `round-robin` | Selection strategy: `round-robin` or `random`. |
|
|
115
|
+
| `reasoningEffort` | string | — | Optional reasoning strength for a model entry (e.g. `high`, `max`). |
|
|
116
|
+
|
|
117
|
+
## How it works
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
Explicit agentOptions on the request
|
|
121
|
+
→ subagent-default-model settings
|
|
122
|
+
→ inherit parent session route
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The plugin wraps the host `ctx.subagents` service (`start` / `startContinuable`), so it covers every delegation path — built-in `subagent` / `subagent_fork` tools and any custom tool that calls the service without providing `agentOptions`.
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
[MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
# dsh-subagent-default-model
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.en.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
为 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 中的子代理(subagent)派发选择默认模型,可通过 `~/.dsh/settings.yaml` 配置。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
当创建子代理时未显式指定 `model`,本插件注入配置的默认模型 —— 因此所有 `subagent`、`subagent_fork` 以及任何省略 `agentOptions` 的工具调用都会经过它。显式传参的覆盖始终生效;配置段缺失或不完整时保持原有行为(子代理继承父会话路由)。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **Multi-model** — a `models` list with `round-robin` or `random` strategy spreads parallel subagents across models.
|
|
11
|
-
- **Reasoning strength** — optionally specify `reasoningEffort` per model entry (e.g. `high`, `medium`, `low`); the Web UI loads available efforts from the model catalog.
|
|
12
|
-
- **Hot-reload** — settings changes apply to the very next delegation.
|
|
13
|
-
- **Clean teardown** — Cordis disposal restores the original service methods.
|
|
9
|
+
## 功能特性
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
- **单模型** —— 所有子代理运行在同一个配置模型上。
|
|
12
|
+
- **多模型** —— `models` 列表配合 `round-robin` / `random` 策略,让并行子代理分散到多个模型。
|
|
13
|
+
- **推理强度** —— 可为每个模型条目指定 `reasoningEffort`(如 `high`、`medium`、`low`);Web 界面从模型目录加载可用的强度。
|
|
14
|
+
- **热重载** —— 设置变更立即作用于下一次派发。
|
|
15
|
+
- **干净卸载** —— Cordis 销毁时还原原始服务方法。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 截图
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**设置面板**(`设置 → 通用设置 → 子代理默认模型`):配置一个或多个模型路由,支持 `round-robin` / `random` 分配策略与每路由推理强度。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+

|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
**效果验证**:10 个子代理在 `deepseek-v4-flash` 与 `Kimi-k3` 之间 5/5 均衡分配(round-robin 实测)。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+

|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## 市场
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
[](https://dshfind.com/plugins/dingminhua/dsh-subagent-default-model)
|
|
30
|
+
|
|
31
|
+
## 安装
|
|
30
32
|
|
|
31
33
|
从 npm registry 安装:
|
|
32
34
|
|
|
@@ -40,7 +42,7 @@ npm install dsh-subagent-default-model
|
|
|
40
42
|
dsh plugin --profile desktop add dsh-subagent-default-model
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
## Release / Publish
|
|
45
|
+
## 发布(Release / Publish)
|
|
44
46
|
|
|
45
47
|
发布到 npm registry:
|
|
46
48
|
|
|
@@ -54,12 +56,12 @@ git push origin main --tags
|
|
|
54
56
|
|
|
55
57
|
# 3. 发布到 npm
|
|
56
58
|
cd plugin
|
|
57
|
-
npm login #
|
|
58
|
-
npm publish
|
|
59
|
+
npm login # 首次发布前登录一次;账号若开启 2FA,publish 时需在浏览器确认一步
|
|
60
|
+
npm publish # files 字段已限定发布内容:lib/、cordis.patch.yml 等
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
> ⚠️ 发布前先跑一遍测试:`npm --prefix plugin test`。
|
|
62
|
-
> `package.json` 的 `files` 字段已限定只发布 `lib/`、`cordis.patch.yml`、`LICENSE`、`README.md`、`CHANGELOG.md`,`test/` 和 `node_modules/` 不会进入发布包。
|
|
64
|
+
> `package.json` 的 `files` 字段已限定只发布 `lib/`、`cordis.patch.yml`、`LICENSE`、`README.md`、`README.en.md`、`CHANGELOG.md`,`test/` 和 `node_modules/` 不会进入发布包。
|
|
63
65
|
|
|
64
66
|
本地安装(DSH Desktop / desktop profile):
|
|
65
67
|
|
|
@@ -74,17 +76,17 @@ npm install dsh-subagent-default-model
|
|
|
74
76
|
- 本地开发用 `link:` 安装:`dsh plugin --profile desktop add /Users/dmh2002/DshProject/dsh-subagent-default-model/plugin`,node_modules 里是源码软链,改代码后**重启 DSH Desktop** 生效
|
|
75
77
|
- 正式安装 / 他机安装使用 npm registry 版本(见上方 Install)
|
|
76
78
|
|
|
77
|
-
##
|
|
79
|
+
## 配置
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
在 `~/.dsh/settings.yaml` 中添加:
|
|
80
82
|
|
|
81
83
|
```yaml
|
|
82
|
-
#
|
|
84
|
+
# 单模型
|
|
83
85
|
subagent-default-model:
|
|
84
86
|
provider: deepseek-official
|
|
85
87
|
model: deepseek-v4-pro
|
|
86
88
|
|
|
87
|
-
#
|
|
89
|
+
# 或多模型
|
|
88
90
|
subagent-default-model:
|
|
89
91
|
provider: deepseek-official
|
|
90
92
|
models:
|
|
@@ -92,7 +94,7 @@ subagent-default-model:
|
|
|
92
94
|
- deepseek-v4-flash
|
|
93
95
|
strategy: round-robin # round-robin | random
|
|
94
96
|
|
|
95
|
-
#
|
|
97
|
+
# 带推理强度
|
|
96
98
|
subagent-default-model:
|
|
97
99
|
provider: deepseek-official
|
|
98
100
|
models:
|
|
@@ -104,24 +106,24 @@ subagent-default-model:
|
|
|
104
106
|
strategy: round-robin # round-robin | random
|
|
105
107
|
```
|
|
106
108
|
|
|
107
|
-
|
|
|
109
|
+
| 字段 | 类型 | 默认值 | 说明 |
|
|
108
110
|
| --- | --- | --- | --- |
|
|
109
|
-
| `provider` | string | — |
|
|
110
|
-
| `model` | string | — |
|
|
111
|
-
| `models` | array | `[]` |
|
|
112
|
-
| `strategy` | string | `round-robin` |
|
|
113
|
-
| `reasoningEffort` | string | — |
|
|
111
|
+
| `provider` | string | — | 字符串类型模型条目的 provider。 |
|
|
112
|
+
| `model` | string | — | 单模型 id(向后兼容)。 |
|
|
113
|
+
| `models` | array | `[]` | 模型条目列表(string 或 `{provider, model, reasoningEffort?}` 对)。 |
|
|
114
|
+
| `strategy` | string | `round-robin` | 分配策略:`round-robin` 或 `random`。 |
|
|
115
|
+
| `reasoningEffort` | string | — | 可选推理强度(如 `high`、`max`)。 |
|
|
114
116
|
|
|
115
|
-
##
|
|
117
|
+
## 工作原理
|
|
116
118
|
|
|
117
119
|
```text
|
|
118
|
-
|
|
119
|
-
→ subagent-default-model
|
|
120
|
-
→
|
|
120
|
+
请求携带显式 agentOptions
|
|
121
|
+
→ subagent-default-model 设置
|
|
122
|
+
→ 继承父会话路由
|
|
121
123
|
```
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
插件包装宿主 `ctx.subagents` 服务(`start` / `startContinuable`),覆盖所有派发路径 —— 内置的 `subagent` / `subagent_fork` 工具,以及任何调用该服务但未提供 `agentOptions` 的自定义工具。
|
|
124
126
|
|
|
125
|
-
##
|
|
127
|
+
## 许可证
|
|
126
128
|
|
|
127
129
|
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-subagent-default-model",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Default model for subagent delegations, configurable via the `subagent-default-model` settings section (no explicit per-call model keeps inheriting the parent route).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"cordis.patch.yml",
|
|
21
21
|
"LICENSE",
|
|
22
22
|
"README.md",
|
|
23
|
+
"README.en.md",
|
|
23
24
|
"CHANGELOG.md"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|