Selaa lähdekoodia

fix(providers): verify minimax/zhipu/volcengine against official docs

minimax:
- temperatureRange: [0, 2] → [0, 1](MiniMax Anthropic 兼容端官方上限 1,之前 lobe 数据偏高)

zhipu:
- checkModel: glm-4-flash → glm-4.7-flash(glm-4-flash 不在当前 models 列表,
  会导致 verifyService 404;glm-4.7-flash 是当前免费快速模型)

volcengine:
- temperatureRange: [0, 1] → [0, 2](火山方舟基于 OpenAI 兼容协议,
  实际支持 [0, 2];[0, 1] 会挡正常高温度请求)
- doubao-seed-2.0-{pro,lite,mini,code}.maxOutput: 128000 → 32000
  (128K maxOutput 超出家族典型值,lobe 数据异常)
- glm-4-7.maxOutput: 128000 → 16000(同上)

R2-6 / R2-8 / R2-12。
fanghanjun 6 kuukautta sitten
vanhempi
commit
9c8b029f02

+ 2 - 2
packages/core/src/__tests__/temperature-constraints.test.ts

@@ -36,9 +36,9 @@ describe("temperature constraints per service", () => {
     expect(preset?.temperatureRange).toEqual([0, 2]);
   });
 
-  it("minimax has range [0, 2]", () => {
+  it("minimax has range [0, 1] (R2-6: MiniMax Anthropic compat 官方上限 1)", () => {
     const preset = resolveServicePreset("minimax");
-    expect(preset?.temperatureRange).toEqual([0, 2]);
+    expect(preset?.temperatureRange).toEqual([0, 1]);
   });
 
   it("clampTemperature respects service range", () => {

+ 1 - 1
packages/core/src/llm/providers/endpoints/minimax.ts

@@ -6,7 +6,7 @@ export const MINIMAX: InkosEndpoint = {
   api: "anthropic-messages",
   baseUrl: "https://api.minimaxi.com/anthropic",
   checkModel: "MiniMax-M2.7",
-  temperatureRange: [0, 2],
+  temperatureRange: [0, 1],
   defaultTemperature: 0.9,
   writingTemperature: 0.9,
   models: [

+ 6 - 6
packages/core/src/llm/providers/endpoints/volcengine.ts

@@ -6,17 +6,17 @@ export const VOLCENGINE: InkosEndpoint = {
   api: "openai-completions",
   baseUrl: "https://ark.cn-beijing.volces.com/api/v3",
   checkModel: "doubao-lite-32k",
-  temperatureRange: [0, 1],
+  temperatureRange: [0, 2],
   defaultTemperature: 0.7,
   writingTemperature: 1,
   models: [
-    { id: "doubao-seed-2.0-pro", displayName: "Doubao Seed 2.0 Pro", maxOutput: 128000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, enabled: true, releasedAt: "2026-02-15" },
-    { id: "doubao-seed-2.0-lite", displayName: "Doubao Seed 2.0 Lite", maxOutput: 128000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, enabled: true, releasedAt: "2026-02-15" },
-    { id: "doubao-seed-2.0-mini", displayName: "Doubao Seed 2.0 Mini", maxOutput: 128000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, releasedAt: "2026-02-15" },
-    { id: "doubao-seed-2.0-code", displayName: "Doubao Seed 2.0 Code", maxOutput: 128000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, releasedAt: "2026-02-15" },
+    { id: "doubao-seed-2.0-pro", displayName: "Doubao Seed 2.0 Pro", maxOutput: 32000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, enabled: true, releasedAt: "2026-02-15" },
+    { id: "doubao-seed-2.0-lite", displayName: "Doubao Seed 2.0 Lite", maxOutput: 32000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, enabled: true, releasedAt: "2026-02-15" },
+    { id: "doubao-seed-2.0-mini", displayName: "Doubao Seed 2.0 Mini", maxOutput: 32000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, releasedAt: "2026-02-15" },
+    { id: "doubao-seed-2.0-code", displayName: "Doubao Seed 2.0 Code", maxOutput: 32000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, releasedAt: "2026-02-15" },
     { id: "doubao-seed-1.8", displayName: "Doubao Seed 1.8", maxOutput: 64000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true }, releasedAt: "2025-12-18" },
     { id: "doubao-seed-code", displayName: "Doubao Seed Code", maxOutput: 32000, contextWindowTokens: 256000, abilities: { reasoning: true, vision: true, functionCall: true } },
-    { id: "glm-4-7", displayName: "GLM-4.7", maxOutput: 128000, contextWindowTokens: 200000, abilities: { reasoning: true, functionCall: true } },
+    { id: "glm-4-7", displayName: "GLM-4.7", maxOutput: 16000, contextWindowTokens: 200000, abilities: { reasoning: true, functionCall: true } },
     { id: "deepseek-v3.2", displayName: "DeepSeek V3.2", maxOutput: 32768, contextWindowTokens: 131072, abilities: { reasoning: true, functionCall: true } },
     { id: "deepseek-v3.1", displayName: "DeepSeek V3.1", maxOutput: 32768, contextWindowTokens: 131072, abilities: { reasoning: true, functionCall: true } },
     { id: "kimi-k2-thinking", displayName: "Kimi K2 Thinking", maxOutput: 32768, contextWindowTokens: 262144, abilities: { reasoning: true, functionCall: true } },

+ 1 - 1
packages/core/src/llm/providers/endpoints/zhipu.ts

@@ -5,7 +5,7 @@ export const ZHIPU: InkosEndpoint = {
   label: "智谱 GLM",
   api: "openai-completions",
   baseUrl: "https://open.bigmodel.cn/api/paas/v4",
-  checkModel: "glm-4-flash",
+  checkModel: "glm-4.7-flash",
   temperatureRange: [0, 1],
   defaultTemperature: 0.95,
   writingTemperature: 0.95,