Skip to content

Conversation

@vblagoje
Copy link
Member

@vblagoje vblagoje commented Oct 29, 2025

Why:

Fixes failing tests on main branch after PR #9942 which introduced the warm_up() method requirement for ChatGenerator components when using tools. Tests were failing because Agent and LLMMessagesRouter components now require explicit warm-up calls before execution to properly initialize tools.

What:

  • Added agent.warm_up() calls in test_agent_breakpoints.py before agent execution with tools
  • Added router.warm_up() call in test_llm_messages_router.py before router execution with tools
  • Added agent.warm_up() calls (2 locations) in test_pipeline_tool.py for both sync and async test cases
  • Created Reno release note documenting the breaking change and required user action

How can it be used:

After PR #9942, all Agent and LLMMessagesRouter usage with tools must call warm_up() before execution:

# Before (now fails):
agent = Agent(llm=OpenAIChatGenerator(model="gpt-4"), tools=[my_tool])
result = agent.run(messages=[ChatMessage.from_user("Hello")])

# After (required pattern):
agent = Agent(llm=OpenAIChatGenerator(model="gpt-4"), tools=[my_tool])
agent.warm_up()  # Required for tool initialization
result = agent.run(messages=[ChatMessage.from_user("Hello")])

# Works for async as well:
agent.warm_up()
result = await agent.run_async(messages=[ChatMessage.from_user("Hello")])

How did you test it:

  • Updated all affected test files to include warm_up() calls
  • Verified tests pass with the new pattern
  • Created release note with code examples for user migration

Notes for the reviewer:

This is a direct follow-up to PR #9942 which introduced tool warm-up for ChatGenerators. The release note is categorized as a fix rather than upgrade since it documents the resolution of the test failures and provides migration guidance. All changes are minimal—just adding the required warm_up() calls before component execution.

Related Issues

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
haystack-docs Ignored Ignored Preview Oct 29, 2025 11:29am

@vblagoje vblagoje changed the title Failing main fix: Add warm_up() calls to tests after ChatGenerator tool initialization changes Oct 29, 2025
@coveralls
Copy link
Collaborator

coveralls commented Oct 29, 2025

Pull Request Test Coverage Report for Build 18906379731

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.235%

Totals Coverage Status
Change from base Build 18904192695: 0.0%
Covered Lines: 13494
Relevant Lines: 14630

💛 - Coveralls

@vblagoje vblagoje marked this pull request as ready for review October 29, 2025 10:52
@vblagoje vblagoje requested a review from a team as a code owner October 29, 2025 10:52
@vblagoje vblagoje requested review from sjrl and removed request for a team October 29, 2025 10:52
Copy link
Contributor

@sjrl sjrl left a comment

Choose a reason for hiding this comment

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

Looks good, just an update to the reno!

@vblagoje vblagoje merged commit 08f6969 into main Oct 29, 2025
20 checks passed
@vblagoje vblagoje deleted the failing_main branch October 29, 2025 12:52
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.

4 participants