mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Block document query in parallel calls
Reject document_query during parallel tool-call normalization before worker jobs are started. Add prompt guidance so the model avoids batching document_query, and update DOX plus regressions for the new sequential-only contract.
This commit is contained in:
parent
ec3c4cf81b
commit
4714b5dcb9
6 changed files with 21 additions and 0 deletions
|
|
@ -110,6 +110,18 @@ def test_normalize_parallel_tool_calls_rejects_nested_parallel() -> None:
|
|||
)
|
||||
|
||||
|
||||
def test_normalize_parallel_tool_calls_rejects_document_query() -> None:
|
||||
with pytest.raises(ValueError, match="document_query.*parallel"):
|
||||
parallel_tools.normalize_parallel_tool_calls(
|
||||
[
|
||||
{
|
||||
"tool_name": "document_query",
|
||||
"tool_args": {"document": "/tmp/report.pdf"},
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_parallel_jobs_extras_lists_running_and_ready_jobs() -> None:
|
||||
agent = _FakeAgent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue