Skip to content

Behaviour Change for Raised Exception in Tool Call #4291

@jmaloney1

Description

@jmaloney1

🔴 Required Information

Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A

Describe the Bug:
The behaviour for a raised exception from a tool has changed from 1.22 to 1.23. Initially it was returned as an error event through /run_sse and now in 1.23 it is a message part.

Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:
Create a tool that raises an Exception, the behaviour is different from 1.22.0 to 1.23.0. I'm wondering if this is a regression?

Expected Behavior:
thrown ValueError from a tool call is returned as an error event from /run_sse

Error from 1.22.0:

data: {"error": "Activity 9bc8c6cc-8bf3-49bf-a6e8-4aa07f6045fe was not found in timeline"}

Observed Behavior:
thrown ValueError from a tool call, is returned as a message part from /run_sse

Error from 1.23.0:

data: {"content":{"parts":[{"text":"Error: Activity a0b39f0d-ed5d-4d15-b4ff-8134ba306c94 was not found in timeline"}],"role":"model"},"invocationId":"","author":"system","actions":{"stateDelta":{},"artifactDelta":{},"requestedAuthConfigs":{},"requestedToolConfirmations":{}},"id":"867ef714-619e-448c-8db7-121e3d70ab91","timestamp":1769571199.050514}

Environment Details:

  • ADK Library Version 1.23.0
  • Desktop OS:** macOs
  • Python Version (python -V): 3.13.11

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-3-flash-preview

🟡 Optional Information

Providing this information greatly speeds up the resolution process.

Regression:
Did this work in a previous version of ADK? If so, which one?
I'm not sure which of the responses is expected but something was changed.

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions