Skip to content

Conversation

@ruskaruma
Copy link
Contributor

What I changed

I added an arguments field to RealtimeToolStart events so developers can see the parameters passed when a tool is invoked.
The tool_end event already exposes the tool’s output, so adding arguments makes the start and end events more consistent and useful.

What I did

  1. Added the arguments field to the RealtimeToolStart dataclass in events.py.
    It’s stored as a JSON string, following the same convension used by the model layer.
  2. Updated the event emission logic in session.py to include the arguments from the tool call event.
  3. Extended the test suit to check that arguments are correctly included — covering normal, empty, and nested JSON cases.

Testing

All existing realtime tests passed (156/156).
The new tests verify that arguments are properly included in all scenerios.

This is a simple, low-risk update that fits cleanly into the existing structure of the codebase.

Fixes #1663

@ruskaruma
Copy link
Contributor Author

Hello @seratch. I’ve created this pull request. would really appreciate it if you could take a quick look when you get a chance. Please let me know if there’s anything I should fix or improve here.

Thanks a lot for your time and feedback!

@seratch
Copy link
Member

seratch commented Nov 4, 2025

Thanks for sending this patch! It seems to be good to go, but I will do manual testing before merging it

@seratch seratch mentioned this pull request Nov 4, 2025
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me. Can you add the same to RealtimeToolEnd events for consistency?

@ruskaruma
Copy link
Contributor Author

Thank you for reviewing the changes. I’ll make sure to apply the same updates to the RealtimeToolEnd events to keep everything consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RealtimeToolStart events do not expose tool arguments/input parameters

2 participants