# Generative-openai module is using a deprecated API version - Azure stopping support on 2 April 2024

**URL:** <https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403>\
**Category:** Support\
**Created:** [February 6, 2024, 7:30pm UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403 "2024-02-06T19:30:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixthekraut](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/felixthekraut/32/134_2.png) [@felixthekraut](https://forum.weaviate.io/u/felixthekraut)\
**Post date:** [February 6, 2024, 7:30pm UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403/1 "2024-02-06T19:30:11Z")

</div>

I logged a bug about this a few days ago ([link](https://github.com/weaviate/weaviate/issues/4126)) but wanted to post here as well to raise awareness. It is my understanding that if action isn’t taken soon Azure customers will no longer be able to use the generative-openai module.

### Description

### How to reproduce this bug?

The generative-openai module is using a deprecated API version for chat completions. Azure has notified its customers that the `2023-03-15-preview` version is deprecated and will be [fully retired (aka no longer accept API requests) on 2 April 2024](https://review.learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation?branch=pr-en-us-256331#retiring-soon). Azure is advising to migrate to `2023-12-01-preview`.

The `2023-03-15-preview` version is referenced in [https://github.com/weaviate/weaviate/blob/192abf0c71d9a2d1a39b233ba374167343014d59/modules/generative-openai/clients/openai.go#L42](https://github.com/weaviate/weaviate/blob/192abf0c71d9a2d1a39b233ba374167343014d59/modules/generative-openai/clients/openai.go#L42)

My recommendation is to upgrade to the new API version before the end of February in order to allow Azure users at least one month (March) to upgrade their Weaviate instances.

### What is the expected behavior?

Utilize `2023-12-01-preview` API version and avoid service disruptions for users leveraging Azure.

### What is the actual behavior?

The generative-openai module uses the `2023-03-15-preview` version and will cease to function for Azure customers on 2 April 2024.

### Supporting information

For context, here is the email Azure sent to its customers:

> Update your code to use the latest Azure OpenAI Service preview API by 2 April 2024  
> You’re receiving this email because you’ve used an older Azure OpenAI Service preview API in the last 30 days.  
> We recently made Azure OpenAI API [version 2023-12-01-preview](https://review.learn.microsoft.com/azure/ai-services/openai/api-version-deprecation?branch=pr-en-us-256331) available. You’ll need to update any code that uses the following older versions before they’re [retired](https://review.learn.microsoft.com/azure/ai-services/openai/api-version-deprecation?branch=pr-en-us-256331) on 2 April 2024:  
> • 2023-03-15-preview  
> • 2023-06-01-preview  
> • 2023-07-01-preview  
> • 2023-08-01-preview  
> • 2023-09-15-preview  
> The 2023-12-01 preview version includes improvements such as support for DALL-E 3.0 and enhanced content filtering.  
> Required action  
> To avoid potential service disruptions, [update your code](https://learn.microsoft.com/azure/ai-services/openai/reference) that uses any of the retiring Azure OpenAI API versions to use version 2023-12-01 by 2 April 2024.

### Server Version

1.23.7

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [February 7, 2024, 7:51pm UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403/2 "2024-02-07T19:51:35Z")

</div>

Hi @felixthekraut !

Thanks for pointing it out.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [February 7, 2024, 8:00pm UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403/3 "2024-02-07T20:00:35Z")

</div>

We have code merged for that already:

> <https://github.com/weaviate/weaviate/pull/4124>
>
> \### What's being changed:
> 
> This PR adds the ability to define \`baseURL\` when u…ser uses Azure (closes #4092).
> 
> \### Review checklist
> 
> \- \[\] Documentation has been updated, if necessary. Link to changed documentation:
> \- \[\] Chaos pipeline run or not necessary. Link to pipeline:
> \- \[\] All new code is covered by tests where it is reasonable.
> \- \[\] Performance tests have been run or not necessary.

---

<div class="post-metadata">

**Author:** ![felixthekraut](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/felixthekraut/32/134_2.png) [@felixthekraut](https://forum.weaviate.io/u/felixthekraut)\
**Post date:** [February 7, 2024, 10:05pm UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403/4 "2024-02-07T22:05:04Z")

</div>

Thank you, I appreciate the quick work!

---

<div class="post-metadata">

**Author:** ![Krisbiantoro\_Prabowo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/krisbiantoro_prabowo/32/606_2.png) [@Krisbiantoro\_Prabowo](https://forum.weaviate.io/u/Krisbiantoro_Prabowo)\
**Post date:** [March 14, 2024, 2:36am UTC](https://forum.weaviate.io/t/generative-openai-module-is-using-a-deprecated-api-version-azure-stopping-support-on-2-april-2024/1403/5 "2024-03-14T02:36:57Z")

</div>

sorry if i’m reopening the discussions, i’m just wondering since i received the same notification from Azure. I look up into text2vec-openai modules and it looks like the modules still using the `api-version=2022-12-01` version. Can we safely ignore the warning notification and still using this version for text2vec-openai modules?
