feat: only disable parallel tool calls when injectable tools are present#211
feat: only disable parallel tool calls when injectable tools are present#211dannykopping merged 6 commits intomainfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
a0e150e to
b2e4f03
Compare
Signed-off-by: Danny Kopping <danny@coder.com>
b2e4f03 to
732f3d2
Compare
| return | ||
| } | ||
|
|
||
| // Disable parallel tool calls when injectable tools are present to simplify the inner agentic loop. |
There was a problem hiding this comment.
This was somehow missed previously; we weren't setting parallel tool calls to disabled in blocking mode :thinking_face:
…y if injected tools provided Signed-off-by: Danny Kopping <danny@coder.com>
…jected tools provided Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
dannykopping
left a comment
There was a problem hiding this comment.
@ssncferreira thanks for the review! This made me realize there were several shortcomings in both the implementation and the tests. They're now all aligned, and I've updated the description to reflect the desired behaviour.
ssncferreira
left a comment
There was a problem hiding this comment.
LGTM 🌟 super clean, and really like the table in the PR description 🚀
I think we are missing 2 tests from anthropic for:
- injected+builtin, set=enabled
- injected+builtin, set=disabled
But non-blocking
| expectDisableParallel: utils.PtrTo(true), | ||
| expectToolChoiceTypeInRequest: toolChoiceAuto, | ||
| }, | ||
| // Request already has disable_parallel_tool_use set - without injected tools it should be preserved. |
There was a problem hiding this comment.
Nit: I think we might be missing cases for injected+builtin tools with disable_parallel_tool_use explicitly set to true/false. The injected-only and builtin-only cases cover it, but the combination isn't tested.
Signed-off-by: Danny Kopping <danny@coder.com>
Merge activity
|

This PR refines when parallel tool calls are disabled. Previously, the system disabled parallel tool calls whenever any tools were present in a request; now it only disables them when injectable MCP tools are present.
This table describes what happens to the parallel tool call setting across all 3 interceptor types:
(builtin tools mean tools defined in the initial request)