1862 Commits

Author SHA1 Message Date
Charles-Meldhine Madi Mnemoi
47c3a2bc88
feat: SentenceWindowRetriever now supports run_async (#9895)
* feat: `SentenceWindowRetriever` now supports `run_async`

* refactor: Reduce duplicated code

* refactor: Remove unused import

* docs: Add release notes

* style: ignore type error from missing `run_async` in `DocumentStore` protocol

* docs: Precise the ignored mypy error and add a comment explaining why

* style: update mypy ignore type for filter_documents_async in SentenceWindowRetriever

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-10-21 11:41:43 +02:00
Vladimir Blagojevic
9bc59c3806
Add Tools warm_up (#9856)
* 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>
2025-10-20 12:11:34 +02:00
Sebastian Husch Lee
4cb4854057
don't name something test if it's not a test (#9900) 2025-10-20 09:23:43 +00:00
Vladimir Blagojevic
8098e9c6f6
feat: Update tools param to Optional[Union[list[Union[Tool, Toolset]], Toolset]] (#9886)
* Update tools param to Optional[Union[list[Union[Tool, Toolset]], Toolset]]

* Exclude tools from schema generation

* Different approach

* Lint

* Use ToolsType

* Fixes

* Reno note

* Update haystack/tools/utils.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/tools/serde_utils.py

Co-authored-by: tstadel <60758086+tstadel@users.noreply.github.com>

* Revert "Update haystack/tools/utils.py"

This reverts commit ebdec9115d46276b57a7459e566fd06c388ba51b.

* PR feedback

* Improve serde tests

* Update releasenotes/notes/mixed-tools-toolsets-support-d944c5770e2e6e7b.yaml

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Pydoc polish

* Update FallbackChatGenerator for new ToolsType

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: tstadel <60758086+tstadel@users.noreply.github.com>
2025-10-20 09:26:22 +02:00
Vladimir Blagojevic
90edcdacee
feat: Add FallbackChatGenerator (#9859)
* Add FallbackChatGenerator

* Update licence files

* Use typing.Optional/Union for Python 3.9 compat

* Use the right logger

* Lint fix

* PR review

* Rewrite release note

* Add FallbackChatGenerator to docs

* Update haystack/components/generators/chat/fallback.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Rename generator -> chat_generators

* Lint

* Rename generators -> chat_generators in meta, docs, tests

* Update haystack/components/generators/chat/fallback.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Update pydocs

* Minor pydocs fix

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-10-17 15:46:31 +02:00
Sebastian Husch Lee
8188e5ad86
feat: Update BreakpointException to include the pipeline snapshot and where it is saved (#9888)
* Add snapshot and the full file path it was saved to breakpoint exception

* Add checks to test and simplify test

* Make both tests unit tests

* remove unused import

* update reno

* Add docstrings

* Updated reno

* Simplify test

* Uupdate test

* Fix mypy
2025-10-17 11:11:09 +02:00
David S. Batista
cfa5d27614
feat: adding RegextTextExtractor component from experimental (#9879)
* initial import of component

* adding release notes

* adding docs to docusaurus
2025-10-15 13:55:22 +02:00
Sebastian Husch Lee
fe60c765d9
refactor: Refactor _save_pipeline_snapshot and _create_pipeline_snapshot to handle more exceptions (#9871)
* Refactor saving pipeline snapshot to handle the try-except inside and to cover more cases (e.g. try-excepts around our serialization logic)

* Add reno

* Fix

* Adding tests

* More tests

* small change

* fix test

* update docstrings
2025-10-15 09:30:26 +00:00
Sebastian Husch Lee
0cd297adc8
docs: Update docstrings of OpenAI Generators to use max_completion_tokens (#9874)
* Update docstrings to use max_completion_tokens instead of deprecated max_tokens

* Change more instances of max_tokens

* update tests
2025-10-15 09:26:59 +00:00
Sebastian Husch Lee
512dd86d97
feat: Add serialization and deserialization of Enum type when creating a PipelineSnaphsot (#9869)
* refactor tests

* Test refactoring and add failing test for enum

* Remove redundant method

* Slight refactoring

* refactoring

* simplification of _deserialize_value_with_schema and _deserialize_value

* Add some more TODOs

* Add support for enum serialization and deserialization

* types

* Add reno

* fix linting

* PR comments

* Add warning message

* dev comment
2025-10-14 10:28:19 +00:00
Sebastian Husch Lee
18b6482e2e
feat: Add ability to pass breakpoint and snapshot to Agent at runtime (#9867)
* Add ability to pass breakpoint and snapshot to agent at runtime

* Update releasenotes/notes/pass-agent-breakpoint-and-snapshot-5ac32800899d0bab.yaml

Co-authored-by: David S. Batista <dsbatista@gmail.com>

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-10-13 11:07:12 +00:00
Arya Tayshete
f8d6757eab
feat(converters): CSVToDocument supports row-level conversion (#9773)
* feat(converters): CSVToDocument row-level conversion (content_column, columns→meta) + tests + releasenote

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): CSVToDocument row-mode hardening + tests

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* test(converters): remove long commented line to satisfy ruff E501

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* fix(converters): avoid infinite loop

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): require content_column in run() for row mode; remove fallbacks; improve docstrings; update tests

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): content_column required in run method instead of init

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(csv): row-mode with required run() arg ; update BDD pipeline tests

---------

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>
2025-10-09 13:15:51 +00:00
Stefano Fiorucci
2a27e0d131
fix: fix OpenAIChatGenerator response_format serialization errors (#9858)
* fix: fix OpenAIChatGenerator response_format serialization errors

* relnote fix
2025-10-08 09:30:34 +00:00
Sebastian Husch Lee
5c69b08a76
fix: Fix Agent not raising BreakpointException for ToolBreakpoint with specific tool_name in assistant messages with multiple tool calls (#9853)
* Fix tool breakpoint triggering in Agent

* formatting

* fix formatting
2025-10-06 14:55:17 +02:00
Sriniketh J
34aa66ecc6
fix: embedding backend id key for sent trans backend (#9844)
* fix: embedding backend id key for sent trans backend

* refactor: sparse embedding to use kwargs

* fix: workflow failure

* feat: add rn file

* Revert "refactor: sparse embedding to use kwargs"

This reverts commit 3b331d6904bf1fdaf4d735127461407d96c2eef2.

* fix: review comments (dev)

* fix: review comments (test)

* Slow tests should run when changing embedding backends

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-09-30 10:20:08 +02:00
Stefano Fiorucci
11b4b4f9fc
fix: make Agent run_async work with async streaming_callback (#9824)
* fix Agent streaming_callback requires_async

* add tests

* fix

* relnote
2025-09-25 15:06:41 +00:00
Sebastian Husch Lee
1e04845b02
fix: Fix initializing an Agent from an AgentSnapshot (#9826)
* Fix initializing agent from snapshot. Refactoring tests

* Fixing tests

* Add integration test

* Add reno

* linting

* Update releasenotes/notes/fix-openai-agent-snapshot-init-1ca26789564a53fe.yaml

Co-authored-by: David S. Batista <dsbatista@gmail.com>

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-09-25 16:54:45 +02:00
Stefano Fiorucci
bc8a4754d2
test: use small Sentence Transformers models in tests (#9802)
* test: use small Sentence Transformers models in tests

* fix
2025-09-24 09:26:51 +02:00
Sebastian Husch Lee
143b0b00e8
tests: Add more tests for OpenAIChatGenerator with different response_format options (#9810)
* Fix: only put in response_format into api args if it's not None

* Add reno

* Add more tests

* Update test

* Remove test
2025-09-23 14:51:52 +02:00
tstadel
622f922b98
feat: select tools at runtime (#9798)
* feat: select tools at runtime

* pass tools to ToolInvoker too for consistency

* refactoring

* add reno

* apply feedback and add tools to run_async

* add tests

* fix mypy

* chore: enable tool selection when running from snapshot as well

* fix pylint

* apply feedback

* Update haystack/components/agents/agent.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update releasenotes/notes/add-tools-to-agent-run-params-3aa9c75ee548c38d.yaml

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* add raises

* add more tests

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-09-23 09:07:54 +02:00
Sebastian Husch Lee
7f802656f6
chore: Refactor tool invoker (#9794)
* Refactoring tool invoker

* More refactoring

* More refactoring

* Small fix

* Fix

* max_workers was missing from ToolInvoker.to_dict
2025-09-22 09:39:52 +02:00
Sebastian Husch Lee
3568b6fe31
fix: Fix parameter schema generation in ComponentTool when using inputs_from_state (#9795)
* Fix for removing parameters from the parameters schema when using inputs_from_state

* Add reno
2025-09-22 07:02:36 +02:00
Arseniy Shkunkov
1fb76ec7e4
feat: add Sparse Embedders based on Sentence Transformers (#9588)
* Added backend class for SparseEncoder and also SentenceTransformersSparseTextEmbedder

* Added SentenceTransformersSparseDocumentEmbedder

* Created a separate _SentenceTransformersSparseEmbeddingBackendFactory and added tests

* Remove unused parameter

* Wrapped output into SparseEmbedding dataclass + fix tests

* Return correct SparseEmbedding, imports and tests

* fix fmt

* Style changes and fixes

* Added a test for embed function

* Added integration test and fixed some other tests

* Add lint fixes

* Fixed positional arguments

* fix types, simplify and more

* fix

* token fixes

* pydocs, small model in test, cache improvement

* try 3.9 for docs

* better to pin click

* release note

* small fix

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-09-19 14:00:13 +00:00
Sebastian Husch Lee
5bca520a48
fix: Fix MetaFieldGroupingRanker to handle unhashable subgroup_by values like list (#9791)
* Fixes

* Add reno

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-09-16 12:24:08 +02:00
David S. Batista
10e05b679f
feat: save last AgentSnapshot when Agent crashes (#9774)
* raise last good snapshot in PipelineRunTimeError + tests updates

* adding release notes

* renaming test file

* wip: PoC generating Agent snapshot + host pipeline snapshot and saving it to disk

* wip: agent tool error generates a valid snapshot file

* dealing with function seralisation/deserialisation

* wip: fixing typing issues

* fixing typing issues

* wip

* fixing types

* fixing tests

* extending tests for sudden crash + breakpoints and resume

* adding release notes

* merginng pipeline tests into single file

* adding missing test file

* WIP: PR comments/improvments

* set test as integration test

* refactor: Updates to saving an AgentSnapshot if execution fails (#9781)

* Updates

* Fix circular import

* Fixes

* Fix license header

* fixing typing

* fixing typing

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>

* Update haystack/utils/base_serialization.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* wip

* fixing tests

* updaing deserialisation

* updating more tests, reorganising breakpoints tests

* fixing bug in saving agent_snapshot

* updating tests

* updating tests

* updating tests

* adding tests for serialisation/deserialisation of functions

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-09-16 09:46:35 +00:00
Amna Mubashar
35c1cabb4e
feat: support structured outputs in OpenAIChatGenerator (#9754)
* Add parse for response format

* Update response_format

* Add tests

* Add release notes

* Update checks

* remove instance var

* Add tests for azure

* Add schema test

* Add comments

* Add streaming support

* PR comments

* PR comments

* Add tests

* Fix tests

* Add unit tests

* Update Azure files

* PR comments

* Small fix

* Include message.parsed

* Fix seriliaztion

* Update the async method

* Update release notes

* Loosen tests to prevent failure

* PR comments

* Fix release notes

* Fix error
2025-09-16 11:15:28 +02:00
Sebastian Husch Lee
7443efe2f8
feat: Add reasoning content to streaming chunk (#9777)
* Add reasoning content to streaming chunk

* Add reno

* Update print_streaming_chunk
2025-09-15 13:44:12 +02:00
Sebastian Husch Lee
443101ee78
test: Increase robustness of PipelineTool integration tests (#9779)
* Add system prompt to encourage model to use the tool

* Increase robustness
2025-09-10 15:04:11 +02:00
tstadel
0d09f7b889
feat: add system_prompt to Agent run parameters (#9778)
* enhancement: add system_prompt to Agent run parameters

* add reno

* add test
2025-09-09 18:55:42 +02:00
Abdelrahman Kaseb
34f1a04120
fix: preserve explicit lambda_threshold=0.0 in SentenceTransformersDiversityRanker (#9771)
* fix(rankers): preserve lambda_threshold=0.0 in SentenceTransformersDiversityRanker

* Add tests

* release note

* remove unreachable code, merge tests

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-09-09 09:55:12 +00:00
Sebastian Husch Lee
0592e747f9
feat: Add PipelineTool to streamline using Pipeline as Tools with Agent (#9759)
* Some refactoring and finish TODO for component tool

* Initial addition of PipelineTool

* Add missing files

* Add reno and update example

* Fix usage example, add integration test, improve error messages from SuperComponent

* Add missing license header

* Make it work with async pipeline as well

* Add unit tests

* Fix unit test

* Remove unused import

* Update integration tests and PR comments

* Fix unit tests

* Fix tests and make description required

* Update docstrings

* PR comments
2025-09-09 07:54:24 +00:00
Stefano Fiorucci
ed8649743d
test: attempt to avoid HF API Embedders errors, fail fast when unavoidable (#9766)
* test: better retry configurations for HF API Embedders integration tests

* shorter delay, test only on Ubunt

* try different settings

* fail fast via timeout
2025-09-05 13:15:47 +02:00
Arya Tayshete
efeb985e52
feat(fetcher): support custom request headers in LinkContentFetcher (#9760)
* feat(fetcher): support custom requests in LinkContentFetcher

* feat(fetcher): support custom request headers in LinkContentFetcher + tests

* undo changes in file
2025-09-04 13:31:15 +00:00
David S. Batista
f48789f5fe
feat: raise last good snapshot in PipelineRunTimeError + tests updates (#9758)
* raise last good snapshot in PipelineRunTimeError + tests updates

* adding release notes

* renaming test file

* PR comments + fixing tests
2025-09-03 13:46:33 +02:00
Sebastian Husch Lee
4644785df1
refactor: Some refactoring and finish TODO for component tool (#9751)
* Some refactoring and finish TODO for component tool

* Add docstrings
2025-09-01 12:48:51 +00:00
David S. Batista
6c7ae8f658
feat: pipeline checkpoints crash allow to resume from snapshot (#9743)
* initial PoC idea running

* removing test code

* cleaning up

* wip

* cleaning up demos

* adding more pipelines to test persistence saving

* wip

* wip

* working example for logging components inputs in run time

* reverting to a simpler solution for intermediate results

* cleaning up

* testing that in a crash components outputs/inputs up to the crash point are returned

* adding tests for state persistance in a RAG pipeline

* updataing tests for state persistance in a RAG pipeline

* removing use cases of agent tests

* adding LICENSE header

* adding LICENSE header

* adding release notes

* updating tests for mocked components only

* updating release notes

* adapting PipelineRuntimeError

* cleaning up tests

* fixing test pipeline crash components inputs/outputs are saved

* fixing tests for state persistance

* removing code

* removing code

* removing code

* updating release notes

* validating parameters

* cleaning

* wip: debugging

* removing persistance tests

* formatting

* formatting

* cleaning up code

* updating release notes

* adding missing docstrings

* typo in release notes

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* PR comments

* handling potential issues with saving the snapshot file

* updating tests

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* some more improvements

* fixing exxception

* fixing exception error name conflict

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-09-01 11:22:37 +02:00
Rigved Telang
b17471207d
feat(websearch): add exclude_subdomains parameter to SerperDevWebSearch (#9729)
* feat: add domain filtering with subdomain exclusion to SerperDevWebSearch

- Introduced `exclude_subdomains` parameter to control whether to include subdomains in search results.
- Implemented `_is_domain_allowed` method to enforce domain filtering based on the new parameter.
- Updated tests to verify functionality of domain filtering and subdomain exclusion.

* Fix error in test

* Remove redundant test for `to_dict` method in `TestSerperDevSearchAPI` class

* Fix linting

---------

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-08-29 12:22:02 +02:00
Stefano Fiorucci
95dafdc20b
fix: reintroduce helpful error message in ChatMessage deserialization (#9748)
* fix: reintroduce helpful error message in  deserialization

* fix fmt
2025-08-28 15:27:09 +02:00
David S. Batista
ac6a43f5d3
feat: raise components inputs/outputs during execution if an Exception occurs (#9742)
* initial PoC idea running

* removing test code

* cleaning up

* wip

* cleaning up demos

* adding more pipelines to test persistence saving

* wip

* wip

* working example for logging components inputs in run time

* reverting to a simpler solution for intermediate results

* cleaning up

* testing that in a crash components outputs/inputs up to the crash point are returned

* adding tests for state persistance in a RAG pipeline

* updataing tests for state persistance in a RAG pipeline

* removing use cases of agent tests

* adding LICENSE header

* adding LICENSE header

* adding release notes

* updating tests for mocked components only

* updating release notes

* adapting PipelineRuntimeError

* cleaning up tests

* fixing test pipeline crash components inputs/outputs are saved

* fixing tests for state persistance

* isolating changes

* cleaning

* updating release notes

* addding test for regular pipeline

* small improvements and updating release notes

* cleaning imports

* removing code

* improvements/fixes based on PR comments

* raising pipeline_outputs on async version of Pipeline

* fixing async versions + updating tests

* simplifying tests

* Suggested changes pipeline crash (#9744)

* Suggested changes

* Some cleanup

* Small changes

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-08-27 13:28:34 +02:00
Sebastian Husch Lee
be52c685cd
refactor: Refactor Agent logic for easier readability (#9726)
* Start refactor

* Update run_async to use the new code

* Slight updates

* Refactoring of tests

* Remove messages from execution context

* Cleanup

* More cleanup

* Formatting

* Fix some typing

* ignore typing issues

* Add reno

* Adding docstrings

* Small changes

* docstrings

* Updates

* Update haystack/components/agents/agent.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* PR comments

* PR comments

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-08-21 12:27:57 +00:00
Sebastian Husch Lee
9fae8e3928
fix: Make output_type optional in MetadataRouter.from_dict for YAML loading (#9724)
* Make output type optional in yaml

* Add reno
2025-08-20 09:33:38 +02:00
David S. Batista
2f7cb9e959
!fix: FileTypeRouter raising FileNotFound in a consistently manner (#9710)
* adding raise_on_failure and warning

* adding release notes

* reverting, adding wrongly removed file

* FileNotFoundError is raised both with and without metadata passed

* reverting to raise_on_failure

* Update releasenotes/notes/fix-filetype-router-inconsistencies-b22a3af00059f953.yaml

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* adding warning and updating tests

* adding warning and updating tests

* updating docstring and warning

* updating release notes

* adding extra output key 'failed' and updating tests

* adding missed test file

* Update haystack/components/routers/file_type_router.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* Update haystack/components/routers/file_type_router.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* Update releasenotes/notes/fix-filetype-router-inconsistencies-b22a3af00059f953.yaml

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* test fixes

* remove duplicated tests

* updating log message

* Fix multi file converter

* updating release notes

* Update releasenotes/notes/fix-filetype-router-inconsistencies-b22a3af00059f953.yaml

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* improve relnote

* fixing typing

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-08-19 11:12:14 +02:00
Bohan Qu
919e4930f7
feat: support subclasses of ChatMessage in state schema validation (#9718) 2025-08-18 11:46:01 +02:00
Stefano Fiorucci
d38c32e393
chore: change model and provider for HF API multimodal test (#9715) 2025-08-18 10:00:12 +02:00
Saurabh Lingam
ae6f3bcf7c
fix: fix inconsistent top_k validation in SentenceTransformersDiversityRanker (#9698)
* Fix inconsistent top_k validation in SentenceTransformersDiversityRanker
- change elif to if in run() method to ensure top_k validation always
  runs regardless of whatever top_k comes from init or runtime
- Both scenarios now consistently raise ValueError with descriptive
  message format: 'top_k must be between 1 and X, but got Y'
- Fixes inconsistency where init top_k gave confusing MMR error while
  runtime top_k gave clear validation error

* improvements

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-08-14 17:34:29 +02:00
Michele Pangrazzi
9ce48f9509
fix: raise RuntimeError when AsyncPipeline.run() is called from within an async context (#9712)
* Raise RuntimeError when AsyncPipeline.run() is called from an async context

* Add release note
2025-08-14 15:07:21 +00:00
Stefano Fiorucci
2259fb7b31
fix: fix wrong error message in Sentence Transformers Embedders (#9711) 2025-08-14 14:37:12 +02:00
Sebastian Husch Lee
c7256b2116
feat: Update source_id_meta_field in SentenceWindowRetriever to also accept a list of values (#9699)
* Make source_id_meta_field also work with a list of values

* Fix

* Add reno

* Update docstring

* Add unit test

* Update test

* Adding more tests and simplifying logic

* Simplify
2025-08-13 11:41:59 +02:00
Stefano Fiorucci
8160ea8bfc
feat: ToolInvoker - pass tools in run + general refactoring (#9704)
* draft

* more refactoring

* fixes

* tools in run + tests

* reorganize tests

* refinements

* relnote

* log overridden tools

* more static methods
2025-08-13 10:10:30 +02:00
JohnKagunda
b4bb6bde54
Fix/informative error message (#9661)
* fix: more informative error message when two components connect

* chore: releasenote

* fix: (PipelineBase.connect) disable C901 complexity check using noqa

* fix: (PipelineBase:connect) provided two exceptions: when  is not defined &&  is not defined

* test: added tests for the  related issues

* Update haystack/core/pipeline/base.py

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-08-13 09:39:48 +02:00