dsh-gateway-provider 1.0.9 → 1.0.10
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 +1 -1
- package/docs/README.zh.md +1 -1
- package/lib/catalog.js +2 -2
- package/lib/client.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ the same keys). The frequently used ones:
|
|
|
97
97
|
| `gateways` | — | Array of extra gateways: `{ id, baseURL, apiKeyEnv, label, … }`, each becoming a `gateway:<id>` route. |
|
|
98
98
|
| `models` | — | Per-model overrides: `{ id, name, disabled, protocol, contextWindow, maxTokens, reasoningLevels }`. |
|
|
99
99
|
| `useModelsDev` / `modelsUrl` | `true` / models.dev | Parameter enrichment source (supports `file:` URLs for offline). |
|
|
100
|
-
| `excludePatterns` | image/speech/… | Regex list of model ids to keep out of the picker. |
|
|
100
|
+
| `excludePatterns` | image/speech/… | Regex list of model ids to keep out of the picker (matched case-insensitively). |
|
|
101
101
|
| `sortModelsByRelease` | `true` | Newest models first. |
|
|
102
102
|
| `catalogMode` | `auto` | `v1` (`/v1/models` only) / `management` (newapi user API) / `auto`. |
|
|
103
103
|
| `endpointPriority` | responses → anthropic → openai → gemini | Which protocol to prefer when a model supports several. |
|
package/docs/README.zh.md
CHANGED
|
@@ -63,7 +63,7 @@ dsh --profile web
|
|
|
63
63
|
| `gateways` | — | 额外网关数组:`{ id, baseURL, apiKeyEnv, label, … }`,每个成为一条 `gateway:<id>` 路由。 |
|
|
64
64
|
| `models` | — | 按模型覆盖:`{ id, name, disabled, protocol, contextWindow, maxTokens, reasoningLevels }`。 |
|
|
65
65
|
| `useModelsDev` / `modelsUrl` | `true` / models.dev | 参数增补来源(支持 `file:` URL 离线用)。 |
|
|
66
|
-
| `excludePatterns` | 图像/语音/…… | 要从选择器排除的模型 id
|
|
66
|
+
| `excludePatterns` | 图像/语音/…… | 要从选择器排除的模型 id 正则列表(不区分大小写)。 |
|
|
67
67
|
| `sortModelsByRelease` | `true` | 最新模型排前面。 |
|
|
68
68
|
| `catalogMode` | `auto` | `v1`(只用 `/v1/models`)/ `management`(newapi 用户 API)/ `auto`。 |
|
|
69
69
|
| `endpointPriority` | responses → anthropic → openai → gemini | 模型支持多种协议时的优先序。 |
|
package/lib/catalog.js
CHANGED
|
@@ -154,11 +154,11 @@ async function fetchNewapiModels(connection, apiKey, signal) {
|
|
|
154
154
|
return fetchManagementModels(base, apiKey, connection.userId, signal);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
/** Apply the picker filter (chat-only + exclude patterns). */
|
|
157
|
+
/** Apply the picker filter (chat-only + exclude patterns, matched case-insensitively). */
|
|
158
158
|
function filterEntries(entries, connection) {
|
|
159
159
|
const patterns = (connection.excludePatterns ?? DEFAULT_EXCLUDE_PATTERNS).map((p) => {
|
|
160
160
|
try {
|
|
161
|
-
return new RegExp(p);
|
|
161
|
+
return new RegExp(p, "i");
|
|
162
162
|
} catch {
|
|
163
163
|
return undefined;
|
|
164
164
|
}
|
package/lib/client.js
CHANGED
|
@@ -918,7 +918,7 @@ window.__ModuleLoader__.load({
|
|
|
918
918
|
// Keep the stored list aligned with what the picker will show:
|
|
919
919
|
// drop entries matched by the configured exclude patterns.
|
|
920
920
|
var patterns = (snap.excludePatterns || []).map(function (p) {
|
|
921
|
-
try { return new RegExp(p); } catch (e) { return null; }
|
|
921
|
+
try { return new RegExp(p, "i"); } catch (e) { return null; }
|
|
922
922
|
}).filter(Boolean);
|
|
923
923
|
var discovered = found
|
|
924
924
|
.filter(function (m) { return !patterns.some(function (re) { return re.test(m.id); }); })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gateway-provider",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
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",
|