feat: add Gemini 3 (vertex) (#182)

This commit is contained in:
Kevin Lin
2025-12-11 18:44:40 -08:00
committed by GitHub
parent d5b02158d5
commit 113dbcad9d
2 changed files with 27 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ function buildModelSettings(
const isOpenAI = modelHandle.startsWith("openai/");
const isAnthropic = modelHandle.startsWith("anthropic/");
const isGoogleAI = modelHandle.startsWith("google_ai/");
const isGoogleVertex = modelHandle.startsWith("google_vertex/");
const isOpenRouter = modelHandle.startsWith("openrouter/");
if (isOpenAI || isOpenRouter) {
@@ -83,7 +84,25 @@ function buildModelSettings(
return googleSettings;
}
// For unknown providers (e.g., openrouter), return generic settings with parallel_tool_calls
if (isGoogleVertex) {
// Vertex AI uses the same Google provider on the backend; only the handle differs.
const googleVertexSettings: Record<string, unknown> = {
provider_type: "google_ai",
parallel_tool_calls: true,
};
if (updateArgs?.thinking_budget !== undefined) {
(googleVertexSettings as Record<string, unknown>).thinking_config = {
thinking_budget: updateArgs.thinking_budget as number,
};
}
if (typeof updateArgs?.temperature === "number") {
(googleVertexSettings as Record<string, unknown>).temperature =
updateArgs.temperature as number;
}
return googleVertexSettings;
}
// For unknown providers, return generic settings with parallel_tool_calls
return { parallel_tool_calls: true };
}

View File

@@ -326,5 +326,12 @@
"label": "o4-mini",
"description": "OpenAI's latest o-series reasoning model",
"updateArgs": { "context_window": 180000 }
},
{
"id": "gemini-3-vertex",
"handle": "google_vertex/gemini-3-pro-preview",
"label": "Gemini 3 Pro (Vertex AI)",
"description": "Google's smartest Gemini 3 Pro model on Vertex AI",
"updateArgs": { "context_window": 180000, "temperature": 1.0 }
}
]