Skip to content

Commit f2a4a5a

Browse files
authored
fix(google): omit unsupported numberOfVideos in Veo requests (openclaw#64723)
Merged via squash. Prepared head SHA: dadfd33 Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com> Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com> Reviewed-by: @velvet-shark
1 parent 58708e6 commit f2a4a5a

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai
1313
- Control UI/webchat: persist agent-run TTS audio replies into webchat history before finalization so tool-generated audio reaches webchat clients again. (#63514) thanks @bittoby
1414
- macOS/Talk Mode: after granting microphone permission on first enable, continue starting Talk Mode instead of requiring a second toggle. (#62459) Thanks @ggarber.
1515
- OpenAI/Codex OAuth: stop rewriting the upstream authorize URL scopes so new Codex sign-ins do not fail with `invalid_scope` before returning an authorization code. (#64713) Thanks @fuller-stack-dev.
16+
- Google/Veo: stop sending the unsupported `numberOfVideos` request field so Gemini Developer API Veo runs do not fail before OpenClaw can complete the intended Google video generation path. (#64723) thanks @velvet-shark
1617

1718
## 2026.4.10
1819

extensions/google/video-generation-provider.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,21 @@ describe("google video generation provider", () => {
6767
audio: true,
6868
});
6969

70-
expect(generateVideosMock).toHaveBeenCalledWith(
70+
expect(generateVideosMock).toHaveBeenCalledTimes(1);
71+
const [request] = generateVideosMock.mock.calls[0] ?? [];
72+
expect(request).toEqual(
7173
expect.objectContaining({
7274
model: "veo-3.1-fast-generate-preview",
7375
prompt: "A tiny robot watering a windowsill garden",
7476
config: expect.objectContaining({
75-
numberOfVideos: 1,
7677
durationSeconds: 4,
7778
aspectRatio: "16:9",
7879
resolution: "720p",
7980
generateAudio: true,
8081
}),
8182
}),
8283
);
84+
expect(request?.config).not.toHaveProperty("numberOfVideos");
8385
expect(result.videos).toHaveLength(1);
8486
expect(result.videos[0]?.mimeType).toBe("video/mp4");
8587
expect(GoogleGenAIMock).toHaveBeenCalledWith(

extensions/google/video-generation-provider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ export function buildGoogleVideoGenerationProvider(): VideoGenerationProvider {
238238
image: resolveInputImage(req),
239239
video: resolveInputVideo(req),
240240
config: {
241-
numberOfVideos: 1,
242241
...(typeof durationSeconds === "number" ? { durationSeconds } : {}),
243242
...(resolveAspectRatio({ aspectRatio: req.aspectRatio, size: req.size })
244243
? { aspectRatio: resolveAspectRatio({ aspectRatio: req.aspectRatio, size: req.size }) }

0 commit comments

Comments
 (0)