diff --git a/packages/types/src/providers/zai.ts b/packages/types/src/providers/zai.ts index 2db7732230..2b156cfb51 100644 --- a/packages/types/src/providers/zai.ts +++ b/packages/types/src/providers/zai.ts @@ -16,7 +16,6 @@ export const internationalZAiModels = { contextWindow: 131_072, supportsImages: false, supportsPromptCache: true, - supportsReasoningBinary: true, inputPrice: 0.6, outputPrice: 2.2, cacheWritesPrice: 0, @@ -87,7 +86,6 @@ export const internationalZAiModels = { contextWindow: 200_000, supportsImages: false, supportsPromptCache: true, - supportsReasoningBinary: true, inputPrice: 0.6, outputPrice: 2.2, cacheWritesPrice: 0, @@ -116,7 +114,6 @@ export const mainlandZAiModels = { contextWindow: 131_072, supportsImages: false, supportsPromptCache: true, - supportsReasoningBinary: true, inputPrice: 0.29, outputPrice: 1.14, cacheWritesPrice: 0, @@ -187,7 +184,6 @@ export const mainlandZAiModels = { contextWindow: 204_800, supportsImages: false, supportsPromptCache: true, - supportsReasoningBinary: true, inputPrice: 0.29, outputPrice: 1.14, cacheWritesPrice: 0, diff --git a/src/api/providers/__tests__/zai.spec.ts b/src/api/providers/__tests__/zai.spec.ts index 9db5350080..59d599977a 100644 --- a/src/api/providers/__tests__/zai.spec.ts +++ b/src/api/providers/__tests__/zai.spec.ts @@ -297,9 +297,9 @@ describe("ZAiHandler", () => { }) describe("Reasoning functionality", () => { - it("should include thinking parameter when enableReasoningEffort is true and model supports reasoning in createMessage", async () => { + it("should not include thinking parameter when enableReasoningEffort is true for GLM-4.6 (no think for coding agents)", async () => { const handlerWithReasoning = new ZAiHandler({ - apiModelId: "glm-4.6", // GLM-4.6 has supportsReasoningBinary: true + apiModelId: "glm-4.6", zaiApiKey: "test-zai-api-key", zaiApiLine: "international_coding", enableReasoningEffort: true, @@ -322,8 +322,8 @@ describe("ZAiHandler", () => { await messageGenerator.next() expect(mockCreate).toHaveBeenCalledWith( - expect.objectContaining({ - thinking: { type: "enabled" }, + expect.not.objectContaining({ + thinking: expect.anything(), }), undefined, ) @@ -393,9 +393,9 @@ describe("ZAiHandler", () => { ) }) - it("should include thinking parameter when enableReasoningEffort is true and model supports reasoning in completePrompt", async () => { + it("should not include thinking parameter when enableReasoningEffort is true for GLM-4.5 (no think for coding agents) in completePrompt", async () => { const handlerWithReasoning = new ZAiHandler({ - apiModelId: "glm-4.5", // GLM-4.5 has supportsReasoningBinary: true + apiModelId: "glm-4.5", zaiApiKey: "test-zai-api-key", zaiApiLine: "international_coding", enableReasoningEffort: true, @@ -407,8 +407,8 @@ describe("ZAiHandler", () => { await handlerWithReasoning.completePrompt("test prompt") expect(mockCreate).toHaveBeenCalledWith( - expect.objectContaining({ - thinking: { type: "enabled" }, + expect.not.objectContaining({ + thinking: expect.anything(), }), ) }) diff --git a/webview-ui/src/components/settings/providers/ZAi.tsx b/webview-ui/src/components/settings/providers/ZAi.tsx index c7f44510c1..84079a117f 100644 --- a/webview-ui/src/components/settings/providers/ZAi.tsx +++ b/webview-ui/src/components/settings/providers/ZAi.tsx @@ -48,6 +48,9 @@ export const ZAi = ({ apiConfiguration, setApiConfigurationField }: ZAiProps) =>
{t("settings:providers.zaiEntrypointDescription")}
+
+ {t("settings:providers.zaiThinkNote")} +