Skip to content

Internal Agent Responses Leaked in SSE Output with partial: true #4151

@abhijith2599

Description

@abhijith2599

Bug
The ADK is returning internal thinking steps in the output. These internal messages fall under the partial: true flag and are being streamed to the client. I am using SSE streaming with FastAPI endpoints.

To Reproduce
Steps to reproduce the behavior:

  1. Install google-adk==1.17.0
  2. Run 'main.py'
  3. Error (example):

{
"author": "TravelAgent",
"invocation_id": "e-xyz...",
"content": {"parts": [{"text": "Okay, the user is trying to cancel a leave, this clearly indicates the need to identify and cancel a leave request. The cancel_leave_request_tool is the primary tool for cancelling ], so i should use this ......"}]},
"partial": True,
"turn_complete": true
}

Expected behavior
The agent should never output internal thinking or intermediate messages when partial: true.

Screenshots

Image Image

Desktop (please complete the following information):

  • OS: Windows
  • Python version(python -V): 3.12.5
  • ADK version(pip show google-adk): 1.17.0

Model Information:

  • Are you using LiteLLM: Yes
  • Which model is being used: gemini-2.5-flash

Metadata

Metadata

Assignees

No one assigned

    Labels

    web[Component] This issue will be transferred to adk-web

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions