Skip to content

Conversation

logan-markewich
Copy link
Collaborator

Fixes #18998

#18783 introduced a bug, where by relying on FunctionTool.from_defaults() and always passing in both a sync and async function, we end up getting some wonky tool metadata.

FunctionTool already handles patching sync -> async or async -> sync, so the BaseToolSpec class no longer needs to handle this.

With this fix, the proper tool metadata is present for async and sync functions.

Added additional tests to verify this.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 7, 2025
@logan-markewich logan-markewich changed the title fix async functions in tool specs fix: async functions in tool specs Jun 7, 2025
@logan-markewich logan-markewich merged commit aff1065 into main Jun 7, 2025
8 of 10 checks passed
@logan-markewich logan-markewich deleted the logan/fix_async_tool_spec branch June 7, 2025 18:59
@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
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Async functions in a ToolSpec have invalid Metadata
1 participant