[Bugfix] Preserve Anthropic disable_parallel_tool_use (#52021)

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
Taneem Ibrahim
2026-08-13 08:25:55 -04:00
committed by GitHub
parent 5fee0a872d
commit d0ae25e2f2
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -95,6 +95,7 @@ class AnthropicToolChoice(BaseModel):
type: Literal["auto", "any", "tool", "none"]
name: str | None = None
disable_parallel_tool_use: bool | None = None
@model_validator(mode="after")
def validate_name_required_for_tool(self) -> "AnthropicToolChoice":
+3
View File
@@ -539,6 +539,9 @@ class AnthropicServingMessages(OpenAIServingChat):
req.tool_choice = None
return
req.parallel_tool_calls = (
not anthropic_request.tool_choice.disable_parallel_tool_use
)
tool_choice_type = anthropic_request.tool_choice.type
if tool_choice_type == "auto":
req.tool_choice = "auto"