Skip to content

Conversation

@vblagoje
Copy link
Member

@vblagoje vblagoje commented Oct 21, 2025

Why:

Add integration tests for ToolsType Haystack 2.19 updates

part of:

What:

  • Added tests for mixed tool collection initialization and request parameter formatting

How did you test it:

  • Integration tests verify mixed Tool/Toolset usage
  • Backward compatibility validated for existing patterns (list of tools, single toolset)

@github-actions github-actions bot added integration:openrouter type:documentation Improvements or additions to documentation labels Oct 21, 2025
@vblagoje vblagoje changed the title feat: Add integration test for mixing Tool/Toolset feat: OpenRouterChatGenerator add integration tests for mixing Tool/Toolset Oct 21, 2025
@vblagoje vblagoje marked this pull request as ready for review October 21, 2025 14:06
@vblagoje vblagoje requested a review from a team as a code owner October 21, 2025 14:06
@vblagoje vblagoje requested review from Amnah199 and julian-risch and removed request for a team and julian-risch October 21, 2025 14:06
Comment on lines 701 to 702
component = OpenRouterChatGenerator(tools=toolset)

Copy link
Contributor

Choose a reason for hiding this comment

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

@vblagoje In the issue it says we are allowed to pass tool and toolsets in the same list.

Comment on lines 642 to 644
# Pass both tools at runtime - runtime tools should take precedence
messages = [ChatMessage.from_user("What's the time in Tokyo?")]
results = component.run(messages, tools=[time_tool])
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment says pass both tools, although only one tool is passed to run method.

@vblagoje vblagoje requested a review from Amnah199 October 22, 2025 08:07

# Pass echo_tool as a list at runtime - runtime tools should take precedence
messages = [ChatMessage.from_user("Echo this: Hello World")]
results = component.run(messages, tools=[echo_tool])
Copy link
Contributor

Choose a reason for hiding this comment

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

@vblagoje we need to update this to test passing mixed list of tools and toolsets instead of overriding init tools.


# Pass echo_tool as a list at runtime - runtime tools should take precedence
messages = [ChatMessage.from_user("Echo this: Hello World")]
results = await component.run_async(messages, tools=[echo_tool])
Copy link
Contributor

Choose a reason for hiding this comment

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

@vblagoje please update this as well like the above test

Copy link
Member Author

Choose a reason for hiding this comment

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

@Amnah199 - done

@vblagoje vblagoje merged commit 2a0ffb1 into main Oct 23, 2025
10 checks passed
@vblagoje vblagoje deleted the openrouter-toolstype branch October 23, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:openrouter type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants