BerriAI/litellm · error · UnsupportedParamsError
Azure does not support '{value}' as a {param} param, for api
Error message
Azure does not support '{value}' as a {param} param, for api_version={api_version}. To drop 'tool_choice=required' for calls with this Azure API version, set `litellm.drop_params=True` or for proxy:
`litellm_settings:
drop_params: true`
Azure API Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions What it means
Error "Azure does not support '{value}' as a {param} param, for api_version={api_version}. To drop 'tool_choice=required' for calls with this Azure API version, set `litellm.drop_params=True` or for proxy: `litellm_settings: drop_params: true` Azure API Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/azure/chat/gpt_transformation.py:203
if (
api_version_year < "2023"
or (api_version_year == "2023" and api_version_month < "12")
or (api_version_year == "2023" and api_version_month == "12" and api_version_day < "01")
):
if litellm.drop_params is True or (drop_params is not None and drop_params is True):
pass
else:
raise UnsupportedParamsError(
status_code=400,
message=f"""Azure does not support 'tool_choice', for api_version={api_version}. Bump your API version to '2023-12-01-preview' or later. This parameter requires 'api_version="2023-12-01-preview"' or later. Azure API Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions""",
)
elif value == "required" and (
api_version_year == "2024" and api_version_month <= "05"
): ## check if tool_choice value is supported ##
if litellm.drop_params is True or (drop_params is not None and drop_params is True):
pass
else:
raise UnsupportedParamsError(
status_code=400,
message=f"Azure does not support '{value}' as a {param} param, for api_version={api_version}. To drop 'tool_choice=required' for calls with this Azure API version, set `litellm.drop_params=True` or for proxy:\n\n`litellm_settings:\n drop_params: true`\nAzure API Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions",
)
else:
optional_params["tool_choice"] = value
elif param == "response_format" and isinstance(value, dict):
_is_response_format_supported_model = self._is_response_format_supported_model(model)
if api_version_year is None or api_version_month is None:
is_response_format_supported_api_version = True
else:
is_response_format_supported_api_version = self._is_response_format_supported_api_version(
api_version_year, api_version_month
)
is_response_format_supported = (
is_response_format_supported_api_version and _is_response_format_supported_model
)
View on GitHub (pinned to 6c2dcb801b)
Solutions
- Use a supported tool_choice value for this api_version or set drop_params=True.
When it happens
Trigger: Thrown at litellm/llms/azure/chat/gpt_transformation.py:203 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/edc4a4af16246451.
Report an issue: GitHub.