#31614 [Bug]: Azure GPT-4.1 rejects both max_tokens and max_completion_tokens simultaneously
## Summary When calling Azure OpenAI's GPT-4.1 model with litellm, the SDK fails with: ``` litellm.BadRequestError: AzureException BadRequestError - Setting 'max_tokens' and 'max_completion_tokens' at the same time is not supported. ```
This error occurs even when the user only explicitly sets one of these parameters - litellm appears to be sending both to Azure simultaneously.
## Error Details ``` Error: litellm.BadRequestError: AzureException BadRequestError - Setting 'max_tokens' and 'max_completion_tokens' at the same time is not supported.
Stack trace: File "/app/.venv/lib/python3.13/site-packages/litellm/llms/azure/azure.py", line 498, in acompletion raise e File "/app/.venv/lib/python3.13/site-packages/litellm/llms/azure/azure.py", line 441, in acompletion headers, response = await self.make_azure_openai_chat_completion_request(...) ```
## Environment - **LiteLLM Version**: main-latest - **Azure OpenAI Model**: GPT-4.1 (gpt-4.1)
## Root Cause Analysis This is related to issue #26322 which shows a similar problem with `azure_ai/mistral-large-3`. The problem appears to be:
1. User sets parameter (e.g., `max_tokens=100`) 2. LiteLLM's parameter handling logic adds…