Skip to content

fix(google): serialize Veo image inputs as bytesBase64Encoded#13818

Open
f0rr0 wants to merge 1 commit intovercel:mainfrom
f0rr0:fix/google-video-bytes-base64
Open

fix(google): serialize Veo image inputs as bytesBase64Encoded#13818
f0rr0 wants to merge 1 commit intovercel:mainfrom
f0rr0:fix/google-video-bytes-base64

Conversation

@f0rr0
Copy link
Copy Markdown

@f0rr0 f0rr0 commented Mar 24, 2026

Summary

  • serialize Veo image-to-video inputs as bytesBase64Encoded instead of inlineData
  • serialize referenceImages[].bytesBase64Encoded the same way
  • update the Google video model tests to assert the request body shape

Why

Google Veo image-to-video requests against the Gemini predictLongRunning endpoint fail when the image is sent as inlineData. The current provider emits inlineData for both options.image and referenceImages, which causes first-frame video generation to fail in real usage.

Validation

  • pnpm --filter @ai-sdk/google exec vitest --config vitest.node.config.js --run src/google-generative-ai-video-model.test.ts
  • pnpm --filter @ai-sdk/google type-check
  • validated the same serializer change locally against @ai-sdk/google@3.0.53 through both google.video(...).doGenerate(...) and the full experimental_generateVideo(...) path

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label bug Something isn't working as documented provider/google Issues related to the @ai-sdk/google provider labels Mar 24, 2026
@f0rr0 f0rr0 force-pushed the fix/google-video-bytes-base64 branch from 77ae3d6 to b1a579a Compare March 27, 2026 10:51
@f0rr0 f0rr0 force-pushed the fix/google-video-bytes-base64 branch from b1a579a to 698749f Compare March 31, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label bug Something isn't working as documented provider/google Issues related to the @ai-sdk/google provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant