diff --git a/google/genai/_gaos/types/interactions/__init__.py b/google/genai/_gaos/types/interactions/__init__.py index 28882c2ea..71bfd6481 100644 --- a/google/genai/_gaos/types/interactions/__init__.py +++ b/google/genai/_gaos/types/interactions/__init__.py @@ -398,6 +398,7 @@ ) from .videodelta import VideoDelta, VideoDeltaMimeType, VideoDeltaTypedDict from .videoresponseformat import ( + Resolution, VideoResponseFormat, VideoResponseFormatAspectRatio, VideoResponseFormatDelivery, @@ -655,6 +656,7 @@ "RagStoreConfigParam", "Ranking", "RankingParam", + "Resolution", "ResponseFormat", "ResponseFormatParam", "ResponseModality", @@ -1150,6 +1152,7 @@ "VideoDelta": ".videodelta", "VideoDeltaMimeType": ".videodelta", "VideoDeltaTypedDict": ".videodelta", + "Resolution": ".videoresponseformat", "VideoResponseFormat": ".videoresponseformat", "VideoResponseFormatAspectRatio": ".videoresponseformat", "VideoResponseFormatDelivery": ".videoresponseformat", diff --git a/google/genai/_gaos/types/interactions/videoconfig.py b/google/genai/_gaos/types/interactions/videoconfig.py index b23f0a988..e20ceedeb 100644 --- a/google/genai/_gaos/types/interactions/videoconfig.py +++ b/google/genai/_gaos/types/interactions/videoconfig.py @@ -29,6 +29,7 @@ "image_to_video", "reference_to_video", "edit", + "extend", ], UnrecognizedStr, ] diff --git a/google/genai/_gaos/types/interactions/videoresponseformat.py b/google/genai/_gaos/types/interactions/videoresponseformat.py index 672c538c7..ecddee400 100644 --- a/google/genai/_gaos/types/interactions/videoresponseformat.py +++ b/google/genai/_gaos/types/interactions/videoresponseformat.py @@ -46,6 +46,18 @@ r"""The delivery mode for the video output.""" +Resolution = Union[ + Literal[ + "360p", + "720p", + "1080p", + "4k", + ], + UnrecognizedStr, +] +r"""The video output resolution. Defaults to 720p.""" + + class VideoResponseFormatParam(TypedDict): r"""Configuration for video output format.""" @@ -59,6 +71,8 @@ class VideoResponseFormatParam(TypedDict): r"""The Cloud Storage URI to store the video output. Required for Vertex if delivery mode is URI. """ + resolution: NotRequired[Resolution] + r"""The video output resolution. Defaults to 720p.""" type: Literal["video"] @@ -79,6 +93,9 @@ class VideoResponseFormat(BaseModel): delivery mode is URI. """ + resolution: Optional[Resolution] = None + r"""The video output resolution. Defaults to 720p.""" + type: Annotated[ Annotated[Literal["video"], AfterValidator(validate_const("video"))], pydantic.Field(alias="type"), @@ -86,7 +103,9 @@ class VideoResponseFormat(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["aspect_ratio", "delivery", "duration", "gcs_uri"]) + optional_fields = set( + ["aspect_ratio", "delivery", "duration", "gcs_uri", "resolution"] + ) serialized = handler(self) m = {}