-
Notifications
You must be signed in to change notification settings - Fork 785
Description
I am getting persistent Pydantic validation errors when using the google-genai SDK on an Ubuntu 22.04 EC2 instance. The SDK is blocking the request locally before it reaches the API, claiming that standard fields are "extra inputs" or that the prompt must be a string (blocking multimodal lists).
Environment:
Library: google-genai==1.65.0
Python: 3.10.12 (venv)
Model: veo-3.1-generate-preview
Error 1 (Extra Input):
ValidationError: 1 validation error for GenerateVideosConfig image Extra inputs are not permitted [type=extra_forbidden, input_value=File(...), input_type=File]
(Note: Occurs even when using input_file or raw dictionaries)
Error 2 (Type Mismatch):
ValidationError: 1 validation error for _GenerateVideosParameters prompt Input should be a valid string [type=string_type, input_value=[File(...), "Prompt Text"], input_type=list]
Code Snippet:
Python
This standard call fails due to Pydantic strictness
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt="Cinematic video",
config=types.GenerateVideosConfig(input_file=uploaded_file)
)
Request:
Can you clarify the expected Pydantic schema for the GenerateVideosConfig in version 1.65.0, or provide a way to disable strict validation for experimental models like Veo?