Skip to content

fix(py/plugins/google-genai): keep inline Veo video bytes out of raw - #161

Merged
huangjeff5 merged 1 commit into
mainfrom
fix/google-genai-veo-raw-bytes
Nov 30, 2026
Merged

huangjeff5 merged 1 commit into
mainfrom
fix/google-genai-veo-raw-bytes

Conversation

@hilariie

Copy link
Copy Markdown
Contributor

Vertex Veo without output_gcs_uri returns the video inline as video_bytes. _from_veo_operation dumped the SDK response into raw in Python mode, so the bytes stayed as bytes and Operation.model_dump_json() raised invalid utf-8 sequence (seen in the Dev UI). The Gemini API returns a download URI instead and was not affected.

Changes

  • raw is dumped in JSON mode with generated_videos[].video.video_bytes excluded. The video still reaches the caller as a base64 data URL in the media part, so raw no longer carries a second multi-MB copy.
  • Tests for an operation with non-UTF-8 inline bytes: raw has no videoBytes, and the media data URL survives a JSON round trip.

Breaking changes

None.

Ported from genkit-ai/genkit#6784.

@huangjeff5 huangjeff5 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@huangjeff5
huangjeff5 merged commit a2910ea into main Nov 30, 2026
20 checks passed
@huangjeff5
huangjeff5 deleted the fix/google-genai-veo-raw-bytes branch November 30, 2026 19:51
@cabljac
cabljac requested review from ifielker and removed request for ifielker December 1, 2026 09:53
@huangjeff5 huangjeff5 mentioned this pull request Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants