litellm - 💡(How to fix) Fix [Bug]: AzureOpenAIGPT5Config missing is_model_gpt_5_1_model attribute — Azure GPT-5.4 deployment fails with AttributeError [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23031Fetched 2026-04-08 00:38:47
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Error Message

Relevant log output / Error Traceback

Error fetching response: Error: 400 Invalid request format: litellm.APIConnectionError: AzureException APIConnectionError - 'AzureOpenAIGPT5Config' object has no attribute 'is_model_gpt_5_1_model' Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/litellm/main.py", line 1465, in completion optional_params = get_optional_params( **optional_param_args, **non_default_params ) File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 3934, in get_optional_params supported_params = get_supported_openai_params( model=model, custom_llm_provider=custom_llm_provider ) File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/get_supported_openai_params.py", line 45, in get_supported_openai_params return provider_config.get_supported_openai_params(model=model) File "/usr/lib/python3.13/site-packages/litellm/llms/azure/chat/gpt_5_transformation.py", line 49, in get_supported_openai_params if self.is_model_gpt_5_1_model(model) and not self.is_model_gpt_5_2_model(model): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AzureOpenAIGPT5Config' object has no attribute 'is_model_gpt_5_1_model'. Did you mean: 'is_model_gpt_5_2_model'?

Root Cause

Looking at the source code:

  1. AzureOpenAIGPT5Config (in litellm/llms/azure/chat/gpt_5_transformation.py) inherits from both AzureOpenAIConfig and OpenAIGPT5Config.
  2. OpenAIGPT5Config (in litellm/llms/openai/chat/gpt_5_transformation.py) defines is_model_gpt_5_1_model as a @classmethod.
  3. However, at runtime, AzureOpenAIGPT5Config instances cannot resolve is_model_gpt_5_1_model — Python suggests is_model_gpt_5_2_model instead, indicating the method was either removed, renamed, or shadowed during a refactoring/patch. Additionally, gpt-5.4 is not recognized as a valid model variant. The existing model detection methods (is_model_gpt_5_1_model, is_model_gpt_5_2_model) only cover up to GPT-5.2, so GPT-5.4 deployments are not properly handled.

Fix Action

Fix / Workaround

What happened?

version: v1.81.14-stable.gpt-5.4-patch5

When using LiteLLM proxy with an Azure OpenAI GPT-5.4 deployment, all requests fail with an AttributeError on the AzureOpenAIGPT5Config class. The method is_model_gpt_5_1_model is referenced in get_supported_openai_params() but does not exist on the AzureOpenAIGPT5Config object.

Relevant log output / Error Traceback

Error fetching response: Error: 400 Invalid request format: litellm.APIConnectionError: AzureException APIConnectionError - 'AzureOpenAIGPT5Config' object has no attribute 'is_model_gpt_5_1_model'

Root Cause Analysis

Looking at the source code:

  1. AzureOpenAIGPT5Config (in litellm/llms/azure/chat/gpt_5_transformation.py) inherits from both AzureOpenAIConfig and OpenAIGPT5Config.
  2. OpenAIGPT5Config (in litellm/llms/openai/chat/gpt_5_transformation.py) defines is_model_gpt_5_1_model as a @classmethod.
  3. However, at runtime, AzureOpenAIGPT5Config instances cannot resolve is_model_gpt_5_1_model — Python suggests is_model_gpt_5_2_model instead, indicating the method was either removed, renamed, or shadowed during a refactoring/patch. Additionally, gpt-5.4 is not recognized as a valid model variant. The existing model detection methods (is_model_gpt_5_1_model, is_model_gpt_5_2_model) only cover up to GPT-5.2, so GPT-5.4 deployments are not properly handled.

Expected Behavior

  1. The is_model_gpt_5_1_model method should be accessible on AzureOpenAIGPT5Config instances (fix the missing attribute).
  2. GPT-5.4 should be recognized and supported as a valid Azure OpenAI model variant, similar to how gpt-5.1 and gpt-5.2 are supported today.

LiteLLM Version

v1.81.14-stable.gpt-5.4-patch5

Environment

  • Python 3.13
  • Running LiteLLM as a proxy
  • Azure OpenAI provider
  • Model deployment name: gpt-5.4

Model Configuration

model_list:
  - model_name: gpt-5.4
    litellm_params:
      model: azure/gpt-5.4
      api_base: https://<redacted>.openai.azure.com/
      api_key: os.environ/AZURE_API_KEY
      api_version: "2025-01-01-preview"

v1.81.14-stable.gpt-5.4-patch5

Code Example

model_list:
  - model_name: gpt-5.4
    litellm_params:
      model: azure/gpt-5.4
      api_base: https://<redacted>.openai.azure.com/
      api_key: os.environ/AZURE_API_KEY
      api_version: "2025-01-01-preview"


### Relevant log output
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

What happened?

version: v1.81.14-stable.gpt-5.4-patch5

When using LiteLLM proxy with an Azure OpenAI GPT-5.4 deployment, all requests fail with an AttributeError on the AzureOpenAIGPT5Config class. The method is_model_gpt_5_1_model is referenced in get_supported_openai_params() but does not exist on the AzureOpenAIGPT5Config object.

Relevant log output / Error Traceback

Error fetching response: Error: 400 Invalid request format: litellm.APIConnectionError: AzureException APIConnectionError - 'AzureOpenAIGPT5Config' object has no attribute 'is_model_gpt_5_1_model'

Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/litellm/main.py", line 1465, in completion optional_params = get_optional_params( **optional_param_args, **non_default_params ) File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 3934, in get_optional_params supported_params = get_supported_openai_params( model=model, custom_llm_provider=custom_llm_provider ) File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/get_supported_openai_params.py", line 45, in get_supported_openai_params return provider_config.get_supported_openai_params(model=model) File "/usr/lib/python3.13/site-packages/litellm/llms/azure/chat/gpt_5_transformation.py", line 49, in get_supported_openai_params if self.is_model_gpt_5_1_model(model) and not self.is_model_gpt_5_2_model(model): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'AzureOpenAIGPT5Config' object has no attribute 'is_model_gpt_5_1_model'. Did you mean: 'is_model_gpt_5_2_model'?

Received Model Group=gpt-5.4 Available Model Group Fallbacks=None LiteLLM Retried: 2 times, LiteLLM Max Retries: 2

Steps to Reproduce

Root Cause Analysis

Looking at the source code:

  1. AzureOpenAIGPT5Config (in litellm/llms/azure/chat/gpt_5_transformation.py) inherits from both AzureOpenAIConfig and OpenAIGPT5Config.
  2. OpenAIGPT5Config (in litellm/llms/openai/chat/gpt_5_transformation.py) defines is_model_gpt_5_1_model as a @classmethod.
  3. However, at runtime, AzureOpenAIGPT5Config instances cannot resolve is_model_gpt_5_1_model — Python suggests is_model_gpt_5_2_model instead, indicating the method was either removed, renamed, or shadowed during a refactoring/patch. Additionally, gpt-5.4 is not recognized as a valid model variant. The existing model detection methods (is_model_gpt_5_1_model, is_model_gpt_5_2_model) only cover up to GPT-5.2, so GPT-5.4 deployments are not properly handled.

Expected Behavior

  1. The is_model_gpt_5_1_model method should be accessible on AzureOpenAIGPT5Config instances (fix the missing attribute).
  2. GPT-5.4 should be recognized and supported as a valid Azure OpenAI model variant, similar to how gpt-5.1 and gpt-5.2 are supported today.

LiteLLM Version

v1.81.14-stable.gpt-5.4-patch5

Environment

  • Python 3.13
  • Running LiteLLM as a proxy
  • Azure OpenAI provider
  • Model deployment name: gpt-5.4

Model Configuration

model_list:
  - model_name: gpt-5.4
    litellm_params:
      model: azure/gpt-5.4
      api_base: https://<redacted>.openai.azure.com/
      api_key: os.environ/AZURE_API_KEY
      api_version: "2025-01-01-preview"


### Relevant log output

```shell

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.81.14-stable.gpt-5.4-patch5

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To resolve the issue, we need to add the missing is_model_gpt_5_1_model method to the AzureOpenAIGPT5Config class and update the model detection to support GPT-5.4.

Step 1: Add the missing method

Add the following method to the AzureOpenAIGPT5Config class in litellm/llms/azure/chat/gpt_5_transformation.py:

@classmethod
def is_model_gpt_5_1_model(cls, model):
    # implementation to check if the model is GPT-5.1
    pass

Step 2: Update model detection

Update the get_supported_openai_params method in litellm/llms/azure/chat/gpt_5_transformation.py to support GPT-5.4:

def get_supported_openai_params(self, model):
    # existing code...
    if self.is_model_gpt_5_1_model(model) or self.is_model_gpt_5_2_model(model) or model == "gpt-5.4":
        # return supported params for GPT-5.1, GPT-5.2, and GPT-5.4
        pass

Step 3: Add GPT-5.4 model detection

Add a new method to the AzureOpenAIGPT5Config class to detect GPT-5.4 models:

@classmethod
def is_model_gpt_5_4_model(cls, model):
    return model == "gpt-5.4"

Verification

After applying the fixes, verify that the is_model_gpt_5_1_model method is accessible on AzureOpenAIGPT5Config instances and that GPT-5.4 is recognized as a valid Azure OpenAI model variant.

Extra Tips

  • Make sure to update the documentation to reflect the changes.
  • Test the fixes thoroughly to ensure that they do not introduce any new issues.
  • Consider adding additional logging to help diagnose any future issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: AzureOpenAIGPT5Config missing is_model_gpt_5_1_model attribute — Azure GPT-5.4 deployment fails with AttributeError [1 participants]