Skip to content

Conversation

@tzolov
Copy link
Contributor

@tzolov tzolov commented Feb 27, 2025

Changes the validation logic in MethodToolCallback to check if a ToolContext is required by the method but not provided, rather than checking if a ToolContext is provided but not supported by the method. This ensures methods that expect a ToolContext parameter receive one.

Updates tests cases to reflect the new validation logic

Resolves #2337

Changes the validation logic in MethodToolCallback to check if a ToolContext is required by the method but not provided,
rather than checking if a ToolContext is provided but not supported by the method.
This ensures methods that expect a ToolContext parameter receive one.

Updates tests cases to reflect the new validation logic

Resolves spring-projects#2337

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov added this to the 1.0.0-M7 milestone Feb 27, 2025
Copy link
Contributor

@ThomasVitale ThomasVitale left a comment

Choose a reason for hiding this comment

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

Nice!

@ilayaperumalg ilayaperumalg self-assigned this Feb 27, 2025
@ilayaperumalg ilayaperumalg merged commit 82d98b6 into spring-projects:main Feb 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reverse the MethodToolCallback's ToolContext validation logic

3 participants