Resource not found after switch from api_version = "2023-05-15" to "api_version =2023-12-01"

Weisheng Li 25 Reputation points Microsoft Employee
2024-01-09T23:33:07.03+00:00

Hi,

I have received an email "Action required: Update your code to use the latest Azure OpenAI preview API by 2 April 2024"

It states that:

"Required action

To avoid potential service disruptions, update your code that uses any of the retiring Azure OpenAI API versions to use version 2023-12-01 by 2 April 2024."

After switching api_version = "2023-05-15" to "api_version =2023-12-01" in code

client = AzureOpenAI(azure_endpoint =os.getenv("AZURE_OPENAI_ENDPOINT") ,
                     api_key = os.getenv("AZURE_OPENAI_KEY"), 
                     api_version = "2023-05-15") => api_version =2023-12-01

it returns error that {'error': {'code': '404', 'message': 'Resource not found'}}.

The geolocation of the service is Canada East.

Can someone help to resolve it?

Thanks

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

Accepted answer
  1. Saurabh Sharma 23,851 Reputation points Microsoft Employee Moderator
    2024-01-10T01:13:54.97+00:00

    Hi @Weisheng Li

    Welcome to Microsoft Q&A! Thanks for posting the question.

    You need to update your code to 2023-12-01-preview instead of 2023-12-01 as per the documentation.

    User's image

    In addition, the email notification that I received has the following content, which suggest the same -

    User's image

    I have tried this in my environment, and it works as expected.


    Please 'Accept as answer' and Upvote if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.