@mofeng2223/dsh-claude-provider 0.2.3 → 0.3.0
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/README.md +13 -5
- package/README.zh-CN.md +13 -5
- package/cordis.patch.yml +0 -9
- package/lib/client.js +312 -217
- package/package.json +3 -3
- package/src/index.js +2 -297
package/README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](./README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
DeepSeek Harness's
|
|
5
|
+
~~DeepSeek Harness's general-purpose reasoning controls did not fully match the request parameters required by newer Claude models. As a result, selecting a reasoning level could either produce an HTTP 400 error or be silently mapped by the adapter to a different effective level—for example, Max in the interface could actually be sent as High. `@mofeng2223/dsh-claude-provider` added an explicit Claude provider type and sent the correct reasoning parameters for each Claude model.~~
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness 0.1.0-rc.8 now supports reasoning-effort parameters for Claude models, but they still need to be configured manually in `settings.yaml`. Therefore, this plugin no longer intercepts or rewrites model requests at runtime. Instead, it writes the corresponding native settings to `settings.yaml` when a Claude provider is saved through the front end.
|
|
8
|
+
|
|
9
|
+
The plugin retains its dedicated Claude provider configuration page, so users do not need to edit `settings.yaml` manually. Anthropic-native model discovery, automatic defaults for common Claude models, and other features not yet available in DeepSeek Harness are also retained.
|
|
6
10
|
|
|
7
11
|
## What this plugin does
|
|
8
12
|
|
|
@@ -28,7 +32,11 @@ DeepSeek Harness's generic reasoning controls do not fully match the request par
|
|
|
28
32
|
- Four levels: Low, Medium, High, and Max
|
|
29
33
|
- Toggle: On or Off
|
|
30
34
|
|
|
31
|
-
New models default to five levels
|
|
35
|
+
New models default to five levels, and Claude providers default to High.
|
|
36
|
+
|
|
37
|
+
~~For adaptive thinking models, the plugin converted the selected level into Claude's `thinking.type: adaptive` and `output_config.effort` request format, preventing adapter rejections or silent downgrades.~~
|
|
38
|
+
|
|
39
|
+
For adaptive thinking models, the plugin writes the selected level to DSH's native configuration when saved.
|
|
32
40
|
|
|
33
41
|
<p align="center">
|
|
34
42
|
<img src="./docs/images/model-defaults.en.jpg" alt="Claude model capacity defaults and reasoning modes" width="580">
|
|
@@ -42,9 +50,9 @@ DeepSeek Harness's generic reasoning controls do not fully match the request par
|
|
|
42
50
|
|
|
43
51
|
When a discovered model matches a recorded Claude model ID, the plugin automatically fills its context window, maximum output length, and reasoning-mode set. Models entered manually remain fully editable and are not overwritten by this lookup.
|
|
44
52
|
|
|
45
|
-
5. **
|
|
53
|
+
5. **Uses native RC8 settings without request rewriting**
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
Discovery, defaults, and reasoning controls are limited to Provider IDs explicitly created as **Claude Providers**. The saved provider remains a standard `llm-pi-ai` route; the plugin neither replaces global `fetch` nor modifies RC8's model adapter.
|
|
48
56
|
|
|
49
57
|
## Install
|
|
50
58
|
|
|
@@ -98,7 +106,7 @@ npx @deepseek-ai/dsh plugin --profile web remove @mofeng2223/dsh-claude-provider
|
|
|
98
106
|
npx @deepseek-ai/dsh plugin --profile headless remove @mofeng2223/dsh-claude-provider
|
|
99
107
|
```
|
|
100
108
|
|
|
101
|
-
Uninstalling the plugin does not delete `~/.dsh/settings.yaml` or stored credentials. Existing Claude providers remain
|
|
109
|
+
Uninstalling the plugin does not delete `~/.dsh/settings.yaml` or stored credentials. Existing Claude providers remain ordinary custom `anthropic-messages` routes. Their `reasoningEfforts`, default `reasoning`, and `compat.forceAdaptiveThinking` fields are native RC8 settings, so adaptive thinking and the front-end reasoning-effort selector continue to work. Only the dedicated Claude add/edit UI, model discovery, and recorded defaults disappear.
|
|
102
110
|
|
|
103
111
|
## License
|
|
104
112
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
DeepSeek Harness 的通用推理强度控制与新版 Claude 模型要求的请求参数并不完全匹配,因此选择某个档位后,可能直接出现 HTTP 400,也可能被适配器静默映射成另一个实际档位,例如界面选择 Max,实际请求却只相当于 High。`@mofeng2223/dsh-claude-provider` 增加了一个明确的 Claude 提供方类型,并按照每个 Claude
|
|
5
|
+
~~DeepSeek Harness 的通用推理强度控制与新版 Claude 模型要求的请求参数并不完全匹配,因此选择某个档位后,可能直接出现 HTTP 400,也可能被适配器静默映射成另一个实际档位,例如界面选择 Max,实际请求却只相当于 High。`@mofeng2223/dsh-claude-provider` 增加了一个明确的 Claude 提供方类型,并按照每个 Claude 模型的配置发送正确的推理参数。~~
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness 0.1.0-rc.8 已支持 Claude 系列模型的推理强度参数,但仍需要在 `settings.yaml` 中手动配置。因此,本插件不再在运行时拦截或改写模型请求,而是在用户通过前端保存 Claude 提供方时,将相应的原生配置正确写入 `settings.yaml`。
|
|
8
|
+
|
|
9
|
+
插件仍保留专用的 Claude 提供方配置页面,用户无需手动编辑 `settings.yaml`。Anthropic 原生模型探测、常用 Claude 模型参数自动填写等官方尚未实现的功能也继续保留。
|
|
6
10
|
|
|
7
11
|
## 插件功能
|
|
8
12
|
|
|
@@ -28,7 +32,11 @@ DeepSeek Harness 的通用推理强度控制与新版 Claude 模型要求的请
|
|
|
28
32
|
- 四档:Low、Medium、High、Max
|
|
29
33
|
- 开关:On、Off
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
新增模型默认使用五档,Claude 提供方默认选择 High。
|
|
36
|
+
|
|
37
|
+
~~对于 adaptive thinking 模型,插件会把所选档位转换成 Claude 使用的 `thinking.type: adaptive` 与 `output_config.effort` 请求格式,避免适配器拒绝请求或把档位降级。~~
|
|
38
|
+
|
|
39
|
+
对于 adaptive thinking 模型,插件会在保存时将所选档位写入 dsh 原生配置。
|
|
32
40
|
|
|
33
41
|
<p align="center">
|
|
34
42
|
<img src="./docs/images/model-defaults.jpg" alt="Claude 模型容量预填与思考模式设置" width="580">
|
|
@@ -42,9 +50,9 @@ DeepSeek Harness 的通用推理强度控制与新版 Claude 模型要求的请
|
|
|
42
50
|
|
|
43
51
|
探测到的模型 ID 如果与插件已经记录的 Claude 模型匹配,插件会自动填写上下文窗口、最大输出长度和推理模式。用户手动添加的模型仍然可以自由编辑,不会被这项自动匹配覆盖。
|
|
44
52
|
|
|
45
|
-
5.
|
|
53
|
+
5. **使用 RC8 原生配置,不改写请求**
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
模型探测、参数预填和推理档位只对明确创建为“Claude 提供方”的 Provider ID 生效。保存后的提供方仍是标准 `llm-pi-ai` 路由;插件不会替换全局 `fetch`,也不会修改 RC8 的模型适配器。
|
|
48
56
|
|
|
49
57
|
## 安装
|
|
50
58
|
|
|
@@ -98,7 +106,7 @@ npx @deepseek-ai/dsh plugin --profile web remove @mofeng2223/dsh-claude-provider
|
|
|
98
106
|
npx @deepseek-ai/dsh plugin --profile headless remove @mofeng2223/dsh-claude-provider
|
|
99
107
|
```
|
|
100
108
|
|
|
101
|
-
卸载插件不会删除 `~/.dsh/settings.yaml` 或已经保存的凭据。已有的 Claude 提供方会继续作为普通的 `anthropic-messages`
|
|
109
|
+
卸载插件不会删除 `~/.dsh/settings.yaml` 或已经保存的凭据。已有的 Claude 提供方会继续作为普通的 `anthropic-messages` 自定义路由保留;`reasoningEfforts`、默认 `reasoning` 和 `compat.forceAdaptiveThinking` 都是 RC8 原生字段,因此自适应思考和前端推理等级选择仍然有效。卸载后只会失去 Claude 专用的添加/编辑界面、模型探测和参数预填。
|
|
102
110
|
|
|
103
111
|
## 许可证
|
|
104
112
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
- insert:
|
|
2
2
|
- id: claude-provider
|
|
3
3
|
name: '@mofeng2223/dsh-claude-provider'
|
|
4
|
-
config:
|
|
5
|
-
debug: !!js process.env.DSH_CLAUDE_PROVIDER_DEBUG === '1'
|
|
6
|
-
effortMap:
|
|
7
|
-
minimal: low
|
|
8
|
-
low: low
|
|
9
|
-
medium: medium
|
|
10
|
-
high: high
|
|
11
|
-
xhigh: xhigh
|
|
12
|
-
max: max
|
|
13
4
|
- id: ui-settings-models
|
|
14
5
|
disabled: true
|