mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:50:42 +00:00
fix(google): narrow veo api key for uri download
This commit is contained in:
@@ -244,6 +244,7 @@ export function buildGoogleVideoGenerationProvider(): VideoGenerationProvider {
|
||||
if (!auth.apiKey) {
|
||||
throw new Error("Google API key missing");
|
||||
}
|
||||
const apiKey = auth.apiKey;
|
||||
|
||||
const configuredBaseUrl = resolveConfiguredGoogleVideoBaseUrl(req);
|
||||
const durationSeconds = resolveDurationSeconds(req.durationSeconds);
|
||||
@@ -252,7 +253,7 @@ export function buildGoogleVideoGenerationProvider(): VideoGenerationProvider {
|
||||
label: "Google video generation",
|
||||
});
|
||||
const client = createGoogleGenAI({
|
||||
apiKey: auth.apiKey,
|
||||
apiKey,
|
||||
httpOptions: {
|
||||
...(configuredBaseUrl ? { baseUrl: configuredBaseUrl } : {}),
|
||||
timeout: resolveProviderOperationTimeoutMs({
|
||||
@@ -305,7 +306,7 @@ export function buildGoogleVideoGenerationProvider(): VideoGenerationProvider {
|
||||
}
|
||||
const directDownload = await downloadGeneratedVideoFromUri({
|
||||
uri: inline?.uri,
|
||||
apiKey: auth.apiKey,
|
||||
apiKey,
|
||||
configuredBaseUrl,
|
||||
mimeType: inline?.mimeType,
|
||||
index,
|
||||
|
||||
Reference in New Issue
Block a user