代理工具调度程序根据批次顺序而不是调用顺序选择写入赢家,这与其自身的文档说明和 #11690 相矛盾
作者: AmirF194创建于 2026年9月5日更新于 2026年9月14日
Describe the bug
_schedule_tool_calls (haystack/components/agents/tool_calling.py) groups a step's tool calls into batches by read-after-write dependency on State keys, and each batch's outputs get merged into State right after that batch finishes. The function's own docstring says a plain write-write overlap with no shared reads keeps outputs merged in call order afterward, and #11690 says the LLM's call order stops mattering for exactly that case. Neither holds once one of the two writers gets pushed into a later batch by an unrelated dependency: the write-write winner ends up decided by which batch a call lands in, not by which call the LLM listed first.
内容来源: deepset-ai/haystack