fix(ai): hardcode all default LLM references to gemini-3.1-pro-preview across monorepo

This commit is contained in:
2026-05-16 15:00:17 -07:00
parent 814815af82
commit 955aeed6ce
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ import { v4 as uuidv4 } from "uuid";
// AnthropicVertexClient — Claude models via Anthropic Messages API on Vertex (us-east5) // AnthropicVertexClient — Claude models via Anthropic Messages API on Vertex (us-east5)
// //
// Model tier defaults (overridable via TIER_A/B/C_MODEL env vars): // Model tier defaults (overridable via TIER_A/B/C_MODEL env vars):
// Tier A: gemini-2.5-flash — routing, summaries (API key, high quota) // Tier A: gemini-3.1-pro-preview — routing, summaries (API key, high quota)
// Tier B: claude-sonnet-4-6 — coding, feature work (Anthropic Vertex, us-east5) // Tier B: claude-sonnet-4-6 — coding, feature work (Anthropic Vertex, us-east5)
// Tier C: claude-sonnet-4-6 — complex decisions // Tier C: claude-sonnet-4-6 — complex decisions
// ============================================================================= // =============================================================================
@@ -232,7 +232,7 @@ export class GeminiClient implements LLMClient {
modelId: string; modelId: string;
private temperature: number; private temperature: number;
constructor(modelId = "gemini-2.5-flash", opts?: { temperature?: number }) { constructor(modelId = "gemini-3.1-pro-preview", opts?: { temperature?: number }) {
this.modelId = modelId; this.modelId = modelId;
this.temperature = opts?.temperature ?? 0.2; this.temperature = opts?.temperature ?? 0.2;
} }
@@ -515,7 +515,7 @@ export class AnthropicVertexClient implements LLMClient {
export type ModelTier = "A" | "B" | "C"; export type ModelTier = "A" | "B" | "C";
const TIER_MODELS: Record<ModelTier, string> = { const TIER_MODELS: Record<ModelTier, string> = {
A: process.env.TIER_A_MODEL ?? "gemini-2.5-flash", A: process.env.TIER_A_MODEL ?? "gemini-3.1-pro-preview",
B: process.env.TIER_B_MODEL ?? "claude-sonnet-4-6", B: process.env.TIER_B_MODEL ?? "claude-sonnet-4-6",
C: process.env.TIER_C_MODEL ?? "claude-sonnet-4-6", C: process.env.TIER_C_MODEL ?? "claude-sonnet-4-6",
}; };

View File

@@ -1,7 +1,7 @@
import type { LlmClient, StructuredCallArgs } from '@/lib/ai/llm-client'; import type { LlmClient, StructuredCallArgs } from '@/lib/ai/llm-client';
import { zodToJsonSchema } from 'zod-to-json-schema'; import { zodToJsonSchema } from 'zod-to-json-schema';
const DEFAULT_MODEL = process.env.GEMINI_MODEL || 'gemini-2.0-flash-exp'; const DEFAULT_MODEL = process.env.GEMINI_MODEL || 'gemini-3.1-pro-preview';
const GOOGLE_API_KEY = process.env.GOOGLE_API_KEY || ''; const GOOGLE_API_KEY = process.env.GOOGLE_API_KEY || '';
const GEMINI_BASE_URL = 'https://generativelanguage.googleapis.com/v1beta/models'; const GEMINI_BASE_URL = 'https://generativelanguage.googleapis.com/v1beta/models';

View File

@@ -6,14 +6,14 @@
* and auto-persist them via the same `fs_projects.data->plan` path used by * and auto-persist them via the same `fs_projects.data->plan` path used by
* the Plan tab MCP tools. * the Plan tab MCP tools.
* *
* The cheap model is configured via VIBN_CHEAP_MODEL (default: gemini-2.0-flash-001). * The cheap model is configured via VIBN_CHEAP_MODEL (default: gemini-3.1-pro-preview).
*/ */
import { query } from "@/lib/db-postgres"; import { query } from "@/lib/db-postgres";
const GEMINI_API_KEY = process.env.GOOGLE_API_KEY || ""; const GEMINI_API_KEY = process.env.GOOGLE_API_KEY || "";
const CHEAP_MODEL = const CHEAP_MODEL =
process.env.VIBN_CHEAP_MODEL || "gemini-2.0-flash-001"; process.env.VIBN_CHEAP_MODEL || "gemini-3.1-pro-preview";
const GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta"; const GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
interface PlanExtraction { interface PlanExtraction {