From f672e8af0acfaa66cb95a3b8c85329d88148b121 Mon Sep 17 00:00:00 2001 From: Kaituo Huang Date: Thu, 11 Dec 2025 09:08:22 -0800 Subject: [PATCH] docs: Make environment a required field for ComputerUse on interactions api PiperOrigin-RevId: 843248186 --- google/genai/_interactions/types/tool.py | 6 +++--- google/genai/_interactions/types/tool_param.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/google/genai/_interactions/types/tool.py b/google/genai/_interactions/types/tool.py index 373d49782..42e354c50 100644 --- a/google/genai/_interactions/types/tool.py +++ b/google/genai/_interactions/types/tool.py @@ -49,11 +49,11 @@ class URLContext(BaseModel): class ComputerUse(BaseModel): """A tool that can be used by the model to interact with the computer.""" - type: Literal["computer_use"] - - environment: Optional[Literal["browser"]] = None + environment: Literal["browser"] """The environment being operated.""" + type: Literal["computer_use"] + excluded_predefined_functions: Optional[List[str]] = FieldInfo(alias="excludedPredefinedFunctions", default=None) """The list of predefined functions that are excluded from the model call.""" diff --git a/google/genai/_interactions/types/tool_param.py b/google/genai/_interactions/types/tool_param.py index 08b6bb93d..b43ff6123 100644 --- a/google/genai/_interactions/types/tool_param.py +++ b/google/genai/_interactions/types/tool_param.py @@ -49,11 +49,11 @@ class URLContext(TypedDict, total=False): class ComputerUse(TypedDict, total=False): """A tool that can be used by the model to interact with the computer.""" - type: Required[Literal["computer_use"]] - - environment: Literal["browser"] + environment: Required[Literal["browser"]] """The environment being operated.""" + type: Required[Literal["computer_use"]] + excluded_predefined_functions: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludedPredefinedFunctions")] """The list of predefined functions that are excluded from the model call."""