adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

(noob here) I am going crazy trying to implement thought summaries with Gemini 3 Flash and LiteLLM

Open db-aeon opened this issue 10 months ago • 2 comments

Please see:

https://ai.google.dev/gemini-api/docs/thinking#summaries

I understand thought_signitures, but having thought_summaries are really useful in helping understand why a model may go astray. I am not seeing any documentation around this?

I am using acompletion()

Nothing I do seems to get thought in the response.

db-aeon avatar Jan 10 '26 22:01 db-aeon

Hello @db-aeon ,

To enable thinking capabilities for your models, please use the planner module from google.adk.planners (specifically BuiltInPlanner).

Example Usage:

from google.adk.planners import BuiltInPlanner

my_agent = LlmAgent(
    name="my_debugging_agent",
    model=Gemini(model="GEMINI"), # Or your desired model
    instruction="Explain your reasoning process for solving a simple math problem: 1 + 1",
    planner=BuiltInPlanner(
        thinking_config=types.ThinkingConfig(
            include_thoughts=True,
            thinking_budget=1024,
        )
    )
)

Once this is configured, the output event will include the model's thought process. You can then easily isolate and print the thoughts from the event data.

llalitkumarrr avatar Jan 12 '26 06:01 llalitkumarrr

Since the ask is about Gemini 3 flash model, the correct configuration should be using ThinkingLevel not the old thinking_budget.

from google.adk.planners import BuiltInPlanner

my_agent = LlmAgent(
    name="my_debugging_agent",
    model=Gemini(model="GEMINI"), # Or your desired model
    instruction="Explain your reasoning process for solving a simple math problem: 1 + 1",
    planner=BuiltInPlanner(
        thinking_config=types.ThinkingConfig(
            include_thoughts=True, thinking_level=types.ThinkingLevel.HIGH
        )
    ),
)

lwangverizon avatar Jan 13 '26 02:01 lwangverizon