Azure OpenAI Batch Error

jamahl 0 Reputation points
2025-03-10T14:58:27.21+00:00

I'm encountering an issue with batch processing. The results show an API version error stating: "message": "Model {modelName} is enabled only for API versions 2024-12-01-preview and later".

However, I don't believe there's a way to specify the API version for batch operations in this context. How can I solve this?

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

1 answer

Sort by: Most helpful
  1. Manas Mohanty 1,695 Reputation points Microsoft External Staff
    2025-03-11T14:44:08.57+00:00

    Hi jamahl

    The below error message suggests that 2024-12-01-preview is not supported

    "Model {modelName} is enabled only for API versions 2024-12-01-preview and later".

    Attached below is the API version mentioned as supported Api version here

    Version supported
    Latest GA API release: 2024-10-21
    Latest Preview API release: 2025-01-01-preview

    Reference on API Support

    You can change the API version while initiating the Azure OpenAI Client itself.

    Please use "2024-10-21" api version(GA) while initializing client and let us know.

    import os
    from openai import AzureOpenAI
        
    client = AzureOpenAI(
        api_key=os.getenv("AZURE_OPENAI_API_KEY"),  
        api_version="2024-10-21",
        azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
        )
    

    Reference on Batch processing

    Hope it helps.

    Thank you

    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.