* No longer pass down parent_snapshot to Agent and break point trigger moved to Pipeline._run_component
* Some cleanup since parent_snapshot is no longer passed down
* linting and typing
* Refactor chat generator break point in Agent to use triggering mechanism of Pipeline._run_component
* small changes
* Refactor so tool invoker break point uses the break_point param of Pipeline._run_component
* edits
* Further reduce duplicate code
* Further reduce duplicate code
* Add break_point as property to BreakpointException
* Fix
* Fix mypy and PR comments
* PR comments
* Update HuggingFaceLocalChatGenerator default model to Qwen/Qwen3-0.6B
* Add enable_thinking init parameter
* Pydoc wording
* Format test
* Add tests for enable_thinking flag
* Add reno note for HuggingFaceLocalChatGenerator updates
* Update haystack/components/generators/chat/hugging_face_local.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* Update release notes for HuggingFaceLocalChatGenerator
Updated the release notes to reflect changes in the HuggingFaceLocalChatGenerator, including the new default model and the addition of the enable_thinking parameter.
* Simplify test_live_run with/out enable_thinking flag
* Test shuffle
---------
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* refactor
* Update tests
* Add reno
* Fix types
* fix type
* Fix test
* fix unit tests
* Add asserts to make mypy happy
* Fix unit test
* Update releasenotes/notes/refactor-warm-up-components-c2777fef28a70b61.yaml
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* start getting rid of asserts
* remove more asserts
* remove last assert
* Remove assert
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* added run_async to filter retriever. implementation identical to run
* created a test for the FilterRetriever, with the same logic of the original sync test
* AutoMergingRetriever has now a run_async method identical to run, but with an async call on the document_store
* added async test, which contains async version of original run tests. discovered incorrect async await call in my previous commit
* modified documentation to specify that the method is asyncronous
* added patch file
* fixing typing error for filter_documents_async
* updating release notes
* fixing unit test
---------
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* Update Azure default model to gpt-4.1-mini
* Add version
* Version updates
* Experiment
* Update experiment with 2024-12-01-preview
* Fix test
* Add reno note
* Fix typo
* Update default OpenAI model to gpt-5-mini
* Update tests
* Fix tool invoker tests
* Update integration tests
* Update fragile test
* More robust tests
* Harden test
* More test improvements
* Better prompting, to trigger tools
* Simplify
* Simplify more
* Simplify even more, less maintenance in the future
* Mark two integration tests flaky
* Fixing fine details
* Add release note for OpenAI default model update to gpt-5-mini
* Add upgrade section to OpenAI default model release note
* include components with consumed outputs in pipeline results
* update test
* update test
* release notes
* Add async pipeline test and update more checks in async pipeline
---------
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
* Fix to dict and json schema support
* Update Azure Responses
* Add tests
* Fix tests
* Fix tests
* remove print
* Change model
* Add a new test
* Loosen tests
* Update information in streaming chunks and fix convert streaming chunks to chat message when handling reasoning content
* Fix unit test
* fix mypy
* try to make integration test more reliable
* Remove unused imports
* Add working ChatGenerator
* rename
* Improve and add live tests
* Updates
* Update the tests
* Fix errors
* Add release notes
* Add support for openai tools
* Remove openai tools test that times out
* fix tool calls
* Update release notes
* PR comments
* remove edits to chat message
* Add a test
* PR comments
* Send back reasoning to model
* Fix reasoning support
* Add reasoning support
* Fix tests
* Refactor
* Simplify methods
* Fix mypy
* Stream responses, tool calls etc
* Update docstrings
* Fix errors while using in Agent
* Fix call_id and fc_id
* Update tests
* Updates
* Add extra in ToolCall and ToolCallDelta
* Update streaming chunk
* Fix tests and linting
* Update api key resolve
* PR comments
* PR comments
* Updates
* some type fixes and also make sure to use flatten_tools_or_toolsets
* fix docs
* Fix streaming chunks so assistant header is properly captured
* Add finish_reason and update test
* Skip streaming + pydantic model test b/c of known issue in openai python sdk https://github.com/openai/openai-python/issues/2305
* Fix pylint
* Initial commit adding AzureOpenAIResponsesChatGenerator support
* fix unit test
* Starting to refactor to use new recommended way to connect to Azure OpenAI
* Updates
* Fix tests
* More tests
* fix integration tests
* Add to docs
* Don't need warm_up method anymore
* fix unit test
* Fix pylint
* fix docstrings
* fix mypy typing
* fix reno
* Add another unit test
---------
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
* Add working ChatGenerator
* rename
* Improve and add live tests
* Updates
* Update the tests
* Fix errors
* Add release notes
* Add support for openai tools
* Remove openai tools test that times out
* fix tool calls
* Update release notes
* PR comments
* remove edits to chat message
* Add a test
* PR comments
* Send back reasoning to model
* Fix reasoning support
* Add reasoning support
* Fix tests
* Refactor
* Simplify methods
* Fix mypy
* Stream responses, tool calls etc
* Update docstrings
* Fix errors while using in Agent
* Fix call_id and fc_id
* Update tests
* Updates
* Add extra in ToolCall and ToolCallDelta
* Update streaming chunk
* Fix tests and linting
* Update api key resolve
* PR comments
* PR comments
* Updates
* some type fixes and also make sure to use flatten_tools_or_toolsets
* fix docs
* Fix streaming chunks so assistant header is properly captured
* Add finish_reason and update test
* Skip streaming + pydantic model test b/c of known issue in openai python sdk https://github.com/openai/openai-python/issues/2305
* Fix pylint
---------
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
* fix: warm up individual tools inside Toolsets in warm_up_tools()
Related Issues:
* Follows up on PR #9942 (feat: Add warm_up() method to ChatGenerators)
* Addresses bug discovered during implementation of PR #9942 for issue #9907
Proposed Changes:
The warm_up_tools() utility function was only calling warm_up() on
Toolset objects themselves, but not on the individual Tool instances
contained within them. This meant tools inside a Toolset were not
properly initialized before use.
This PR modifies warm_up_tools() to iterate through Toolsets and call
warm_up() on each individual tool, in addition to calling warm_up() on
the Toolset itself.
Changes:
- Modified warm_up_tools() in haystack/tools/utils.py to iterate through
Toolsets when encountered (both as single argument and within lists)
- Added iteration to call warm_up() on each individual Tool inside Toolsets
- Added comprehensive test class TestWarmUpTools with 7 test cases
How did you test it:
- Added 7 comprehensive unit tests in test/tools/test_tools_utils.py:
* test_warm_up_tools_with_none - handles None input
* test_warm_up_tools_with_single_tool - single tool in list
* test_warm_up_tools_with_single_toolset - KEY TEST: verifies both
Toolset and individual tools are warmed
* test_warm_up_tools_with_list_containing_toolset - toolset within list
* test_warm_up_tools_with_multiple_toolsets - multiple toolsets
* test_warm_up_tools_with_mixed_tools_and_toolsets - mixed scenarios
* test_warm_up_tools_idempotency - safe to call multiple times
Notes for the reviewer:
I discovered this bug while implementing PR #9942 (for issue #9907).
When a Toolset object is passed to a component's tools parameter, the
warm_up_tools() function only calls Toolset.warm_up(), which is a no-op.
It doesn't iterate through the individual tools inside the Toolset to
warm them up.
acknowledged by @vblagoje and @sjrl
This implementation:
- Modified warm_up_tools() to iterate through Toolsets and call warm_up() on each individual tool
- Added comprehensive tests for Toolset warming behavior
- Verified both the Toolset and its contained tools are warmed up
Checklist:
I have read the contributors guidelines and the code of conduct
I have updated the related issue with new insights and changes
I added unit tests and updated the docstrings
I've used one of the conventional commit types for my PR title: fix:
I documented my code
I ran pre-commit hooks and fixed any issue
* added release note
* refactor: move tool warm-up iteration to Toolset.warm_up()
Addresses architectural feedback - moved iteration logic from warm_up_tools()
to base Toolset.warm_up() for better encapsulation. Subclasses can now
override warm_up() to customize initialization without breaking the contract.
- Toolset.warm_up() now iterates and warms tools by default
- warm_up_tools() simplified to delegate to warm_up()
- Updated tests and release notes
---------
Co-authored-by: HamidOna13 <abdulhamid.onawole@aizatron.com>
* Add warm_up() method to OpenAIChatGenerator
- Add warm_up() method that calls warm_up_tools()
- Add _is_warmed_up flag for idempotency
- Import warm_up_tools from haystack.tools
- Add comprehensive tests:
- test_warm_up_with_tools: single tool case
- test_warm_up_with_no_tools: no tools case
- test_warm_up_with_multiple_tools: multiple tools case
- All tests passing
Part of issue #9907
* Add warm_up() method to AzureOpenAIChatGenerator
- Add warm_up() method that calls warm_up_tools()
- Add _is_warmed_up flag for idempotency
- Import warm_up_tools from haystack.tools
- Add comprehensive tests:
- test_warm_up_with_tools: single tool case
- test_warm_up_with_no_tools: no tools case
- test_warm_up_with_multiple_tools: multiple tools case
- All tests passing
Part of issue #9907
* Add warm_up() method to HuggingFaceAPIChatGenerator
- Add warm_up() method that calls warm_up_tools()
- Add _is_warmed_up flag for idempotency
- Import warm_up_tools from haystack.tools
- Add comprehensive tests:
- test_warm_up_with_tools: single tool case
- test_warm_up_with_no_tools: no tools case
- test_warm_up_with_multiple_tools: multiple tools case
- All tests passing
Part of issue #9907
* Enhance warm_up() method in HuggingFaceLocalChatGenerator
- Add warm_up_tools import from haystack.tools.utils
- Add _is_warmed_up flag for idempotency
- Enhance existing warm_up() to also warm up tools
- Preserve existing pipeline initialization logic
- Add comprehensive tests:
- test_warm_up_with_tools: single tool case
- test_warm_up_with_no_tools: no tools case
- test_warm_up_with_multiple_tools: multiple tools case
Part of issue #9907
* Add warm_up() method to FallbackChatGenerator
- Add warm_up() method that delegates to underlying generators
- Uses hasattr check to gracefully handle generators without warm_up
- Add comprehensive tests:
- test_warm_up_delegates_to_generators: verify delegation works
- test_warm_up_with_no_warm_up_method: handle missing warm_up gracefully
- test_warm_up_mixed_generators: mix of generators with/without warm_up
- All tests passing
Part of issue #9907
* docs: Add release notes for warm_up() feature
---------
Co-authored-by: HamidOna13 <abdulhamid.onawole@aizatron.com>
* add generation_kwargs to run methods of Agent
* include test generation_kwargs in agent unit tests
* fix typo
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* create separate unit test for generation kwargs with agent
* fix formatting
* add back generation_kwargs
* add release notes
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Tools warmup initial
* Fix lint
* Improve pydocs for warm_up
* Further improve pydocs for warm_up
* No need to warm_up tools in Agent as they are warmed up by ToolInvoker
* Simplify Toolset __add__ logic
* Simplify _ToolsetWrapper
* Add unit tests
* ToolInvoker warm_up
* Improve Tool pydoc
* Resurrect serde_utils.py
* Update tests
* Call ToolInvoker warm_up in agent warm_up
* Lint
* Move warm_up tests to ToolInvoker
* Update tests
* Remove tests
* Pydoc nit
* PR feedback
* ToolInvoker's warm_up is idempotent
* Add reno note
* Update releasenotes/notes/tools-warm-up-support-e16cc043fed3653f.yaml
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Make ComponentTool warm_up idempotent
* Update warm_up_tools to use ToolsType
* Linting
* Add warm up test for mixed list of Tool/Toolset instances
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>