Skip to content

Commit ad8b6c7

Browse files
committed
refactor(agents): default model to gemini-3-flash-preview
Bump LlmAgent.DEFAULT_MODEL from gemini-2.5-flash to gemini-3-flash-preview ahead of the 2026-10-16 earliest-shutdown date for gemini-2.5-flash; see https://ai.google.dev/gemini-api/docs/deprecations. Also updates the docstring/example references in llm_agent_config.py and mcp_toolset.py so the documented default tracks the actual default. DEFAULT_LIVE_MODEL is unchanged — live mode has its own model family (gemini-live-*) and is not affected by the gemini-2.5-flash deprecation. Change-Id: Icfbf1d60e75a4015847b56b24c9da62e52512073
1 parent 1cc298e commit ad8b6c7

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/google/adk/agents/llm_agent.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async def _convert_tool_union_to_tools(
193193
class LlmAgent(BaseAgent):
194194
"""LLM-based Agent."""
195195

196-
DEFAULT_MODEL: ClassVar[str] = 'gemini-2.5-flash'
196+
DEFAULT_MODEL: ClassVar[str] = 'gemini-3-flash-preview'
197197
"""System default model used when no model is set on an agent."""
198198

199199
DEFAULT_LIVE_MODEL: ClassVar[str] = 'gemini-live-2.5-flash-native-audio'
@@ -210,7 +210,7 @@ class LlmAgent(BaseAgent):
210210
211211
When not set, the agent will inherit the model from its ancestor. If no
212212
ancestor provides a model, the agent uses the default model configured via
213-
LlmAgent.set_default_model. The built-in default is gemini-2.5-flash.
213+
LlmAgent.set_default_model. The built-in default is gemini-3-flash-preview.
214214
"""
215215

216216
instruction: Union[str, InstructionProvider] = ''

‎src/google/adk/agents/llm_agent_config.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ class LlmAgentConfig(BaseAgentConfig):
5555
default=None,
5656
description=(
5757
'Optional. LlmAgent.model. Provide a model name string (e.g.'
58-
' "gemini-2.5-flash"). If not set, the model will be inherited from'
59-
' the ancestor or fall back to the system default (gemini-2.5-flash'
60-
' unless overridden via LlmAgent.set_default_model). To construct a'
61-
' model instance from code, use model_code.'
58+
' "gemini-3-flash-preview"). If not set, the model will be inherited'
59+
' from the ancestor or fall back to the system default'
60+
' (gemini-3-flash-preview unless overridden via'
61+
' LlmAgent.set_default_model). To construct a model instance from'
62+
' code, use model_code.'
6263
),
6364
)
6465

‎src/google/adk/tools/mcp_tool/mcp_toolset.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ class McpToolset(BaseToolset):
8383
8484
# Use in an agent
8585
agent = LlmAgent(
86-
model='gemini-2.5-flash',
8786
name='enterprise_assistant',
8887
instruction='Help user accessing their file systems',
8988
tools=[toolset],

0 commit comments

Comments
 (0)