Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(ai-gateway): remove broken glm-5.1 and minimax-m2.7 models

Louis Beaumont90339ecc2604
diff --git a/packages/ai-gateway/src/handlers/chat.ts b/packages/ai-gateway/src/handlers/chat.ts
index 9a294cac0..13809d8b4 100644
--- a/packages/ai-gateway/src/handlers/chat.ts
+++ b/packages/ai-gateway/src/handlers/chat.ts
@@ -6,10 +6,15 @@ import { createProvider } from '../providers';
import { addCorsHeaders } from '../utils/cors';
import { logModelOutcome } from '../services/model-health';
-// Auto model waterfall — ordered by quality/cost ratio (all free or near-free)
+// Auto model waterfall — ordered by quality/cost ratio (all free or near-free).
+//
+// `glm-5.1` and `minimax-m2.7` (vertexIds zai-org/glm-5.1-maas and
+// minimax/minimax-m2-maas) removed 2026-04-17 after Vertex started
+// returning 404 for both — the publisher model paths we configured on
+// 04-14 aren't valid. Users on `auto` were paying 2 × failed-request
+// latency per chat message. Re-add once IDs are re-verified against
+// Vertex Model Garden.
const AUTO_WATERFALL = [
- 'glm-5.1',
- 'minimax-m2.7',
'kimi-k2.5',
'deepseek-v3.2',
'gemini-3-flash',
diff --git a/packages/ai-gateway/src/handlers/models.ts b/packages/ai-gateway/src/handlers/models.ts
index cb8249252..ea955684c 100644
--- a/packages/ai-gateway/src/handlers/models.ts
+++ b/packages/ai-gateway/src/handlers/models.ts
@@ -125,36 +125,8 @@ const CURATED_MODELS: ModelEntry[] = [
cost_tier: 'free',
recommended_for: ['pipes', 'chat'],
},
- {
- id: 'glm-5.1',
- object: 'model',
- owned_by: 'vertex-maas',
- name: 'GLM-5.1',
- description: '#1 open-source coding model, 754B MoE',
- tags: ['free', 'coding', 'reasoning'],
- free: true,
- context_window: 128000,
- best_for: ['coding', 'reasoning', 'tool use'],
- speed: 'medium',
- intelligence: 'highest',
- cost_tier: 'free',
- recommended_for: ['pipes', 'chat', 'coding'],
- },
- {
- id: 'minimax-m2.7',
- object: 'model',
- owned_by: 'vertex-maas',
- name: 'MiniMax M2.7',
- description: 'near-Opus quality, 230B MoE',
- tags: ['free', 'reasoning'],
- free: true,
- context_window: 128000,
- best_for: ['complex reasoning', 'analysis', 'coding'],
- speed: 'medium',
- intelligence: 'highest',
- cost_tier: 'free',
- recommended_for: ['pipes', 'chat', 'coding', 'analysis'],
- },
+ // glm-5.1 and minimax-m2.7 hidden 2026-04-17 — Vertex returns 404 for
+ // their publisher/model IDs. Re-add once we verify the real paths.
{
id: 'deepseek-r1',
object: 'model',
diff --git a/packages/ai-gateway/src/providers/vertex-maas.ts b/packages/ai-gateway/src/providers/vertex-maas.ts
index 1b89215b4..60d99677c 100644
--- a/packages/ai-gateway/src/providers/vertex-maas.ts
+++ b/packages/ai-gateway/src/providers/vertex-maas.ts
@@ -44,8 +44,9 @@ async function fetchWithRetry(url: string, init: RequestInit, label: string): Pr
const VERTEX_MAAS_MODELS: Record<string, { vertexId: string; region: string }> = {
'glm-4.7': { vertexId: 'zai-org/glm-4.7-maas', region: 'global' },
'glm-5': { vertexId: 'zai-org/glm-5-maas', region: 'global' },
- 'glm-5.1': { vertexId: 'zai-org/glm-5.1-maas', region: 'global' },
- 'minimax-m2.7': { vertexId: 'minimax/minimax-m2-maas', region: 'global' },
+ // 'glm-5.1' and 'minimax-m2.7' removed 2026-04-17 — Vertex returns
+ // 404 "Publisher Model not found" for their configured IDs. Re-add
+ // once we verify the real publisher/model path via Model Garden.
'kimi-k2.5': { vertexId: 'moonshotai/kimi-k2-thinking-maas', region: 'global' },
'llama-4-maverick': { vertexId: 'meta/llama-4-maverick-17b-128e-instruct-maas', region: 'us-east5' },
'llama-4-scout': { vertexId: 'meta/llama-4-scout-17b-16e-instruct-maas', region: 'us-east5' },
@@ -209,8 +210,7 @@ export class VertexMaasProvider implements AIProvider {
return [
{ id: 'glm-4.7', name: 'GLM-4.7 (best coding, 200K ctx)', provider: 'vertex-maas' },
{ id: 'glm-5', name: 'GLM-5 (reasoning, 745B)', provider: 'vertex-maas' },
- { id: 'glm-5.1', name: 'GLM-5.1 (#1 open-source coding, 754B MoE)', provider: 'vertex-maas' },
- { id: 'minimax-m2.7', name: 'MiniMax M2.7 (near-Opus quality, 230B MoE)', provider: 'vertex-maas' },
+ // glm-5.1 and minimax-m2.7 hidden 2026-04-17 — Vertex 404 on their IDs.
{ id: 'kimi-k2.5', name: 'Kimi K2.5 (strong all-rounder)', provider: 'vertex-maas' },
{ id: 'llama-4-maverick', name: 'Llama 4 Maverick (vision, 400B MoE)', provider: 'vertex-maas' },
{ id: 'llama-4-scout', name: 'Llama 4 Scout (vision, 109B MoE)', provider: 'vertex-maas' },