@@ -4,8 +4,36 @@ import type {
|
4 | 4 | } from "openclaw/plugin-sdk/provider-model-shared"; |
5 | 5 | |
6 | 6 | const GOOGLE_GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta"; |
| 7 | +const GOOGLE_VERTEX_BASE_URL = "https://{location}-aiplatform.googleapis.com"; |
7 | 8 | const GOOGLE_GEMINI_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } as const; |
8 | 9 | const GOOGLE_GEMINI_TEXT_MODELS: ModelDefinitionConfig[] = [ |
| 10 | +{ |
| 11 | +id: "gemini-2.5-pro", |
| 12 | +name: "Gemini 2.5 Pro", |
| 13 | +reasoning: true, |
| 14 | +input: ["text", "image"], |
| 15 | +cost: GOOGLE_GEMINI_COST, |
| 16 | +contextWindow: 1_048_576, |
| 17 | +maxTokens: 65_536, |
| 18 | +}, |
| 19 | +{ |
| 20 | +id: "gemini-2.5-flash", |
| 21 | +name: "Gemini 2.5 Flash", |
| 22 | +reasoning: true, |
| 23 | +input: ["text", "image"], |
| 24 | +cost: GOOGLE_GEMINI_COST, |
| 25 | +contextWindow: 1_048_576, |
| 26 | +maxTokens: 65_536, |
| 27 | +}, |
| 28 | +{ |
| 29 | +id: "gemini-2.5-flash-lite", |
| 30 | +name: "Gemini 2.5 Flash-Lite", |
| 31 | +reasoning: true, |
| 32 | +input: ["text", "image"], |
| 33 | +cost: GOOGLE_GEMINI_COST, |
| 34 | +contextWindow: 1_048_576, |
| 35 | +maxTokens: 65_536, |
| 36 | +}, |
9 | 37 | { |
10 | 38 | id: "gemini-3.1-pro-preview", |
11 | 39 | name: "Gemini 3.1 Pro Preview", |
@@ -33,3 +61,11 @@ export function buildGoogleStaticCatalogProvider(): ModelProviderConfig {
|
33 | 61 | models: GOOGLE_GEMINI_TEXT_MODELS, |
34 | 62 | }; |
35 | 63 | } |
| 64 | + |
| 65 | +export function buildGoogleVertexStaticCatalogProvider(): ModelProviderConfig { |
| 66 | +return { |
| 67 | +baseUrl: GOOGLE_VERTEX_BASE_URL, |
| 68 | +api: "google-vertex", |
| 69 | +models: GOOGLE_GEMINI_TEXT_MODELS, |
| 70 | +}; |
| 71 | +} |