Skip to content

Commit ed8b31c

Browse files
google-genai-botcopybara-github
authored andcommitted
chore: migrate from gemini-1.* and gemini-2.0* to gemini-2.5-*
`gemini-1.*` and `gemini-2.0*` models are respectively deprecated and scheduled for shutdown on June 1, 2026. `gemini-2.5*` models are their successors. No regressions in unit tests: ``` ========================================================================================== 5583 passed, 2237 warnings in 84.91s (0:01:24) =========================================================================================== ``` PiperOrigin-RevId: 907663315
1 parent 029b87d commit ed8b31c

99 files changed

Lines changed: 415 additions & 427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

contributing/samples/a2a_auth/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
youtube_search_agent = Agent(
3131
name="youtube_search_agent",
32-
model="gemini-2.0-flash", # Replace with the actual model name
32+
model="gemini-2.5-flash", # Replace with the actual model name
3333
instruction="""
3434
Ask customer to provide singer name, and the number of videos to search.
3535
""",
@@ -47,7 +47,7 @@
4747
)
4848

4949
root_agent = Agent(
50-
model="gemini-2.0-flash",
50+
model="gemini-2.5-flash",
5151
name="root_agent",
5252
instruction="""
5353
You are a helpful assistant that can help search youtube videos, look up BigQuery datasets and tables.

contributing/samples/a2a_auth/remote_a2a/bigquery_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
)
4040

4141
root_agent = Agent(
42-
model="gemini-2.0-flash",
42+
model="gemini-2.5-flash",
4343
name="bigquery_agent",
4444
instruction="""
4545
You are a helpful Google BigQuery agent that help to manage users' data on Google BigQuery.

contributing/samples/a2a_basic/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def roll_die(sides: int) -> int:
9494

9595

9696
root_agent = Agent(
97-
model="gemini-2.0-flash",
97+
model="gemini-2.5-flash",
9898
name="root_agent",
9999
instruction="""
100100
You are a helpful assistant that can roll dice and check if numbers are prime.

contributing/samples/a2a_basic/remote_a2a/check_prime_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def check_prime(nums: list[int]) -> str:
4848

4949

5050
root_agent = Agent(
51-
model='gemini-2.0-flash',
51+
model='gemini-2.5-flash',
5252
name='check_prime_agent',
5353
description='check prime agent that can check whether numbers are prime.',
5454
instruction="""

contributing/samples/a2a_human_in_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def reimburse(purpose: str, amount: float) -> str:
3636

3737

3838
root_agent = Agent(
39-
model='gemini-2.0-flash',
39+
model='gemini-2.5-flash',
4040
name='reimbursement_agent',
4141
instruction="""
4242
You are an agent whose job is to handle the reimbursement process for

contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def ask_for_approval(
3939

4040

4141
root_agent = Agent(
42-
model='gemini-2.0-flash',
42+
model='gemini-2.5-flash',
4343
name='reimbursement_agent',
4444
instruction="""
4545
You are an agent whose job is to handle the reimbursement process for

contributing/samples/a2a_root/remote_a2a/hello_world/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def check_prime(nums: list[int]) -> str:
6666

6767

6868
root_agent = Agent(
69-
model='gemini-2.0-flash',
69+
model='gemini-2.5-flash',
7070
name='hello_world_agent',
7171
description=(
7272
'hello world agent that can roll a dice of 8 sides and check prime'

contributing/samples/adk_pr_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def get_github_pr_info_http(pr_number: int) -> str | None:
143143
"""
144144

145145
root_agent = Agent(
146-
model="gemini-2.0-flash",
146+
model="gemini-2.5-flash",
147147
name="github_pr_agent",
148148
description="Generate pull request descriptions for ADK.",
149149
instruction=system_prompt,

contributing/samples/agent_engine_code_execution/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def base_system_instruction():
6666

6767

6868
root_agent = Agent(
69-
model="gemini-2.0-flash-001",
69+
model="gemini-2.5-flash",
7070
name="agent_engine_code_execution_agent",
7171
instruction=base_system_instruction() + """
7272

contributing/samples/application_integration_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
)
3838

3939
root_agent = LlmAgent(
40-
model="gemini-2.0-flash",
40+
model="gemini-2.5-flash",
4141
name="Issue_Management_Agent",
4242
instruction="""
4343
You are an agent that helps manage issues in a Jira instance.

0 commit comments

Comments
 (0)