mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
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/<name>' 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 <yassin@berri.ai>
This commit is contained in:
parent
a3bf293610
commit
c293056b38
1 changed files with 8 additions and 0 deletions
|
|
@ -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/<name>"
|
||||
# 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+.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue