From 92e0d4651a9f7ce61208e342e1f3ac88e2c7e3e0 Mon Sep 17 00:00:00 2001 From: Yige Date: Tue, 7 Jul 2026 16:25:21 +0800 Subject: [PATCH] chore: refresh GLM model configs ## Summary - add GLM-5.2 and GLM-4.7-FlashX to Zhipu provider config - update GLM context/output/pricing tiers from official BigModel docs and pricing - align Zhipu Coding Plan with official GLM-5.2, GLM-5-Turbo, and GLM-4.7 availability - sync existing GLM max output values in DashScope configs - address Copilot review by using extra.pricingTiers consistently ## Validation - npm run validate - npm test - git diff --check --- compute/coding-plans/dashscope-coding.json | 4 +- .../coding-plans/dashscope-token-plan.json | 4 +- compute/coding-plans/zhipu-coding.json | 92 +++--- compute/providers/zhipu.json | 288 +++++++++++++++--- 4 files changed, 283 insertions(+), 105 deletions(-) diff --git a/compute/coding-plans/dashscope-coding.json b/compute/coding-plans/dashscope-coding.json index d1a7683..78fad60 100644 --- a/compute/coding-plans/dashscope-coding.json +++ b/compute/coding-plans/dashscope-coding.json @@ -161,7 +161,7 @@ ], "description": "百炼 Coding Plan,智谱 GLM-5,200K 上下文", "contextWindow": 202752, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -179,7 +179,7 @@ ], "description": "百炼 Coding Plan,智谱 GLM-4.7,200K 上下文", "contextWindow": 202752, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", diff --git a/compute/coding-plans/dashscope-token-plan.json b/compute/coding-plans/dashscope-token-plan.json index 38eb588..01d7f6b 100644 --- a/compute/coding-plans/dashscope-token-plan.json +++ b/compute/coding-plans/dashscope-token-plan.json @@ -133,7 +133,7 @@ ], "description": "百炼 Token Plan,智谱 GLM-5,200K 上下文", "contextWindow": 202752, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -169,7 +169,7 @@ ], "description": "百炼 Token Plan,智谱 GLM-4.7,200K 上下文", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", diff --git a/compute/coding-plans/zhipu-coding.json b/compute/coding-plans/zhipu-coding.json index 5b0729f..b057f5f 100644 --- a/compute/coding-plans/zhipu-coding.json +++ b/compute/coding-plans/zhipu-coding.json @@ -3,7 +3,7 @@ "provider": "zhipu", "brandGroup": "zhipu", "label": "智谱 Token (Coding) Plan", - "baseUrl": "https://open.bigmodel.cn/api/anthropic", + "baseUrl": "https://api.z.ai/api/anthropic", "apiFormat": "anthropic-messages", "apiKeyRef": "", "apiKeyVerified": false, @@ -21,15 +21,22 @@ "consoleUrl": "https://open.bigmodel.cn/console/overview" } }, + "tombstones": [ + "glm-5.1", + "glm-5", + "glm-4.5-air" + ], "models": [ { - "modelName": "glm-5.1", - "displayName": "GLM-5.1 (Coding)", + "modelName": "glm-5.2", + "apiModelId": "glm-5.2[1m]", + "displayName": "GLM-5.2 (Coding)", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱 GLM-5.1 Coding Plan 版本,754B 参数旗舰,200K 上下文,SWE-Bench Pro 58.4%", - "contextWindow": 200000, + "description": "智谱 GLM-5.2 Coding Plan 版本,官方最新可用模型,1M 上下文,128K 最大输出", + "contextWindow": 1000000, "maxOutputTokens": 131072, "capabilities": [ "chat", @@ -42,17 +49,33 @@ "math", "multilingual" ], + "extra": { + "codingPlanLongContextModelId": "glm-5.2[1m]", + "reasoningEffort": { + "default": "max", + "supported": [ + "max", + "xhigh", + "high", + "medium", + "low", + "minimal", + "none" + ] + } + }, "source": "preset" }, { "modelName": "glm-5-turbo", - "displayName": "GLM-5 Turbo (Coding)", + "displayName": "GLM-5-Turbo (Coding)", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱 GLM-5 Turbo Coding Plan 版本,高阶模型,速度更快", + "description": "智谱 GLM-5-Turbo Coding Plan 版本,官方可用高阶模型,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -62,29 +85,8 @@ "tool_use", "agent", "math", - "multilingual" - ], - "source": "preset" - }, - { - "modelName": "glm-5", - "displayName": "GLM-5 (Coding)", - "serviceType": [ - "chat" - ], - "description": "智谱 GLM-5 Coding Plan 版本,745B MoE,200K 上下文", - "contextWindow": 200000, - "maxOutputTokens": 128000, - "capabilities": [ - "chat", - "reasoning", - "code", - "deep_thinking", - "long_context", - "tool_use", - "agent", - "math", - "multilingual" + "multilingual", + "fast" ], "source": "preset" }, @@ -92,11 +94,12 @@ "modelName": "glm-4.7", "displayName": "GLM-4.7 (Coding)", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱 GLM-4.7 Coding Plan 版本,355B MoE,200K 上下文", + "description": "智谱 GLM-4.7 Coding Plan 版本,官方可用模型,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -104,25 +107,10 @@ "deep_thinking", "long_context", "tool_use", + "agent", "multilingual" ], "source": "preset" - }, - { - "modelName": "glm-4.5-air", - "displayName": "GLM-4.5 Air (Coding)", - "serviceType": [ - "chat" - ], - "description": "智谱 GLM-4.5 Air Coding Plan 版本,轻量级 Haiku 级模型", - "contextWindow": 128000, - "maxOutputTokens": 16384, - "capabilities": [ - "chat", - "code", - "fast" - ], - "source": "preset" } ] } diff --git a/compute/providers/zhipu.json b/compute/providers/zhipu.json index fdfeaa8..e4350b8 100644 --- a/compute/providers/zhipu.json +++ b/compute/providers/zhipu.json @@ -12,21 +12,74 @@ "services": [ "chat", "vision", - "reasoning" + "reasoning", + "fast" ], "tombstones": [ - "embedding-3" + "embedding-3", + "glm-4.7-thinking", + "glm-z1-air", + "glm-z1-airx", + "glm-z1-flash", + "glm-z1-flashx", + "glm-4-0520" ], "models": [ + { + "modelName": "glm-5.2", + "displayName": "GLM-5.2", + "serviceType": [ + "chat", + "reasoning" + ], + "description": "智谱 GLM-5.2 最新旗舰模型,面向复杂长程任务与项目级工程交付,1M 上下文,128K 最大输出", + "contextWindow": 1000000, + "maxOutputTokens": 131072, + "capabilities": [ + "chat", + "reasoning", + "code", + "multilingual", + "deep_thinking", + "long_context", + "math", + "tool_use", + "agent" + ], + "inputPrice": 8, + "outputPrice": 28, + "defaultTemperature": 1, + "defaultTopP": 0.95, + "extra": { + "cacheHitPrice": 2, + "cacheStoragePrice": 0, + "thinking": { + "default": "enabled" + }, + "reasoningEffort": { + "default": "max", + "supported": [ + "max", + "xhigh", + "high", + "medium", + "low", + "minimal", + "none" + ] + } + } + }, { "modelName": "glm-5.1", "displayName": "GLM-5.1", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱 GLM-5.1 最新旗舰模型,面向长程 Agentic Coding 与 Autonomous Agent 场景,200K 上下文,128K 最大输出", + "description": "智谱 GLM-5.1 旗舰模型,面向长程 Agentic Coding 与 Autonomous Agent 场景,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -43,21 +96,37 @@ "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 1.2, + "cacheHitPrice": 1.3, + "cacheStoragePrice": 0, "thinking": { "default": "enabled" - } + }, + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32)", + "inputPrice": 6, + "outputPrice": 24, + "cacheHitPrice": 1.3 + }, + { + "condition": "input_length_k_tokens: [32+)", + "inputPrice": 8, + "outputPrice": 28, + "cacheHitPrice": 2 + } + ] } }, { "modelName": "glm-5-turbo", "displayName": "GLM-5-Turbo", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱 GLM-5-Turbo,面向 OpenClaw 等长链路任务优化,200K 上下文,128K 最大输出", + "description": "智谱 GLM-5-Turbo,高阶快速模型,面向长链路任务优化,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -65,28 +134,46 @@ "deep_thinking", "long_context", "tool_use", - "agent" + "agent", + "fast" ], "inputPrice": 5, "outputPrice": 22, "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 1, + "cacheHitPrice": 1.2, + "cacheStoragePrice": 0, + "decodeSpeed": "40-60 tokens/s", "thinking": { "default": "enabled" - } + }, + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32)", + "inputPrice": 5, + "outputPrice": 22, + "cacheHitPrice": 1.2 + }, + { + "condition": "input_length_k_tokens: [32+)", + "inputPrice": 7, + "outputPrice": 26, + "cacheHitPrice": 1.8 + } + ] } }, { "modelName": "glm-5", "displayName": "GLM-5", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱GLM-5,744B参数旗舰基座模型,2026年2月发布,面向Agentic Engineering,编程能力接近Claude Opus", + "description": "智谱 GLM-5,面向 Agentic Engineering 的旗舰基座模型,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -103,18 +190,38 @@ "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 0.8 + "cacheHitPrice": 1, + "cacheStoragePrice": 0, + "decodeSpeed": "30-50 tokens/s", + "thinking": { + "default": "enabled" + }, + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32)", + "inputPrice": 4, + "outputPrice": 18, + "cacheHitPrice": 1 + }, + { + "condition": "input_length_k_tokens: [32+)", + "inputPrice": 6, + "outputPrice": 22, + "cacheHitPrice": 1.5 + } + ] } }, { "modelName": "glm-4.7", "displayName": "GLM-4.7", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱GLM-4.7,355B参数MoE架构旗舰模型,200K上下文,编程能力对齐Claude Sonnet", + "description": "智谱 GLM-4.7,高智能模型,通用对话、推理与智能体能力全面升级,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", @@ -122,39 +229,67 @@ "multilingual", "deep_thinking", "long_context", - "tool_use" + "tool_use", + "agent" ], "inputPrice": 2, "outputPrice": 8, "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 0.5 + "cacheHitPrice": 0.4, + "cacheStoragePrice": 0, + "decodeSpeed": "30-50 tokens/s", + "thinking": { + "default": "enabled", + "mode": "forced" + }, + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32); output_length_k_tokens: [0, 0.2)", + "inputPrice": 2, + "outputPrice": 8, + "cacheHitPrice": 0.4 + }, + { + "condition": "input_length_k_tokens: [0, 32); output_length_k_tokens: [0.2+)", + "inputPrice": 3, + "outputPrice": 14, + "cacheHitPrice": 0.6 + }, + { + "condition": "input_length_k_tokens: [32, 200)", + "inputPrice": 4, + "outputPrice": 16, + "cacheHitPrice": 0.8 + } + ] } }, { - "modelName": "glm-4.7-thinking", - "displayName": "GLM-4.7 Thinking", + "modelName": "glm-4.7-flashx", + "displayName": "GLM-4.7-FlashX", "serviceType": [ - "reasoning" + "chat", + "fast" ], - "description": "智谱GLM-4.7深度思考模式,200K上下文,交错式/保留式/轮级思考", + "description": "智谱 GLM-4.7-FlashX 轻量高速模型,适用于中文写作、翻译、角色扮演等通用场景,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ - "reasoning", - "math", - "code", - "deep_thinking", - "long_context" + "chat", + "fast", + "long_context", + "multilingual" ], - "inputPrice": 2, - "outputPrice": 8, + "inputPrice": 0.5, + "outputPrice": 3, "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 0.5, - "aliasOf": "glm-4.7" + "cacheHitPrice": 0.1, + "cacheStoragePrice": 0, + "decodeSpeed": "30-40 tokens/s" } }, { @@ -163,9 +298,9 @@ "serviceType": [ "vision" ], - "description": "智谱首个多模态 Coding 基座模型,支持视频、图像、文本和文件输入,200K 上下文,128K 最大输出", + "description": "智谱首个多模态 Agent 基座模型,支持视频、图像、文本和文件输入,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "vision", @@ -184,10 +319,32 @@ "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 1, + "cacheHitPrice": 1.2, + "cacheStoragePrice": 0, + "decodeSpeed": "30-50 tokens/s", "thinking": { "default": "enabled" - } + }, + "inputModalities": [ + "image", + "video", + "file", + "text" + ], + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32)", + "inputPrice": 5, + "outputPrice": 22, + "cacheHitPrice": 1.2 + }, + { + "condition": "input_length_k_tokens: [32+)", + "inputPrice": 7, + "outputPrice": 26, + "cacheHitPrice": 1.8 + } + ] } }, { @@ -196,7 +353,7 @@ "serviceType": [ "vision" ], - "description": "智谱GLM-4.6V多模态版,106B/12B MoE,支持图像视频理解与工具调用,128K上下文", + "description": "智谱 GLM-4.6V 多模态模型,支持图像、视频、文本和文件理解,128K 上下文,32K 最大输出", "contextWindow": 128000, "maxOutputTokens": 32768, "capabilities": [ @@ -204,39 +361,72 @@ "vision", "video_understanding", "image_understanding", + "file_understanding", "long_context", - "tool_use" + "tool_use", + "reasoning" ], "inputPrice": 1, - "outputPrice": 4, + "outputPrice": 3, "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 0.2 + "cacheHitPrice": 0.2, + "cacheStoragePrice": 0, + "decodeSpeed": "30-50 tokens/s", + "thinking": { + "default": "enabled" + }, + "inputModalities": [ + "image", + "video", + "file", + "text" + ], + "pricingTiers": [ + { + "condition": "input_length_k_tokens: [0, 32)", + "inputPrice": 1, + "outputPrice": 3, + "cacheHitPrice": 0.2 + }, + { + "condition": "input_length_k_tokens: [32, 128)", + "inputPrice": 2, + "outputPrice": 6, + "cacheHitPrice": 0.4 + } + ] } }, { "modelName": "glm-4.6", "displayName": "GLM-4.6", "serviceType": [ - "chat" + "chat", + "reasoning" ], - "description": "智谱GLM-4.6,增强推理能力,200K上下文", + "description": "智谱 GLM-4.6,擅长高级编码、复杂推理与工具调用,200K 上下文,128K 最大输出", "contextWindow": 200000, - "maxOutputTokens": 128000, + "maxOutputTokens": 131072, "capabilities": [ "chat", "reasoning", "code", "multilingual", - "deep_thinking" + "deep_thinking", + "long_context", + "tool_use" ], "inputPrice": 2, "outputPrice": 8, "defaultTemperature": 1, "defaultTopP": 0.95, "extra": { - "cacheHitPrice": 0.5 + "cacheHitPrice": 0.5, + "thinking": { + "default": "enabled" + } } } ]