Files
openclaw/extensions/google/google-genai-runtime.ts
Peter Steinberger b4d6aff098 chore(deps): refresh seven-day-cooled providers and native tooling (#130653)
* chore(deps): refresh cooled provider and native tooling

* build: preserve installed SDK package identity

* test: isolate dependency validation fixtures
2026-08-27 00:57:31 -07:00

22 lines
722 B
TypeScript

// Google plugin module implements google genai runtime behavior.
import { GoogleGenAI, type GoogleGenAIOptions } from "@google/genai";
import { resolveGoogleApiClientHeaders } from "./google-api-client-header.js";
export type GoogleGenAIClient = InstanceType<typeof GoogleGenAI>;
export function createGoogleGenAI(options: GoogleGenAIOptions): GoogleGenAIClient {
const httpOptions = options.httpOptions ?? {};
return new GoogleGenAI({
...options,
httpOptions: {
...httpOptions,
headers: {
...httpOptions.headers,
...resolveGoogleApiClientHeaders({
baseUrl: typeof httpOptions.baseUrl === "string" ? httpOptions.baseUrl : undefined,
}),
},
},
});
}