mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 08:42:14 +00:00
36 lines
980 B
TypeScript
36 lines
980 B
TypeScript
import type {
|
|
ModelDefinitionConfig,
|
|
ModelProviderConfig,
|
|
} from "openclaw/plugin-sdk/provider-model-shared";
|
|
|
|
const GOOGLE_GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
|
|
const GOOGLE_GEMINI_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } as const;
|
|
const GOOGLE_GEMINI_TEXT_MODELS: ModelDefinitionConfig[] = [
|
|
{
|
|
id: "gemini-3.1-pro-preview",
|
|
name: "Gemini 3.1 Pro Preview",
|
|
reasoning: true,
|
|
input: ["text", "image"],
|
|
cost: GOOGLE_GEMINI_COST,
|
|
contextWindow: 1_048_576,
|
|
maxTokens: 65_536,
|
|
},
|
|
{
|
|
id: "gemini-3-flash-preview",
|
|
name: "Gemini 3 Flash Preview",
|
|
reasoning: true,
|
|
input: ["text", "image"],
|
|
cost: GOOGLE_GEMINI_COST,
|
|
contextWindow: 1_048_576,
|
|
maxTokens: 65_536,
|
|
},
|
|
];
|
|
|
|
export function buildGoogleStaticCatalogProvider(): ModelProviderConfig {
|
|
return {
|
|
baseUrl: GOOGLE_GEMINI_BASE_URL,
|
|
api: "google-generative-ai",
|
|
models: GOOGLE_GEMINI_TEXT_MODELS,
|
|
};
|
|
}
|