dsh-connect-madao 0.9.2 → 0.9.3
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 +34 -0
- package/FAQ.md +16 -16
- package/INSTALL.md +283 -283
- package/README.md +19 -4
- package/cordis.patch.yml +1 -116
- package/lib/bin.js +891 -114
- package/lib/client.js +15 -9
- package/lib/index.d.ts +72 -63
- package/lib/index.js +228 -107
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,10 +73,12 @@ STS 由插件调 IAM 自动换取并按期续租;模型清单在每次启动
|
|
|
73
73
|
|
|
74
74
|
1. 起本地桥接服务 `http://127.0.0.1:8765/v1`
|
|
75
75
|
2. 从网关拉当前模型清单(含倍率、是否多模态、可选思考强度)
|
|
76
|
-
3.
|
|
76
|
+
3. 通过 DSH ConfigEditor 把 `madao` 合并到 `llm-pi-ai.providers`,保留继承层和当前配置中的其他渠道
|
|
77
77
|
4. 把 `madao` provider 注册进 DSH
|
|
78
78
|
|
|
79
|
-
**不需要手写任何 YAML
|
|
79
|
+
**不需要手写任何 YAML**,上游上新模型或调价,重启即同步。目录不变时不会重复写入;更改桥接端口后会同步本插件管理的渠道地址。若同名 `madao` 渠道由用户自行配置,插件会保留并在日志中提示冲突。
|
|
80
|
+
|
|
81
|
+
此同步使用 DSH 的 `configEditor.configuration()` / `edit()` 接口,已按 DSH 0.2.2-rc.5 核对。自动同步需要 ConfigEditor 服务;缺少该服务时插件不会激活。若服务拒绝配置写入,日志会记录失败,本地桥接仍可使用。同步的渠道保存在 profile 中;停用或卸载插件后,如不再使用码道,请在模型设置中手动移除该渠道。
|
|
80
82
|
|
|
81
83
|
### 3. 验证
|
|
82
84
|
|
|
@@ -88,9 +90,15 @@ STS 由插件调 IAM 自动换取并按期续租;模型清单在每次启动
|
|
|
88
90
|
```bash
|
|
89
91
|
node lib/bin.js doctor # 四步自检
|
|
90
92
|
node lib/bin.js models # 打印网关当前模型清单
|
|
91
|
-
node lib/bin.js models --write #
|
|
93
|
+
node lib/bin.js models --write # 刷新插件条目补丁;模型目录由插件启动时通过 ConfigEditor 合并
|
|
92
94
|
```
|
|
93
95
|
|
|
96
|
+
### 远程打开 DSH 网页
|
|
97
|
+
|
|
98
|
+
设置面板和输入框状态胶囊通过 DSH 当前页面的同源 `/api/madao-bridge` 发请求,DSH 在认证后把允许的设置和诊断操作转发到宿主机上的本地桥接。远程浏览器不再访问自己机器上的 `127.0.0.1:8765`,也不需要把桥接端口开放到网络。
|
|
99
|
+
|
|
100
|
+
需要 DSH Web Host 支持 `connection.fetch.register` 的精确 API 路由;接口已按 DSH 0.2.2-rc.5 核对。通过远程网页保存 AK/SK 前请使用可信的 HTTPS 入口;凭证保存在运行 DSH 的机器上。
|
|
101
|
+
|
|
94
102
|
### 4. 手动接入(不走插件)
|
|
95
103
|
|
|
96
104
|
如果不装插件,只要本地服务:
|
|
@@ -171,7 +179,7 @@ lib/ 构建产物
|
|
|
171
179
|
- `GLM-5.3` / `GLM-5.3-Flash` / `DeepSeek-V4.1-Flash`(含 1017) / `Kimi-K3`(含 3.1-Pro):
|
|
172
180
|
`low` / `high` / `max`(梯度明显:295 → 330 → 684 字)
|
|
173
181
|
|
|
174
|
-
|
|
182
|
+
插件每次启动重新拉取档位列表,并通过 DSH ConfigEditor 更新模型目录。
|
|
175
183
|
- **工具调用(tool_calls)已支持**(0.4.1 起):早期版本只转发 `content` 和
|
|
176
184
|
`reasoning_content`,把 `tool_calls` 帧整个丢掉了。表现是 `finish_reason: "tool_calls"`
|
|
177
185
|
但 `content` 为空,客户端只看到「有思考、没内容」,于是判定异常并中断 ——
|
|
@@ -233,6 +241,13 @@ lib/ 构建产物
|
|
|
233
241
|
|
|
234
242
|
## 致谢
|
|
235
243
|
|
|
244
|
+
- **[@IosephusChen](https://github.com/IosephusChen)** —— 0.9.3 的两项修复均来自他的
|
|
245
|
+
[PR #2](https://github.com/XLNC-L/dsh-connect-madao/pull/2):设置面板改走 DSH 同源转发
|
|
246
|
+
(修复 NAS/远程访问时连不上本地桥接)、模型渠道经 `configEditor` 运行时合并
|
|
247
|
+
(修复码道模型被其它渠道配置覆盖)。
|
|
248
|
+
- **[@KaenFelix](https://github.com/KaenFelix)** —— 0.9.3 修复的 `claimCheckin` 在
|
|
249
|
+
`CLAIMED` 状态下没真正补 `confirm` 的缺陷,以及 `CONSUMED` 状态识别的完善,
|
|
250
|
+
思路来自他的 [PR #4](https://github.com/XLNC-L/dsh-connect-madao/pull/4)。
|
|
236
251
|
- **[@vzhentian1-design](https://github.com/vzhentian1-design)** —— 0.9.2 的
|
|
237
252
|
`POST /v1/ops/confirm` 补全、多活动扫描 + `type`/`triggerEvent` 白名单、
|
|
238
253
|
积分到期预警,以及 `LICENSE`,均来自他的
|
package/cordis.patch.yml
CHANGED
|
@@ -1,120 +1,5 @@
|
|
|
1
1
|
# 由 dsh-connect-madao 自动生成,请勿手工编辑。
|
|
2
|
-
#
|
|
3
|
-
# 想强制刷新:删除本文件后重启,或运行 `dsh-connect-madao models --write`。
|
|
2
|
+
# 模型目录由插件通过 DSH ConfigEditor 合并到现有渠道配置。
|
|
4
3
|
- insert:
|
|
5
4
|
- id: dsh-connect-madao
|
|
6
5
|
name: dsh-connect-madao
|
|
7
|
-
- id: llm-pi-ai
|
|
8
|
-
config:
|
|
9
|
-
providers:
|
|
10
|
-
madao:
|
|
11
|
-
displayName: '码道 CodeArts'
|
|
12
|
-
api: openai-completions
|
|
13
|
-
baseURL: http://127.0.0.1:8765/v1
|
|
14
|
-
headers:
|
|
15
|
-
Authorization: 'Bearer bridge-local'
|
|
16
|
-
models:
|
|
17
|
-
- id: 'GLM-5.2'
|
|
18
|
-
name: 'GLM-5.2 · 0.7x'
|
|
19
|
-
contextWindow: 202752
|
|
20
|
-
maxTokens: 32768
|
|
21
|
-
input: [ text ]
|
|
22
|
-
reasoningEfforts:
|
|
23
|
-
off: null
|
|
24
|
-
low: 'low'
|
|
25
|
-
high: 'high'
|
|
26
|
-
max: 'max'
|
|
27
|
-
- id: 'openpangu-2.0-flash'
|
|
28
|
-
name: 'OpenPangu-2.0-Flash · 0.32x'
|
|
29
|
-
contextWindow: 524288
|
|
30
|
-
maxTokens: 32768
|
|
31
|
-
input: [ text ]
|
|
32
|
-
reasoningEfforts: false
|
|
33
|
-
- id: 'openpangu-2.0-pro'
|
|
34
|
-
name: 'OpenPangu-2.0-Pro · 0.7x'
|
|
35
|
-
contextWindow: 524288
|
|
36
|
-
maxTokens: 32768
|
|
37
|
-
input: [ text ]
|
|
38
|
-
reasoningEfforts: false
|
|
39
|
-
- id: 'openpangu-2.1-pro'
|
|
40
|
-
name: 'OpenPangu-2.1-Pro · 0.07x'
|
|
41
|
-
contextWindow: 524288
|
|
42
|
-
maxTokens: 32768
|
|
43
|
-
input: [ text ]
|
|
44
|
-
reasoningEfforts: false
|
|
45
|
-
- id: 'glm-5.3'
|
|
46
|
-
name: 'GLM-5.3 · 0.79x'
|
|
47
|
-
contextWindow: 1048576
|
|
48
|
-
maxTokens: 32768
|
|
49
|
-
input: [ text ]
|
|
50
|
-
reasoningEfforts:
|
|
51
|
-
off: null
|
|
52
|
-
low: 'low'
|
|
53
|
-
high: 'high'
|
|
54
|
-
max: 'max'
|
|
55
|
-
- id: 'glm-5.3-flash'
|
|
56
|
-
name: 'GLM-5.3-Flash · 0.08x'
|
|
57
|
-
contextWindow: 1048576
|
|
58
|
-
maxTokens: 32768
|
|
59
|
-
input: [ text, image ]
|
|
60
|
-
reasoningEfforts:
|
|
61
|
-
off: null
|
|
62
|
-
low: 'low'
|
|
63
|
-
high: 'high'
|
|
64
|
-
max: 'max'
|
|
65
|
-
- id: 'glm-5.2-sft-harmony'
|
|
66
|
-
name: 'GLM-5.2-ArkTS-SPARK · 0.7x'
|
|
67
|
-
contextWindow: 202752
|
|
68
|
-
maxTokens: 32768
|
|
69
|
-
input: [ text ]
|
|
70
|
-
reasoningEfforts:
|
|
71
|
-
off: null
|
|
72
|
-
low: 'low'
|
|
73
|
-
high: 'high'
|
|
74
|
-
max: 'max'
|
|
75
|
-
- id: 'deepseek-v4.1-flash'
|
|
76
|
-
name: 'DeepSeek-V4.1-Flash · 0.18x'
|
|
77
|
-
contextWindow: 1048576
|
|
78
|
-
maxTokens: 32768
|
|
79
|
-
input: [ text, image ]
|
|
80
|
-
reasoningEfforts:
|
|
81
|
-
off: null
|
|
82
|
-
low: 'low'
|
|
83
|
-
high: 'high'
|
|
84
|
-
max: 'max'
|
|
85
|
-
- id: 'deepseek-v4.1-flash-1017'
|
|
86
|
-
name: 'DeepSeek-V4.1-Flash-1017 · 0.18x'
|
|
87
|
-
contextWindow: 1048576
|
|
88
|
-
maxTokens: 32768
|
|
89
|
-
input: [ text, image ]
|
|
90
|
-
reasoningEfforts:
|
|
91
|
-
off: null
|
|
92
|
-
low: 'low'
|
|
93
|
-
high: 'high'
|
|
94
|
-
max: 'max'
|
|
95
|
-
- id: 'kimi-k3'
|
|
96
|
-
name: 'Kimi-K3 · 2.38x'
|
|
97
|
-
contextWindow: 1048576
|
|
98
|
-
maxTokens: 32768
|
|
99
|
-
input: [ text, image ]
|
|
100
|
-
reasoningEfforts:
|
|
101
|
-
off: null
|
|
102
|
-
low: 'low'
|
|
103
|
-
high: 'high'
|
|
104
|
-
max: 'max'
|
|
105
|
-
- id: 'kimi-k3.1-pro'
|
|
106
|
-
name: 'Kimi-K3.1-Pro · 1.63x'
|
|
107
|
-
contextWindow: 1048576
|
|
108
|
-
maxTokens: 32768
|
|
109
|
-
input: [ text, image ]
|
|
110
|
-
reasoningEfforts:
|
|
111
|
-
off: null
|
|
112
|
-
low: 'low'
|
|
113
|
-
high: 'high'
|
|
114
|
-
max: 'max'
|
|
115
|
-
- id: 'speed'
|
|
116
|
-
name: '智速模式 · 0.18x'
|
|
117
|
-
contextWindow: 1048576
|
|
118
|
-
maxTokens: 32768
|
|
119
|
-
input: [ text ]
|
|
120
|
-
reasoningEfforts: false
|