dsh-gateway-provider 1.0.5 → 1.0.6

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 CHANGED
@@ -131,12 +131,24 @@ the bridge is lifted from the official `dsh-llm-pi-ai` adapter.
131
131
  ```sh
132
132
  git clone https://github.com/Luck9Star/dsh-gateway-provider
133
133
  cd dsh-gateway-provider
134
- npm run link # symlink into your dsh profile (single instanceof safety)
134
+ npm install # installs the plugin-pinned pi-ai copy (direct dependency)
135
+ npm run link # symlink @deepseek-ai/* into your dsh profile (single instanceof safety)
135
136
  npm run test:client # settings-UI render, both locales
136
137
  npm run test:urls # URL/derivation units
137
138
  npm run smoke # live gateway round-trip (needs a real key)
138
139
  ```
139
140
 
141
+ ### Why the plugin pins its own pi-ai
142
+
143
+ `@earendil-works/pi-ai` is a direct dependency (exact-pinned), independent of
144
+ the pi-ai version bundled with the harness. This decouples the gateway model
145
+ catalog (thinking levels, per-provider compat such as zhipu GLM's
146
+ `supportsDeveloperRole: false`) from harness upgrades: a model missing from
147
+ the harness's older catalog no longer degrades request encoding. The
148
+ plugin↔harness boundary passes plain data (`GenerateOptions` in, dsh
149
+ `StreamChunk`s out; `lib/pi-bridge.js` never leaks pi-ai objects across), so
150
+ the plugin's pi-ai copy and the harness's own coexist safely in one process.
151
+
140
152
  Developing from a checkout: point the profile's `package.json` at
141
153
  `"dsh-gateway-provider": "link:/abs/path"` and re-run `pnpm install` in the
142
154
  profile. Do **not** also add an `id: llm-newapi` row to the profile's own
package/docs/README.zh.md CHANGED
@@ -91,12 +91,17 @@ dsh --profile web
91
91
  ```sh
92
92
  git clone https://github.com/Luck9Star/dsh-gateway-provider
93
93
  cd dsh-gateway-provider
94
- npm run link # 软链进 dsh profile(保证单实例)
94
+ npm install # 安装插件自带的 pi-ai 固定副本(直接依赖)
95
+ npm run link # @deepseek-ai/* 软链进 dsh profile(保证单实例)
95
96
  npm run test:client # 设置页渲染测试,双语言
96
97
  npm run test:urls # URL 派生单元测试
97
98
  npm run smoke # 真实网关往返(需要真 key)
98
99
  ```
99
100
 
101
+ ### 为什么插件自带 pi-ai
102
+
103
+ `@earendil-works/pi-ai` 是精确锁定的直接依赖,与 harness 自带的 pi-ai 版本解耦:网关模型目录(思考档位、各家 compat,如智谱 GLM 的 `supportsDeveloperRole: false`)不再随 harness 升级被动漂移——harness 旧目录里缺的模型不会再退化请求编码。插件与 harness 的边界只传纯数据(`GenerateOptions` 进、dsh `StreamChunk` 出,`lib/pi-bridge.js` 从不把 pi-ai 对象泄漏到边界外),因此插件副本与 harness 自带副本可在同一进程内安全共存。
104
+
100
105
  从本地检出开发:把 profile 的 `package.json` 指向
101
106
  `"dsh-gateway-provider": "link:/绝对/路径"`,然后在 profile 里重跑 `pnpm install`。**不要**再往 profile 自己的 `cordis.patch.yml` 里加 `id: llm-newapi` 行 —— bundle patch 已提供(重复行 = 加载器报错)。
102
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-gateway-provider",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Generic LLM gateway model provider plugin for DeepSeek Harness: mounts newapi / LiteLLM / Higress / any OpenAI-compatible gateway as provider routes, auto-discovers the model list, enriches every model with models.dev parameters, and dispatches each model over its native wire protocol (OpenAI / Anthropic / Gemini) via the pi-ai SDK",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,7 +61,9 @@
61
61
  "patch": "./cordis.patch.yml"
62
62
  }
63
63
  },
64
- "dependencies": {},
64
+ "dependencies": {
65
+ "@earendil-works/pi-ai": "0.84.4"
66
+ },
65
67
  "peerDependencies": {
66
68
  "@deepseek-ai/cordis": "^4.0.1",
67
69
  "@deepseek-ai/dsh-credentials": "^0.1.0-rc.7",
@@ -69,7 +71,6 @@
69
71
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.7",
70
72
  "@deepseek-ai/dsh-settings": "^0.1.0-rc.7",
71
73
  "@deepseek-ai/dsh-timeout": "^0.1.0-rc.7",
72
- "@deepseek-ai/schemastery": "^3.18.1",
73
- "@earendil-works/pi-ai": "^0.82.1"
74
+ "@deepseek-ai/schemastery": "^3.18.1"
74
75
  }
75
76
  }