Skip to content

Conversation

@logan-markewich
Copy link
Collaborator

Overhauled a bit how ctx injection handling works

  1. Updated FunctionTool to allow the ctx param to be any name and any location (not just the first param)
  2. Updated BaseToolSpec to use FunctionTool as a single source of truth for creating the tool list
  3. Kept it backwards compatible since the functions I wanted to remove were technically public
  4. Updated how the ctx is injected in AgentWorkflow
  5. Added tests for all

Fixes #18758

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 19, 2025
@logan-markewich logan-markewich requested a review from AstraBert May 19, 2025 20:10
Copy link
Member

@AstraBert AstraBert left a comment

Choose a reason for hiding this comment

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

Lgtm!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 20, 2025
@AstraBert AstraBert merged commit 8c9821f into main May 20, 2025
6 of 10 checks passed
@AstraBert AstraBert deleted the logan/tool_parsing_overhaul branch May 20, 2025 13:43
@colca colca mentioned this pull request Jun 9, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ToolSpec with Context object raises Pydantic Error

3 participants