feat: add GLM-5.1 to GLM Coding provider, update GLM-5 pricing

- Add glm-5.1 model to GLM Coding provider with fitness scores
- Update glm-5 pricing to match Z.AI API page ($1/$3.2/$0.2)
- Set glm-5.1 pricing to $1.2/$5/$0.3 per Z.AI
- Remove glm-4-32b (deprecated, returns empty from upstream)
- Rename Z.AI provider display name from "Z.AI (GLM-5)" to "Z.AI"
- Update zai pricing section to match glm pricing
This commit is contained in:
Chris Staley 2026-03-27 15:44:35 -06:00
parent 86d377a2f0
commit abcf836a0c
5 changed files with 65 additions and 27 deletions

View file

@ -626,6 +626,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {
"Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14",
},
models: [
{ id: "glm-5.1", name: "GLM 5.1" },
{ id: "glm-5", name: "GLM 5" },
{ id: "glm-5-turbo", name: "GLM 5 Turbo" },
{ id: "glm-4.7-flash", name: "GLM 4.7 Flash" },
@ -635,7 +636,6 @@ export const REGISTRY: Record<string, RegistryEntry> = {
{ id: "glm-4.5v", name: "GLM 4.5V (Vision)" },
{ id: "glm-4.5", name: "GLM 4.5" },
{ id: "glm-4.5-air", name: "GLM 4.5 Air" },
{ id: "glm-4-32b", name: "GLM 4 32B" },
],
},

View file

@ -36,7 +36,8 @@ const FITNESS_TABLE: Record<string, Record<string, number>> = {
"grok-3": 0.8,
// Kimi K2.5 — agentic with tool calling, good at code tasks
"kimi-k2": 0.82,
// GLM-5 — Z.AI model with 128k output
// GLM-5.1 / GLM-5 — Z.AI reasoning models, 200K context / 128k output
"glm-5.1": 0.78,
"glm-5": 0.78,
// MiniMax M2.5 — reasoning support helps complex code
"minimax-m2.5": 0.75,
@ -78,6 +79,7 @@ const FITNESS_TABLE: Record<string, Record<string, number>> = {
"deepseek-r1": 0.88,
"deepseek-chat": 0.8,
"kimi-k2": 0.82, // Kimi K2.5 agentic — good for analysis
"glm-5.1": 0.82, // GLM-5.1 free reasoning, 200K context for long analysis
"glm-5": 0.78, // GLM-5 with 128k output for long analysis
"minimax-m2.5": 0.76,
},
@ -114,6 +116,7 @@ const FITNESS_TABLE: Record<string, Record<string, number>> = {
"grok-4": 0.74,
"grok-3": 0.73,
"kimi-k2": 0.76, // agentic multi-step tasks
"glm-5.1": 0.75,
"glm-5": 0.7,
"minimax-m2.5": 0.7,
},

View file

@ -729,40 +729,75 @@ export const DEFAULT_PRICING = {
// GLM
glm: {
"glm-5.1": {
input: 1.2,
output: 5,
cached: 0.3,
reasoning: 5,
cache_creation: 1.2,
},
"glm-5": {
input: 0.38,
output: 1.98,
cached: 0.19,
reasoning: 2.97,
cache_creation: 0.38,
input: 1.0,
output: 3.2,
cached: 0.2,
reasoning: 4.8,
cache_creation: 1.0,
},
"glm-5-turbo": {
input: 1.2,
output: 4.0,
cached: 0.6,
reasoning: 6.0,
cached: 0.24,
reasoning: 4.0,
cache_creation: 1.2,
},
"glm-4.7-flash": {
input: 0,
output: 0,
cached: 0,
reasoning: 0,
cache_creation: 0,
},
"glm-4.7": {
input: 0.38,
output: 1.98,
cached: 0.19,
reasoning: 2.97,
cache_creation: 0.38,
input: 0.6,
output: 2.2,
cached: 0.11,
reasoning: 2.2,
cache_creation: 0.6,
},
"glm-4.6": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
input: 0.6,
output: 2.2,
cached: 0.11,
reasoning: 2.2,
cache_creation: 0.6,
},
"glm-4.6v": {
input: 0.75,
output: 3.0,
cached: 0.375,
reasoning: 4.5,
cache_creation: 0.75,
input: 0.3,
output: 0.9,
cached: 0.05,
reasoning: 0.9,
cache_creation: 0.3,
},
"glm-4.5v": {
input: 0.6,
output: 1.8,
cached: 0.11,
reasoning: 1.8,
cache_creation: 0.6,
},
"glm-4.5": {
input: 0.6,
output: 2.2,
cached: 0.11,
reasoning: 2.2,
cache_creation: 0.6,
},
"glm-4.5-air": {
input: 0.2,
output: 1.1,
cached: 0.03,
reasoning: 1.1,
cache_creation: 0.2,
},
},

View file

@ -439,7 +439,7 @@ export const APIKEY_PROVIDERS = {
zai: {
id: "zai",
alias: "zai",
name: "Z.AI (GLM-5)",
name: "Z.AI",
icon: "psychology",
color: "#2563EB",
textIcon: "ZA",

View file

@ -17,8 +17,8 @@ test("T12: pricing table includes MiniMax, GLM, Kimi and gpt-5.4 mini entries",
assert.ok(pricing.glm["glm-4.7"], "missing glm/glm-4.7");
assert.ok(pricing.glm["glm-5"], "missing glm/glm-5");
assert.equal(pricing.glm["glm-4.7"].input, 0.38);
assert.equal(pricing.glm["glm-4.7"].output, 1.98);
assert.equal(pricing.glm["glm-4.7"].input, 0.6);
assert.equal(pricing.glm["glm-4.7"].output, 2.2);
assert.ok(pricing.kimi["kimi-k2.5"], "missing kimi/kimi-k2.5");
assert.ok(pricing.kimi["kimi-k2.5-thinking"], "missing kimi/kimi-k2.5-thinking");