Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Retry: Add tool_name to ToolContext for generic tool handlers #1110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

vrtnis
Copy link
Contributor

@vrtnis vrtnis commented Jul 14, 2025

This is a follow-up to pr #1043 The original changes were reverted due to missing updates in RealtimeSession, which caused runtime test failures.

This PR:

  • Reapplies the tool_name and tool_call_id additions to ToolContext.
  • Updates RealtimeSession._handle_tool_call to instantiate ToolContext with tool_name=event.name and tool_call_id=event.call_id.
  • Adjusts tests as needed so that all 533 tests (including old-version Python 3.9) pass cleanly.

Closes #1030

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.

Apart from the changes under ./docs, looks good to me; @rm-openai can you take a look?

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.

LGTM

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.

Add tool_name to ToolContext for generic tool handlers
2 participants