Skip to content

Commit c461ad4

Browse files
tylerslatonclaude
andcommitted
chore(showcase/google-adk): bump Gemini default to 3.1 Flash-Lite
Bumps the default Gemini model across the Google ADK showcase from gemini-2.5-flash to gemini-3.1-flash-lite — the closest GA model in the Gemini 3.x line (2.5 family is slated for June 2026 deprecation). Touches agent factories (DEFAULT_MODEL, _DEFAULT_A2UI_MODEL, _SUB_MODEL), the A2UI default-model test fixture, QA docs, the manifest description for the reasoning demo, and prose references in shared_chat docstring + entrypoint comment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 720cbee commit c461ad4

14 files changed

Lines changed: 19 additions & 19 deletions

showcase/integrations/google-adk/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trap cleanup EXIT
1313
export PYTHONUNBUFFERED=1
1414

1515
# Disable Google ADK's progressive SSE streaming feature. With it enabled,
16-
# Gemini 2.5-flash occasionally returns a stream whose final event is flagged
16+
# Gemini 3.1 Flash-Lite occasionally returns a stream whose final event is flagged
1717
# `partial`, which the ADK flow aborts with a "The last event is partial"
1818
# warning — the backend then emits no TOOL_CALL_* or TEXT_MESSAGE_* events,
1919
# so the tool-rendering UI is stranded and L4 smoke tests intermittently fail.

showcase/integrations/google-adk/manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ demos:
322322
- src/app/api/copilotkit/route.ts
323323
- id: reasoning-custom
324324
name: "Reasoning: Custom"
325-
description: Visible reasoning/thinking chain alongside the final answer (Gemini 2.5 thinking mode)
325+
description: Visible reasoning/thinking chain alongside the final answer (Gemini 3.1 thinking mode)
326326
tags:
327327
- chat-ui
328328
route: /demos/reasoning-custom

showcase/integrations/google-adk/qa/headless-complete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Prerequisites
44

55
- Demo is deployed and accessible at `/demos/headless-complete` on the dashboard host
6-
- Agent backend is healthy (`/api/health`); `GOOGLE_API_KEY` is set on Railway; the ADK backend mounts the shared `_simple_chat` LlmAgent (Gemini 2.5 Flash) at `/headless_complete` — the demo relies on aimock fixtures to supply tool calls (`get_weather`, `get_stock_price`, `get_revenue_chart`) since the ADK simple agent has no real backend tools
6+
- Agent backend is healthy (`/api/health`); `GOOGLE_API_KEY` is set on Railway; the ADK backend mounts the shared `_simple_chat` LlmAgent (Gemini 3.1 Flash-Lite) at `/headless_complete` — the demo relies on aimock fixtures to supply tool calls (`get_weather`, `get_stock_price`, `get_revenue_chart`) since the ADK simple agent has no real backend tools
77
- The demo wires `agent="headless-complete"` at `/api/copilotkit-mcp-apps` (shared with the mcp-apps cell) so the Excalidraw MCP server at `MCP_SERVER_URL || https://mcp.excalidraw.com` is available
88
- Note: the demo defines headless-specific `data-testid`s in `chat/message-list.tsx`, `chat/composer.tsx`, `tools/weather-card.tsx`, `tools/stock-card.tsx`, `tools/highlight-note.tsx`, and `tools/chart-card.tsx`. Other checks rely on verbatim text, role selectors, and Tailwind utility classes
99

showcase/integrations/google-adk/qa/headless-simple.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Prerequisites
44

55
- Demo is deployed and accessible at `/demos/headless-simple` on the dashboard host
6-
- Agent backend is healthy (`/api/health`); `GOOGLE_API_KEY` is set on Railway; the ADK backend mounts the shared `_simple_chat` LlmAgent (Gemini 2.5 Flash) at `/headless_simple`
6+
- Agent backend is healthy (`/api/health`); `GOOGLE_API_KEY` is set on Railway; the ADK backend mounts the shared `_simple_chat` LlmAgent (Gemini 3.1 Flash-Lite) at `/headless_simple`
77
- The demo wires `agent="headless-simple"` at `/api/copilotkit` (neutral assistant cell)
88
- Note: the demo source contains no `data-testid` attributes. Checks below rely on verbatim visible text, role/button selectors, and Tailwind utility-class structure
99

showcase/integrations/google-adk/qa/multimodal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Demo deployed and accessible at `/demos/multimodal`
66
- Railway service `showcase-google-adk` is healthy
77
- `GOOGLE_API_KEY` set on the Railway service (Gemini calls require it)
8-
- Agent is using a natively-multimodal Gemini model (`gemini-2.5-flash` or
8+
- Agent is using a natively-multimodal Gemini model (`gemini-3.1-flash-lite` or
99
equivalent) — verifiable by inspecting the Railway logs for
1010
`src/agents/multimodal_agent.py` or by running one image round-trip
1111
- Sample files are bundled under `public/demo-files/`:

showcase/integrations/google-adk/src/agents/beautiful_chat_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
# Model used for the secondary A2UI planner call. Mirrors main.py so the
5757
# A2UI surface generated for Beautiful Chat behaves identically to the
5858
# Sales Pipeline demo.
59-
_DEFAULT_A2UI_MODEL = "gemini-2.5-flash"
59+
_DEFAULT_A2UI_MODEL = "gemini-3.1-flash-lite"
6060

6161

6262
def _a2ui_model() -> str:

showcase/integrations/google-adk/src/agents/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
logger = logging.getLogger(__name__)
3737

3838
# Model used for the secondary A2UI planner call. Overridable via A2UI_MODEL
39-
# env var. gemini-2.5-flash is cheap, fast, and supports forced tool-calling
39+
# env var. gemini-3.1-flash-lite is fast and supports forced tool-calling
4040
# via ToolConfig.function_calling_config.mode="ANY".
41-
_DEFAULT_A2UI_MODEL = "gemini-2.5-flash"
41+
_DEFAULT_A2UI_MODEL = "gemini-3.1-flash-lite"
4242

4343

4444
def _a2ui_model() -> str:

showcase/integrations/google-adk/src/agents/multimodal_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Agent backing the Multimodal Attachments demo.
22
3-
Gemini 2.5 Flash is natively multimodal — image and PDF parts forwarded
3+
Gemini 3.1 Flash-Lite is natively multimodal — image and PDF parts forwarded
44
through ADK as `types.Part` blobs are processed by the model directly.
55
No backend tools needed; the model just describes / answers questions
66
about uploaded attachments.

showcase/integrations/google-adk/src/agents/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class AgentSpec:
102102
name="SimpleChatAgent", instruction=_SIMPLE_CHAT_INSTRUCTION
103103
)
104104

105-
# Reasoning-mode agent (Gemini 2.5 thinking). One shared instance for both
105+
# Reasoning-mode agent (Gemini 3.1 thinking). One shared instance for both
106106
# reasoning demos — they differ only in frontend wiring.
107107
_thinking_chat = build_thinking_chat_agent(
108108
name="ThinkingChatAgent",

showcase/integrations/google-adk/src/agents/shared_chat.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
(prebuilt-sidebar, prebuilt-popup, chat-slots, chat-customization-css,
66
headless-simple, headless-complete, voice, frontend-tools, agentic-chat).
77
8-
`build_thinking_chat_agent` uses Gemini 2.5 Flash with the thinking_config
8+
`build_thinking_chat_agent` uses Gemini 3.1 Flash-Lite with the thinking_config
99
exposed so reasoning is streamed back as `thought` parts; the v2 React core
1010
renders these via CopilotChatReasoningMessage.
1111
1212
`get_model` returns a `Gemini` instance configured with the aimock proxy
1313
endpoint when `GOOGLE_GEMINI_BASE_URL` is set, or the default model string
1414
otherwise. All agent modules should call `get_model()` instead of
15-
hard-coding `"gemini-2.5-flash"` so Railway deployments route through
15+
hard-coding `"gemini-3.1-flash-lite"` so Railway deployments route through
1616
aimock.
1717
1818
`stop_on_terminal_text` is the canonical after_model_callback shared by every
19-
registered LlmAgent. Gemini 2.5-flash does not naturally end its agentic
19+
registered LlmAgent. Gemini 3.1 Flash-Lite does not naturally end its agentic
2020
loop after a successful tool call — it keeps re-issuing the same tool. The
2121
callback inspects each non-partial model response and, when it contains
2222
text with no pending function_call, sets `_invocation_context.end_invocation
@@ -39,7 +39,7 @@
3939

4040
logger = logging.getLogger(__name__)
4141

42-
DEFAULT_MODEL = "gemini-2.5-flash"
42+
DEFAULT_MODEL = "gemini-3.1-flash-lite"
4343

4444

4545
def stop_on_terminal_text(
@@ -56,7 +56,7 @@ def stop_on_terminal_text(
5656
in `entrypoint.sh`).
5757
2. Only terminate when the final non-partial response contains TEXT
5858
and NO pending function_call — mixed text+function_call responses
59-
(a known Gemini 2.5-flash quirk) must NOT terminate.
59+
(a known Gemini Flash quirk) must NOT terminate.
6060
3. `_invocation_context` is an ADK private attribute; if it disappears
6161
in a future ADK release, log-and-degrade rather than crash the
6262
callback (which would stall the request).

0 commit comments

Comments
 (0)