Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

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

Chris Staleyabcf836a0c3b
diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.ts
index 0bcf0592ea..69b018b2d2 100644
--- a/open-sse/config/providerRegistry.ts
+++ b/open-sse/config/providerRegistry.ts
@@ -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" },
],
},
diff --git a/open-sse/services/autoCombo/taskFitness.ts b/open-sse/services/autoCombo/taskFitness.ts
index e29b10ab17..123d479b1c 100644
--- a/open-sse/services/autoCombo/taskFitness.ts
+++ b/open-sse/services/autoCombo/taskFitness.ts
@@ -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,
},
diff --git a/src/shared/constants/pricing.ts b/src/shared/constants/pricing.ts
index 62fdd82c82..789ae0a06a 100644
--- a/src/shared/constants/pricing.ts
+++ b/src/shared/constants/pricing.ts
@@ -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,
},
},
diff --git a/src/shared/constants/providers.ts b/src/shared/constants/providers.ts
index 46cd919576..f9a83bb312 100644
--- a/src/shared/constants/providers.ts
+++ b/src/shared/constants/providers.ts
@@ -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",
diff --git a/tests/unit/t12-pricing-updates.test.mjs b/tests/unit/t12-pricing-updates.test.mjs
index e9e511d498..b53a9984ef 100644
--- a/tests/unit/t12-pricing-updates.test.mjs
+++ b/tests/unit/t12-pricing-updates.test.mjs
@@ -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");