Merge pull request #181 from kaitranntt/dev

feat(glm): add GLM 4.7 model support
This commit is contained in:
Kai (Tam Nhu) Tran
2025-12-22 16:28:40 -05:00
committed by GitHub
5 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -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",
+3 -3
View File
@@ -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',
+1 -1
View File
@@ -438,7 +438,7 @@ async function showHelp(): Promise<void> {
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`);
+6
View File
@@ -412,6 +412,12 @@ const PRICING_REGISTRY: Record<string, ModelPricing> = {
// ---------------------------------------------------------------------------
// 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,
+3 -3
View File
@@ -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',