How to access the OpenAI 2024-11-20 model in a global standard deployment (USA East).

Greg Coyle 0 Reputation points
2025-02-27T16:18:09.79+00:00

We created a GPT-4o deployment. The Deployed Model version version shows 2024-11-20 but the only available model version via the API are 2024-08-01-preview and prior. Passing '2024-11-20' as the model version returns a 404.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,092 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 5,940 Reputation points Microsoft External Staff Moderator
    2025-02-28T17:00:09.0633333+00:00

    Hi Greg Coyle

    I am able to replicate 404 errors with 2024-11-20 version

    but succeeds with 2024-10-21 Api version as mentioned in API-version document.

    Here was my sample code which is giving outputs

    
    import os  
    import base64
    from openai import AzureOpenAI  
    
    endpoint = os.getenv("ENDPOINT_URL", "<endpointurl>")  
    deployment = os.getenv("DEPLOYMENT_NAME", "gpt-4o")  
    subscription_key = os.getenv("AZURE_OPENAI_API_KEY", "<apikey>")  
    
    # Initialize Azure OpenAI Service client with key-based authentication    
    client = AzureOpenAI(  
        azure_endpoint=endpoint,  
        api_key=subscription_key,  
        api_version="2024-10-21",
    )
        
        
    # IMAGE_PATH = "YOUR_IMAGE_PATH"
    # encoded_image = base64.b64encode(open(IMAGE_PATH, 'rb').read()).decode('ascii')
    
    #Prepare the chat prompt 
    chat_prompt = [
        {
            "role": "system",
            "content": [
                {
                    "type": "text",
                    "text": "You are an AI assistant that helps people find information."
                }
            ]
        }
    ] 
        
    # Include speech result if speech is enabled  
    messages = chat_prompt  
        
    # Generate the completion  
    completion = client.chat.completions.create(  
        model=deployment,
        messages=messages,
        max_tokens=800,  
        temperature=0.7,  
        top_p=0.95,  
        frequency_penalty=0,  
        presence_penalty=0,
        stop=None,  
        stream=False
    )
    
    print(completion.to_json())  
    
    

    Hope that helps.

    Thank you.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.