mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 00:16:46 +00:00
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:
@@ -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',
|
||||
|
||||
@@ -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`);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user