dsh-llm-workbuddy 0.1.9 → 0.1.11
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 +4 -2
- package/lib/index.js +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -280,8 +280,10 @@ DSH 的 `dsh.client` 机制只要求 `package.json` 里:
|
|
|
280
280
|
|
|
281
281
|
模型列表默认取插件内置目录;代理可达时改为实时拉取 `/v1/models`(支持
|
|
282
282
|
`{"models": [...]}` / `{"data": [...]}` 两种返回),未列出的模型 id 仍可原样
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
传递。**内置目录充当白名单**:代理返回的已下架/不可用模型(如 glm-4.6v、
|
|
284
|
+
glm-5.0、minimax-m2.5 等,上游返回 `service info not found`)会被过滤,不显示
|
|
285
|
+
在 UI 中。每个模型的推理等级(`reasoningEffort`)默认来自内置目录,代理可达时
|
|
286
|
+
优先沿用目录值(代理 `/v1/models` 当前只上报 `High`,不区分模型)。
|
|
285
287
|
|
|
286
288
|
---
|
|
287
289
|
|
package/lib/index.js
CHANGED
|
@@ -75,19 +75,15 @@ const DISCOVERY_TIMEOUT_MS = 2_000;
|
|
|
75
75
|
const DEFAULT_MODELS = [
|
|
76
76
|
{ id: "deepseek-v4-pro", name: "Deepseek-V4-Pro", contextWindow: 1_000_000, maxTokens: 50_000, inputModalities: ["text", "image"], reasoningEffort: "high" },
|
|
77
77
|
{ id: "deepseek-v4-flash", name: "Deepseek-V4-Flash", contextWindow: 1_000_000, maxTokens: 50_000, inputModalities: ["text", "image"], reasoningEffort: "high" },
|
|
78
|
+
{ id: "deepseek-v3-2-volc", name: "DeepSeek-V3.2", contextWindow: 96_000, maxTokens: 32_000, reasoningEffort: "medium" },
|
|
78
79
|
{ id: "glm-5.2", name: "GLM-5.2", contextWindow: 1_000_000, maxTokens: 48_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
79
80
|
{ id: "glm-5.1", name: "GLM-5.1", contextWindow: 200_000, maxTokens: 48_000, reasoningEffort: "medium" },
|
|
80
|
-
{ id: "glm-5.0", name: "GLM-5.0", contextWindow: 200_000, maxTokens: 48_000, reasoningEffort: "high" },
|
|
81
|
-
{ id: "glm-4.7", name: "GLM-4.7", contextWindow: 200_000, maxTokens: 48_000, reasoningEffort: "high" },
|
|
82
|
-
{ id: "glm-4.6", name: "GLM-4.6", contextWindow: 168_000, maxTokens: 32_000, reasoningEffort: "high" },
|
|
83
81
|
{ id: "glm-5v-turbo", name: "GLM-5v-Turbo", contextWindow: 200_000, maxTokens: 64_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
84
82
|
{ id: "kimi-k3-1", name: "Kimi-K3", contextWindow: 1_000_000, maxTokens: 32_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
85
83
|
{ id: "kimi-k2.7", name: "Kimi-K2.7-Code", contextWindow: 256_000, maxTokens: 32_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
86
84
|
{ id: "kimi-k2.6", name: "Kimi-K2.6", contextWindow: 256_000, maxTokens: 32_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
87
85
|
{ id: "kimi-k2.5", name: "Kimi-K2.5", contextWindow: 164_000, maxTokens: 32_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
88
|
-
{ id: "kimi-k2-thinking", name: "Kimi-K2-Thinking", contextWindow: 164_000, maxTokens: 32_000, reasoningEffort: "medium" },
|
|
89
86
|
{ id: "minimax-m3", name: "MiniMax-M3", contextWindow: 512_000, maxTokens: 128_000, inputModalities: ["text", "image"], reasoningEffort: "medium" },
|
|
90
|
-
{ id: "minimax-m2.5", name: "MiniMax-M2.5", contextWindow: 200_000, maxTokens: 48_000, reasoningEffort: "medium" },
|
|
91
87
|
{ id: "hy3", name: "Hy3", contextWindow: 192_000, maxTokens: 64_000, inputModalities: ["text", "image"], reasoningEffort: "high" },
|
|
92
88
|
{ id: "hunyuan-2.0-thinking", name: "Hunyuan-2.0-Thinking", contextWindow: 128_000, maxTokens: 24_000, reasoningEffort: "medium" },
|
|
93
89
|
{ id: "hunyuan-chat", name: "Hunyuan-Turbos", contextWindow: 200_000, maxTokens: 8_192 },
|
|
@@ -183,7 +179,10 @@ async function serializeMessages(messages, attachments, signal) {
|
|
|
183
179
|
if (attachments === undefined) {
|
|
184
180
|
throw new LlmError("WorkBuddy image input requires the durable attachment service", "UNSUPPORTED_CONTENT");
|
|
185
181
|
}
|
|
186
|
-
|
|
182
|
+
// Keep images small enough for the upstream platform: the proxy relays the
|
|
183
|
+
// base64 body verbatim, and oversized payloads are dropped/ignored upstream
|
|
184
|
+
// (models reply "no image attached"). Mirror the official adapter budgets.
|
|
185
|
+
const policy = { maxPixels: 2048 * 2048, maxBytes: 1024 * 1024 };
|
|
187
186
|
const ordered = [...refs.values()];
|
|
188
187
|
const prepared = await Promise.all(ordered.map((ref) => attachments.readImageRequest(ref, policy, signal)));
|
|
189
188
|
for (let index = 0; index < ordered.length; index += 1) {
|
|
@@ -553,6 +552,11 @@ export class WorkBuddyAdapter extends LlmAdapter {
|
|
|
553
552
|
if (seen.has(entry.id)) continue;
|
|
554
553
|
seen.add(entry.id);
|
|
555
554
|
const catalog = byId.get(entry.id);
|
|
555
|
+
// Only keep models the static catalog declares. The proxy announces
|
|
556
|
+
// retired models (glm-4.6v, hunyuan-image-v3.0, ...) that upstream
|
|
557
|
+
// rejects with `service info not found`; the catalog doubles as the
|
|
558
|
+
// whitelist so those never reach the UI.
|
|
559
|
+
if (catalog === undefined) continue;
|
|
556
560
|
const effort = liveReasoningEffort(entry, catalog?.reasoningEffort);
|
|
557
561
|
const reasoning = modelReasoningInfo(effort);
|
|
558
562
|
merged.push({
|
package/package.json
CHANGED