Skip to content

Commit 16fffbd

Browse files
Annhiluccopybara-github
authored andcommitted
feat: Add new Gemini Deep Research agent models
PiperOrigin-RevId: 903258583
1 parent 9d69215 commit 16fffbd

3 files changed

Lines changed: 67 additions & 8 deletions

File tree

google/genai/_interactions/resources/interactions.py

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,14 @@ def create(
210210
self,
211211
*,
212212
api_version: str | None = None,
213-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
213+
agent: Union[
214+
Literal[
215+
"deep-research-pro-preview-12-2025",
216+
"deep-research-preview-04-2026",
217+
"deep-research-max-preview-04-2026",
218+
],
219+
str,
220+
],
214221
input: interaction_create_params.Input,
215222
agent_config: interaction_create_params.AgentConfig | Omit = omit,
216223
background: bool | Omit = omit,
@@ -280,7 +287,14 @@ def create(
280287
self,
281288
*,
282289
api_version: str | None = None,
283-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
290+
agent: Union[
291+
Literal[
292+
"deep-research-pro-preview-12-2025",
293+
"deep-research-preview-04-2026",
294+
"deep-research-max-preview-04-2026",
295+
],
296+
str,
297+
],
284298
input: interaction_create_params.Input,
285299
stream: Literal[True],
286300
agent_config: interaction_create_params.AgentConfig | Omit = omit,
@@ -434,7 +448,15 @@ def create(
434448
system_instruction: str | Omit = omit,
435449
tools: Iterable[ToolParam] | Omit = omit,
436450
webhook_config: WebhookConfigParam | Omit = omit,
437-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]] | Omit = omit,
451+
agent: Union[
452+
Literal[
453+
"deep-research-pro-preview-12-2025",
454+
"deep-research-preview-04-2026",
455+
"deep-research-max-preview-04-2026",
456+
],
457+
str,
458+
]
459+
| Omit = omit,
438460
agent_config: interaction_create_params.AgentConfig | Omit = omit,
439461
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
440462
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -884,7 +906,14 @@ async def create(
884906
self,
885907
*,
886908
api_version: str | None = None,
887-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
909+
agent: Union[
910+
Literal[
911+
"deep-research-pro-preview-12-2025",
912+
"deep-research-preview-04-2026",
913+
"deep-research-max-preview-04-2026",
914+
],
915+
str,
916+
],
888917
input: interaction_create_params.Input,
889918
agent_config: interaction_create_params.AgentConfig | Omit = omit,
890919
background: bool | Omit = omit,
@@ -954,7 +983,14 @@ async def create(
954983
self,
955984
*,
956985
api_version: str | None = None,
957-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
986+
agent: Union[
987+
Literal[
988+
"deep-research-pro-preview-12-2025",
989+
"deep-research-preview-04-2026",
990+
"deep-research-max-preview-04-2026",
991+
],
992+
str,
993+
],
958994
input: interaction_create_params.Input,
959995
stream: Literal[True],
960996
agent_config: interaction_create_params.AgentConfig | Omit = omit,
@@ -1108,7 +1144,15 @@ async def create(
11081144
system_instruction: str | Omit = omit,
11091145
tools: Iterable[ToolParam] | Omit = omit,
11101146
webhook_config: WebhookConfigParam | Omit = omit,
1111-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]] | Omit = omit,
1147+
agent: Union[
1148+
Literal[
1149+
"deep-research-pro-preview-12-2025",
1150+
"deep-research-preview-04-2026",
1151+
"deep-research-max-preview-04-2026",
1152+
],
1153+
str,
1154+
]
1155+
| Omit = omit,
11121156
agent_config: interaction_create_params.AgentConfig | Omit = omit,
11131157
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11141158
# The extra values given here take precedence over values defined on the client or passed to this method.

google/genai/_interactions/types/interaction.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,13 @@ class Interaction(BaseModel):
106106
(YYYY-MM-DDThh:mm:ssZ).
107107
"""
108108

109-
agent: Union[str, Literal["deep-research-pro-preview-12-2025"], None] = None
109+
agent: Union[
110+
Literal[
111+
"deep-research-pro-preview-12-2025", "deep-research-preview-04-2026", "deep-research-max-preview-04-2026"
112+
],
113+
str,
114+
None,
115+
] = None
110116
"""The name of the `Agent` used for generating the interaction."""
111117

112118
agent_config: Optional[AgentConfig] = None

google/genai/_interactions/types/interaction_create_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,16 @@ class BaseCreateModelInteractionParams(TypedDict, total=False):
141141
class BaseCreateAgentInteractionParams(TypedDict, total=False):
142142
api_version: str
143143

144-
agent: Required[Union[str, Literal["deep-research-pro-preview-12-2025"]]]
144+
agent: Required[
145+
Union[
146+
Literal[
147+
"deep-research-pro-preview-12-2025",
148+
"deep-research-preview-04-2026",
149+
"deep-research-max-preview-04-2026",
150+
],
151+
str,
152+
]
153+
]
145154
"""The name of the `Agent` used for generating the interaction."""
146155

147156
input: Required[Input]

0 commit comments

Comments
 (0)