From 894bec794efd5f6284cbe596adce946b08c6da8a Mon Sep 17 00:00:00 2001 From: Hangfei Lin Date: Wed, 10 Sep 2025 15:22:13 -0700 Subject: [PATCH] chore: Update default and example Gemini models to new versions Changes references from `gemini-1.5-flash` and `gemini-1.5-pro` to `gemini-2.5-flash` and `gemini-2.5-pro` in docstrings, default values, sample agents, and tests. PiperOrigin-RevId: 805536434 --- contributing/samples/bigtable/agent.py | 2 +- src/google/adk/models/base_llm.py | 4 ++-- src/google/adk/models/google_llm.py | 2 +- src/google/adk/models/lite_llm.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contributing/samples/bigtable/agent.py b/contributing/samples/bigtable/agent.py index 25e90d8d..37cf8025 100644 --- a/contributing/samples/bigtable/agent.py +++ b/contributing/samples/bigtable/agent.py @@ -62,7 +62,7 @@ bigtable_toolset = BigtableToolset( # The variable name `root_agent` determines what your root agent is for the # debug CLI root_agent = LlmAgent( - model="gemini-1.5-flash", + model="gemini-2.5-flash", name="bigtable_agent", description=( "Agent to answer questions about Bigtable database tables and" diff --git a/src/google/adk/models/base_llm.py b/src/google/adk/models/base_llm.py index 159ae221..b2ae3c47 100644 --- a/src/google/adk/models/base_llm.py +++ b/src/google/adk/models/base_llm.py @@ -32,7 +32,7 @@ class BaseLlm(BaseModel): """The BaseLLM class. Attributes: - model: The name of the LLM, e.g. gemini-1.5-flash or gemini-1.5-flash-001. + model: The name of the LLM, e.g. gemini-2.5-flash or gemini-2.5-pro. """ model_config = ConfigDict( @@ -42,7 +42,7 @@ class BaseLlm(BaseModel): """The pydantic model config.""" model: str - """The name of the LLM, e.g. gemini-1.5-flash or gemini-1.5-flash-001.""" + """The name of the LLM, e.g. gemini-2.5-flash or gemini-2.5-pro.""" @classmethod def supported_models(cls) -> list[str]: diff --git a/src/google/adk/models/google_llm.py b/src/google/adk/models/google_llm.py index d6346deb..1bcd66dd 100644 --- a/src/google/adk/models/google_llm.py +++ b/src/google/adk/models/google_llm.py @@ -58,7 +58,7 @@ class Gemini(BaseLlm): model: The name of the Gemini model. """ - model: str = 'gemini-1.5-flash' + model: str = 'gemini-2.5-flash' retry_options: Optional[types.HttpRetryOptions] = None """Allow Gemini to retry failed responses. diff --git a/src/google/adk/models/lite_llm.py b/src/google/adk/models/lite_llm.py index f25f0cdb..4c6be95d 100644 --- a/src/google/adk/models/lite_llm.py +++ b/src/google/adk/models/lite_llm.py @@ -683,7 +683,7 @@ def _is_litellm_gemini_model(model_string: str) -> bool: Args: model_string: A LiteLLM model string (e.g., "gemini/gemini-2.5-pro" or - "vertex_ai/gemini-1.5-flash") + "vertex_ai/gemini-2.5-flash") Returns: True if it's a Gemini model accessed via LiteLLM, False otherwise