From a827b73eef72f58705a6ebced0cf8620dda09399 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Mon, 22 Dec 2025 16:13:19 -0500 Subject: [PATCH 1/2] feat(glm): add GLM 4.7 model support - Update default GLM/GLMT model from glm-4.6 to glm-4.7 - Add glm-4.7 pricing entry - Sync UI presets with CLI changes Closes #179 --- src/api/services/provider-presets.ts | 6 +++--- src/commands/api-command.ts | 2 +- src/web-server/model-pricing.ts | 6 ++++++ ui/src/lib/provider-presets.ts | 6 +++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/api/services/provider-presets.ts b/src/api/services/provider-presets.ts index 6b28edf9..fa34b0e3 100644 --- a/src/api/services/provider-presets.ts +++ b/src/api/services/provider-presets.ts @@ -47,10 +47,10 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ { id: 'glm', name: 'GLM', - description: 'Claude via Z.AI (GitHub Copilot)', + description: 'Claude via Z.AI', baseUrl: 'https://api.z.ai/api/anthropic', defaultProfileName: 'glm', - defaultModel: 'glm-4.6', + defaultModel: 'glm-4.7', apiKeyPlaceholder: 'ghp_...', apiKeyHint: 'Get your API key from Z.AI', category: 'alternative', @@ -61,7 +61,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ description: 'GLM with Thinking mode support', baseUrl: 'https://api.z.ai/api/coding/paas/v4/chat/completions', defaultProfileName: 'glmt', - defaultModel: 'glm-4.6', + defaultModel: 'glm-4.7', apiKeyPlaceholder: 'ghp_...', apiKeyHint: 'Same API key as GLM', category: 'alternative', diff --git a/src/commands/api-command.ts b/src/commands/api-command.ts index 0c8238de..076eeb6c 100644 --- a/src/commands/api-command.ts +++ b/src/commands/api-command.ts @@ -438,7 +438,7 @@ async function showHelp(): Promise { console.log( ` ${color('openrouter', 'command')} OpenRouter - 349+ models (Claude, GPT, Gemini, Llama)` ); - console.log(` ${color('glm', 'command')} GLM - Claude via Z.AI (GitHub Copilot)`); + console.log(` ${color('glm', 'command')} GLM - Claude via Z.AI`); console.log(` ${color('glmt', 'command')} GLMT - GLM with Thinking mode`); console.log(` ${color('kimi', 'command')} Kimi - Moonshot AI reasoning model`); console.log(` ${color('foundry', 'command')} Azure Foundry - Claude via Microsoft Azure`); diff --git a/src/web-server/model-pricing.ts b/src/web-server/model-pricing.ts index 77bf900f..0fa87466 100644 --- a/src/web-server/model-pricing.ts +++ b/src/web-server/model-pricing.ts @@ -412,6 +412,12 @@ const PRICING_REGISTRY: Record = { // --------------------------------------------------------------------------- // GLM Models (Zhipu AI / Z.AI) - Source: better-ccusage // --------------------------------------------------------------------------- + 'glm-4.7': { + inputPerMillion: 0.6, + outputPerMillion: 2.2, + cacheCreationPerMillion: 0.0, + cacheReadPerMillion: 0.11, + }, 'glm-4.6': { inputPerMillion: 0.6, outputPerMillion: 2.2, diff --git a/ui/src/lib/provider-presets.ts b/ui/src/lib/provider-presets.ts index 99bc65e1..b9b7375b 100644 --- a/ui/src/lib/provider-presets.ts +++ b/ui/src/lib/provider-presets.ts @@ -44,11 +44,11 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ { id: 'glm', name: 'GLM', - description: 'Claude via Z.AI (GitHub Copilot)', + description: 'Claude via Z.AI', baseUrl: 'https://api.z.ai/api/anthropic', defaultProfileName: 'glm', badge: 'Z.AI', - defaultModel: 'glm-4.6', + defaultModel: 'glm-4.7', requiresApiKey: true, apiKeyPlaceholder: 'ghp_...', apiKeyHint: 'Get your API key from Z.AI', @@ -61,7 +61,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ baseUrl: 'https://api.z.ai/api/coding/paas/v4/chat/completions', defaultProfileName: 'glmt', badge: 'Thinking', - defaultModel: 'glm-4.6', + defaultModel: 'glm-4.7', requiresApiKey: true, apiKeyPlaceholder: 'ghp_...', apiKeyHint: 'Same API key as GLM', From df662492a6b2473806d0c0a79e7c11f2a873c9e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Dec 2025 21:17:04 +0000 Subject: [PATCH 2/2] chore(release): 7.4.0-dev.1 [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c5d7db8f..39d4188c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kaitranntt/ccs", - "version": "7.4.0", + "version": "7.4.0-dev.1", "description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6", "keywords": [ "cli",