From 25090e3a4b4dd797efe6eda09aef2fedceeb3353 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:53:08 +0000 Subject: [PATCH] feat: add GLM-4.7 model support to Z.ai provider - Added GLM-4.7 documentation link to the file header comments - Added glm-4.7 entry to internationalZAiModels with: - maxTokens: 98,304 - contextWindow: 200,000 (matching GLM-4.6) - supportsImages: false - supportsPromptCache: true - supportsNativeTools: true - defaultToolProtocol: native - Pricing aligned with GLM-4.6 - Added glm-4.7 entry to mainlandZAiModels with similar configuration but using mainland China pricing Cherry-picked from PR #10271 --- packages/types/src/providers/zai.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/packages/types/src/providers/zai.ts b/packages/types/src/providers/zai.ts index 1d5d19261f3..05c1a5d5ca9 100644 --- a/packages/types/src/providers/zai.ts +++ b/packages/types/src/providers/zai.ts @@ -5,6 +5,7 @@ import { ZaiApiLine } from "../provider-settings.js" // https://docs.z.ai/guides/llm/glm-4-32b-0414-128k // https://docs.z.ai/guides/llm/glm-4.5 // https://docs.z.ai/guides/llm/glm-4.6 +// https://docs.z.ai/guides/llm/glm-4.7 // https://docs.z.ai/guides/overview/pricing // https://bigmodel.cn/pricing @@ -100,6 +101,20 @@ export const internationalZAiModels = { description: "GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations.", }, + "glm-4.7": { + maxTokens: 98_304, + contextWindow: 200_000, + supportsImages: false, + supportsPromptCache: true, + supportsNativeTools: true, + defaultToolProtocol: "native", + inputPrice: 0.6, + outputPrice: 2.2, + cacheWritesPrice: 0, + cacheReadsPrice: 0.11, + description: + "GLM-4.7 is Zhipu's latest model with enhanced capabilities for reasoning, coding, and agent tasks, building upon the GLM-4.6 foundation with improved performance.", + }, // kilocode_change start "glm-4.6v": { maxTokens: 98_304, @@ -234,6 +249,20 @@ export const mainlandZAiModels = { description: "GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations.", }, + "glm-4.7": { + maxTokens: 98_304, + contextWindow: 204_800, + supportsImages: false, + supportsPromptCache: true, + supportsNativeTools: true, + defaultToolProtocol: "native", + inputPrice: 0.29, + outputPrice: 1.14, + cacheWritesPrice: 0, + cacheReadsPrice: 0.057, + description: + "GLM-4.7 is Zhipu's latest model with enhanced capabilities for reasoning, coding, and agent tasks, building upon the GLM-4.6 foundation with improved performance.", + }, } as const satisfies Record export const ZAI_DEFAULT_TEMPERATURE = 0.6