Describe the Bug:
thinking_config set via Agent(generate_content_config=types.GenerateContentConfig(thinking_config=...)) is silently ignored for live/streaming models using Runner.run_live(). The ADK's Gemini.connect() (google_adk/models/google_llm.py) only forwards system_instruction and tools from llm_request.config (a GenerateContentConfig) to llm_request.live_connect_config (a LiveConnectConfig), even though LiveConnectConfig declares the same thinking_config field.
Steps to Reproduce:
- Create a live streaming agent with
thinking_config set:
agent = Agent(
name="live_agent",
model=SomeGeminiLiveModel(),
instruction="You are a helpful assistant.",
generate_content_config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(
thinking_level=types.ThinkingLevel.LOW,
include_thoughts=True,
)
),
)
- Run with
Runner.run_live().
- Observe that the live model does not exhibit thinking behavior — no
part.thought events are emitted.
Expected Behavior:
thinking_config set on the Agent's generate_content_config should be forwarded to the live connection so that the model uses thinking during streaming. The LiveConnectConfig class already supports the field — it just isn't populated by the framework.
Observed Behavior:
The thinking_config is correctly stored in llm_request.config.thinking_config (the GenerateContentConfig), but Gemini.connect() in google_llm.py only copies system_instruction and tools to llm_request.live_connect_config. The thinking_config field is never transferred, so it is silently dropped for all live/streaming sessions.
Environment Details:
- ADK Library Version (pip show google-adk): google-adk==2.0.0
- Desktop OS: Linux
- Python Version (python -V): Python 3.14
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-3.1-flash-live-preview (any live-capable Gemini model)
🟡 Optional Information
Regression:
N/A — first time testing live thinking config.
Logs:
The relevant code path in google_adk/models/google_llm.py in the connect() method:
# Only these two fields are forwarded:
llm_request.live_connect_config.system_instruction = types.Content(...)
llm_request.live_connect_config.tools = llm_request.config.tools
# thinking_config is never copied across, despite LiveConnectConfig having the field.
Minimal Reproduction Code:
import os
from google.adk.agents import Agent, LiveRequestQueue, RunConfig
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
agent = Agent(
name="live_agent",
model=os.getenv("MODEL_LIVE"),
instruction="You are a helpful assistant.",
generate_content_config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(
thinking_level=types.ThinkingLevel.LOW,
include_thoughts=True,
)
),
)
session_service = InMemorySessionService()
runner = Runner(
agent=agent,
app_name="test",
session_service=session_service,
)
live_request_queue = LiveRequestQueue()
async def run():
async for event in runner.run_live(
user_id="user",
session_id="session",
live_request_queue=live_request_queue,
run_config=RunConfig(
output_audio_transcription=types.AudioTranscriptionConfig(),
input_audio_transcription=types.AudioTranscriptionConfig(),
),
):
# No part.thought events will appear despite thinking_config being set
if event.content and event.content.parts:
for part in event.content.parts:
if part.thought:
print("THOUGHT:", part.text)
How often has this issue occurred?:
Describe the Bug:
thinking_configset viaAgent(generate_content_config=types.GenerateContentConfig(thinking_config=...))is silently ignored for live/streaming models usingRunner.run_live(). The ADK'sGemini.connect()(google_adk/models/google_llm.py) only forwardssystem_instructionandtoolsfromllm_request.config(aGenerateContentConfig) tollm_request.live_connect_config(aLiveConnectConfig), even thoughLiveConnectConfigdeclares the samethinking_configfield.Steps to Reproduce:
thinking_configset:Runner.run_live().part.thoughtevents are emitted.Expected Behavior:
thinking_configset on the Agent'sgenerate_content_configshould be forwarded to the live connection so that the model uses thinking during streaming. TheLiveConnectConfigclass already supports the field — it just isn't populated by the framework.Observed Behavior:
The
thinking_configis correctly stored inllm_request.config.thinking_config(theGenerateContentConfig), butGemini.connect()ingoogle_llm.pyonly copiessystem_instructionandtoolstollm_request.live_connect_config. Thethinking_configfield is never transferred, so it is silently dropped for all live/streaming sessions.Environment Details:
Model Information:
🟡 Optional Information
Regression:
N/A — first time testing live thinking config.
Logs:
The relevant code path in
google_adk/models/google_llm.pyin theconnect()method:Minimal Reproduction Code:
How often has this issue occurred?: