Skip to content

Critical Failure: Veo 3.1 Reference Images support missing in SDK 1.60.0 (VideoGenerationReferenceImage typing deadlock) #1988

@gusthemole

Description

@gusthemole

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

  1. API Requirement: The Veo 3.1 model (veo-3.1-generate-preview) rejects raw image bytes and requires a remote URI for reference_images.
    • Error: INVALID_ARGUMENT: Image field doesn't have a URI
  2. SDK Limitation: The types.VideoGenerationReferenceImage class expects an image field specifically typed as types.Image.
  3. Type Failure: The types.Image class in version 1.60.0 DOES NOT accept uri, file_uri, or gcs_uri as valid constructor arguments. It primarily supports image_bytes.
  4. Missing Class: Documentation references a types.ReferenceImage class (with file_uri support) which DOES NOT EXIST in the installed 1.60.0 library.

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions