From b9f1816634210f52ae984a729128999d7c0a1160 Mon Sep 17 00:00:00 2001 From: Alex Castillo Date: Wed, 21 Oct 2026 13:23:24 -0400 Subject: [PATCH] docs: use gemini-3.8-flash in the Google GenAI and ADK examples gemini-2.0-flash is shut down on the Gemini API, so the examples and docstrings that name it (and gemini-2.0-flash-001 / -exp) fail when run. Use gemini-3.8-flash, the current stable Flash model. Tests and cassettes are not touched. Co-Authored-By: Claude Sonnet 5.5 --- examples/adk/README.md | 2 +- examples/adk/example.py | 2 +- examples/google_genai/README.md | 2 +- examples/google_genai/example.py | 2 +- integrations/adk-py/README.md | 4 ++-- integrations/adk-py/examples/manual.py | 2 +- integrations/adk-py/examples/mcp_tracing/agent.py | 2 +- integrations/adk-py/examples/multi_tool_agent/agent.py | 2 +- py/src/braintrust/auto.py | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/adk/README.md b/examples/adk/README.md index 8c0307311..da4b41162 100644 --- a/examples/adk/README.md +++ b/examples/adk/README.md @@ -1,6 +1,6 @@ # Google ADK + Braintrust -Calls `braintrust.auto_instrument()` so Google ADK is patched automatically, then runs a weather agent against `gemini-2.0-flash` with one tool. The trace shows the runner span, the agent span, the LLM span, and the tool call. +Calls `braintrust.auto_instrument()` so Google ADK is patched automatically, then runs a weather agent against `gemini-3.8-flash` with one tool. The trace shows the runner span, the agent span, the LLM span, and the tool call. ## Run diff --git a/examples/adk/example.py b/examples/adk/example.py index 2a9e00af2..0bb59f46e 100644 --- a/examples/adk/example.py +++ b/examples/adk/example.py @@ -26,7 +26,7 @@ def get_weather(location: str): async def main(): agent = Agent( name="weather_agent", - model="gemini-2.0-flash", + model="gemini-3.8-flash", instruction="You are a helpful weather assistant.", tools=[get_weather], ) diff --git a/examples/google_genai/README.md b/examples/google_genai/README.md index 190605ea1..c00b201dc 100644 --- a/examples/google_genai/README.md +++ b/examples/google_genai/README.md @@ -1,6 +1,6 @@ # Google GenAI + Braintrust -Calls `braintrust.auto_instrument()` to patch the Google GenAI client, then runs a single `generate_content` call against `gemini-2.0-flash-001`. The trace captures the LLM span with token metrics. +Calls `braintrust.auto_instrument()` to patch the Google GenAI client, then runs a single `generate_content` call against `gemini-3.8-flash`. The trace captures the LLM span with token metrics. ## Run diff --git a/examples/google_genai/example.py b/examples/google_genai/example.py index 173588111..5fe0ba054 100644 --- a/examples/google_genai/example.py +++ b/examples/google_genai/example.py @@ -13,7 +13,7 @@ client = genai.Client() response = client.models.generate_content( - model="gemini-2.0-flash-001", + model="gemini-3.8-flash", contents="What is the capital of Australia?", ) print(response.text) diff --git a/integrations/adk-py/README.md b/integrations/adk-py/README.md index 4ada81773..00eb82a36 100644 --- a/integrations/adk-py/README.md +++ b/integrations/adk-py/README.md @@ -64,7 +64,7 @@ setup_adk( # Create your ADK agent as normal agent = LlmAgent( tools=[get_weather, get_current_time], - model="gemini-2.0-flash-exp", + model="gemini-3.8-flash", system_instruction="You are a helpful assistant that can check weather and time." ) @@ -108,7 +108,7 @@ def search_flights(origin: str, destination: str, date: str) -> dict: # Create agent with multiple tools agent = LlmAgent( tools=[get_weather, search_flights], - model="gemini-2.0-flash-exp", + model="gemini-3.8-flash", system_instruction="You are a travel assistant." ) diff --git a/integrations/adk-py/examples/manual.py b/integrations/adk-py/examples/manual.py index dece73303..f33b45e4c 100644 --- a/integrations/adk-py/examples/manual.py +++ b/integrations/adk-py/examples/manual.py @@ -55,7 +55,7 @@ def get_user_info(name: str): agent = CustomAgent( name="hello_agent", - model="gemini-2.0-flash", + model="gemini-3.8-flash", instruction="Use the appropriate tool based on the user's request. For greetings, use say_hello. For user info requests, use get_user_info.", tools=[say_hello, get_user_info], ) diff --git a/integrations/adk-py/examples/mcp_tracing/agent.py b/integrations/adk-py/examples/mcp_tracing/agent.py index eb687f7f1..43a630a7c 100644 --- a/integrations/adk-py/examples/mcp_tracing/agent.py +++ b/integrations/adk-py/examples/mcp_tracing/agent.py @@ -36,7 +36,7 @@ async def main(): # Create agent with MCP filesystem tools agent = LlmAgent( name="filesystem_assistant", - model="gemini-2.0-flash-exp", + model="gemini-3.8-flash", instruction="You are a helpful assistant that can read and list files. Be concise in your responses.", tools=[ MCPToolset( diff --git a/integrations/adk-py/examples/multi_tool_agent/agent.py b/integrations/adk-py/examples/multi_tool_agent/agent.py index d8e666c20..6737e47d4 100644 --- a/integrations/adk-py/examples/multi_tool_agent/agent.py +++ b/integrations/adk-py/examples/multi_tool_agent/agent.py @@ -66,7 +66,7 @@ def get_current_time(city: str) -> Dict[str, str]: root_agent = LlmAgent( name="weather_time_agent", - model="gemini-2.0-flash", + model="gemini-3.8-flash", description=("Agent to answer questions about the time and weather in a city."), instruction=("You are a helpful agent who can answer user questions about the time and weather in a city."), tools=[get_weather, get_current_time], diff --git a/py/src/braintrust/auto.py b/py/src/braintrust/auto.py index c29a41408..e7f39ed23 100644 --- a/py/src/braintrust/auto.py +++ b/py/src/braintrust/auto.py @@ -140,7 +140,7 @@ def auto_instrument( # Google ADK from google.adk import Agent from google.adk.runners import Runner - agent = Agent(name="my_agent", model="gemini-2.0-flash") + agent = Agent(name="my_agent", model="gemini-3.8-flash") runner = Runner(agent=agent, app_name="my_app") # Pydantic AI @@ -151,7 +151,7 @@ def auto_instrument( # Google GenAI from google.genai import Client client = Client() - client.models.generate_content(model="gemini-2.0-flash", contents="Hello!") + client.models.generate_content(model="gemini-3.8-flash", contents="Hello!") ``` """ if span_customizers is not None: