From 9c8a08a686741688d7e8d5807afd8dc803278a04 Mon Sep 17 00:00:00 2001 From: mawkone Date: Sat, 7 Mar 2026 12:49:25 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20revert=20Tier=20B/C=20to=20glm-5-maas=20?= =?UTF-8?q?=E2=80=94=20claude=20not=20enabled=20in=20GCP=20project?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- src/llm.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/llm.ts b/src/llm.ts index 84408f0..6290dc2 100644 --- a/src/llm.ts +++ b/src/llm.ts @@ -6,13 +6,15 @@ import { v4 as uuidv4 } from 'uuid'; // Unified LLM client — OpenAI-compatible message format throughout // // Two backends: -// VertexOpenAIClient — for GLM-5, Claude Sonnet, etc. via Vertex global endpoint -// GeminiFlashClient — for Gemini Flash/Pro via @google/genai SDK +// VertexOpenAIClient — for GLM-5 and other Vertex MaaS models (openai-compat endpoint) +// GeminiClient — for Gemini Flash/Pro via @google/genai SDK (API key) // -// Model tier defaults (overridable via env): -// Tier A: gemini-2.5-flash ($0.15/$0.60 per 1M) — routing, summaries, log parsing -// Tier B: zai-org/glm-5-maas ($1.00/$3.20 per 1M) — coding, feature work -// Tier C: zai-org/glm-5-maas ($1.00/$3.20 per 1M) — complex decisions, escalation +// Model tier defaults (overridable via TIER_A/B/C_MODEL env vars): +// Tier A: gemini-2.5-flash — routing, summaries, log parsing (API key, high quota) +// Tier B: zai-org/glm-5-maas — coding, feature work (Vertex MaaS, retry on 429) +// Tier C: zai-org/glm-5-maas — complex decisions, escalation +// +// Claude models are NOT available in this GCP project — do not use anthropic/* IDs. // ============================================================================= // --------------------------------------------------------------------------- @@ -294,8 +296,8 @@ export type ModelTier = 'A' | 'B' | 'C'; const TIER_MODELS: Record = { A: process.env.TIER_A_MODEL ?? 'gemini-2.5-flash', - B: process.env.TIER_B_MODEL ?? 'claude-sonnet-4-6', - C: process.env.TIER_C_MODEL ?? 'claude-sonnet-4-6' + B: process.env.TIER_B_MODEL ?? 'zai-org/glm-5-maas', + C: process.env.TIER_C_MODEL ?? 'zai-org/glm-5-maas' }; export function createLLM(modelOrTier: string | ModelTier, opts?: { temperature?: number }): LLMClient {