Skip to content

Commit ec2d68e

Browse files
authored
fix(agents): drop parallel_tool_calls param for custom model providers (#2455)
1 parent 10371ad commit ec2d68e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tracecat/agent/llm_proxy/provider_openai.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ def _normalize_openai_unsupported_params(
146146
def _normalize_custom_model_provider_payload(payload: dict[str, Any]) -> None:
147147
if "max_completion_tokens" in payload and "max_tokens" not in payload:
148148
payload["max_tokens"] = payload.pop("max_completion_tokens")
149+
# parallel_tool_calls is not part of the OpenAI spec and causes LiteLLM to
150+
# generate a malformed tool_choice when routing to Bedrock (missing the
151+
# required `type` field). Drop it for custom providers since we cannot
152+
# control how the downstream proxy translates it.
153+
payload.pop("parallel_tool_calls", None)
149154

150155

151156
def _normalize_openai_payload(

0 commit comments

Comments
 (0)