From c293056b386c0d21dbe143fda966104c67331f54 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 22 May 2026 20:28:52 +0000 Subject: [PATCH] fix(azure/gpt-5): restore 'user' param after azure/ normalization OpenAIGPTConfig.get_supported_openai_params only adds 'user' when the model is found in litellm.open_ai_chat_completion_models. Normalizing the model to 'azure/' for capability lookups caused that check to miss, dropping 'user' from the supported params list for Azure GPT-5 models. Add it back explicitly, mirroring the existing tool_choice fix. Co-authored-by: Yassin Kortam --- litellm/llms/azure/chat/gpt_5_transformation.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/litellm/llms/azure/chat/gpt_5_transformation.py b/litellm/llms/azure/chat/gpt_5_transformation.py index 5d92815b52b..a13ee9a6e1f 100644 --- a/litellm/llms/azure/chat/gpt_5_transformation.py +++ b/litellm/llms/azure/chat/gpt_5_transformation.py @@ -90,6 +90,14 @@ class AzureOpenAIGPT5Config(AzureOpenAIConfig, OpenAIGPT5Config): if "tool_choice" not in params: params.append("tool_choice") + # Azure OpenAI supports the "user" param for GPT-5 deployments, but the + # grandparent OpenAIGPTConfig only adds it when the model is in + # litellm.open_ai_chat_completion_models. Normalizing to "azure/" + # for capability lookups above causes that check to miss, so add it + # back here. + if "user" not in params: + params.append("user") + # Only gpt-5.2+ has been verified to support logprobs on Azure. # The base OpenAI class includes logprobs for gpt-5.1+, but Azure # hasn't verified support for gpt-5.1, so remove them unless gpt-5.2/5.4+.