-
Notifications
You must be signed in to change notification settings - Fork 752
Open
Labels
api: gemini-apistatus:awaiting user responsetype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Bug Report: Critical SDK Failure in google-genai 1.60.0 with Veo 3.1 Reference Images
Date: 2026-01-24
SDK Version: google-genai 1.60.0
OS: Windows
Summary
The google-genai Python SDK (Interactions API) is completely unable to support the "Ingredients to Video" (Reference Images) workflow for Veo 3.1, despite documentation claiming support. This creates a critical deadlock for developers attempting to use Character Consistency features.
The Deadlock
- API Requirement: The Veo 3.1 model (
veo-3.1-generate-preview) rejects raw image bytes and requires a remote URI forreference_images.- Error:
INVALID_ARGUMENT: Image field doesn't have a URI
- Error:
- SDK Limitation: The
types.VideoGenerationReferenceImageclass expects animagefield specifically typed astypes.Image. - Type Failure: The
types.Imageclass in version 1.60.0 DOES NOT accepturi,file_uri, orgcs_urias valid constructor arguments. It primarily supportsimage_bytes. - Missing Class: Documentation references a
types.ReferenceImageclass (withfile_urisupport) which DOES NOT EXIST in the installed1.60.0library.
Steps to Reproduce
from google import genai
from google.genai import types
client = genai.Client(api_key="...")
# 1. Upload File (Works)
file_ref = client.files.upload(file="robot.png")
# 2. Attempt to create Reference (Fails)
# METHOD A: Using types.Image (Fails Validation)
# ref = types.VideoGenerationReferenceImage(
# image=types.Image(gcs_uri=file_ref.uri), # TypeError: Extra inputs not permitted
# reference_type="asset"
# )
# METHOD B: Using types.ReferenceImage (Fails Import)
# ref = types.ReferenceImage(...) # AttributeError: module has no attribute 'ReferenceImage'
# METHOD C: Using Raw Dict (Fails API Validation)
# ref = {"file_uri": file_ref.uri, "reference_type": "ASSET"}
# Error: INVALID_ARGUMENT (API rejects dictionary structure mismatch)Impact
Developers cannot programmatically use the core "Character Consistency" feature of Veo 3.1 via the Python SDK. We are forced to disable the feature entirely.
Expected Behavior
The SDK should provide a clear, typed class (e.g., types.ReferenceImage or an updated types.Image) that accepts the uri returned by client.files.upload().
Report generated by Antigravity Agent (Dexter/Mogura).
Metadata
Metadata
Assignees
Labels
api: gemini-apistatus:awaiting user responsetype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.