Block document query in parallel calls
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions

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:
Alessandro 2026-06-16 13:27:59 +02:00
parent ec3c4cf81b
commit 4714b5dcb9
6 changed files with 21 additions and 0 deletions

View file

@ -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()