You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LiteLLM sends parallel_tool_calls without tools to Azure OpenAI #4326
Have you searched for related issues? Yes; I did not find a report for this request-shape error.
Describe the bug
LitellmModel forwards parallel_tool_calls=False to litellm.acompletion even when the final request has no tools or handoffs.
Azure OpenAI rejects that request before generation:
BadRequestError: Invalid value for 'parallel_tool_calls':
'parallel_tool_calls' is only allowed when 'tools' are specified.
The adapter already suppresses parallel_tool_calls=True when tools is empty, but the False branch does not apply the same tool-presence check.
This was independently encountered through Strix and is also tracked by usestrix/strix#951.
Debug information
Agents SDK version: 0.19.4
Related library versions: LiteLLM 1.96.0, OpenAI Python 2.53.0
Python version: 3.14
Operating system: macOS
Model and model provider: Azure OpenAI through LiteLLM
Does the issue reproduce with the latest Agents SDK release? Yes
Does the issue occur consistently or intermittently? Consistently
Repro steps
Configure an Azure OpenAI LiteLLM route, then make a tool-less model request with parallel tool calls explicitly disabled:
fromagents.extensions.models.litellm_modelimportLitellmModelfromagents.model_settingsimportModelSettingsfromagents.models.interfaceimportModelTracingmodel=LitellmModel(model="azure/<deployment>")
awaitmodel.get_response(
system_instructions="You are a helpful assistant.",
input="Reply with OK.",
model_settings=ModelSettings(parallel_tool_calls=False),
tools=[],
output_schema=None,
handoffs=[],
tracing=ModelTracing.DISABLED,
)
The adapter calls LiteLLM with both tools=None and parallel_tool_calls=False, and Azure returns HTTP 400.
Expected behavior
When the final converted tool list is empty, the adapter should pass parallel_tool_calls=None so LiteLLM omits the field from the provider request. Explicit True or False values should remain unchanged when tools or handoffs are present.
Activity