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
This commit is contained in:
kaitranntt
2025-12-22 16:13:19 -05:00
parent 3da29e58e3
commit a827b73eef
4 changed files with 13 additions and 7 deletions
+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',