Description
Hello,
I would like to specify the api version that Weaviate uses to query the Azure OpenAI endpoint.
From what I read in the discussions here I am not sure where I can specify the api_version - when creating the Collection or as an environment parameter.
If it is an environment parameter for the docker container, what value would it be? Is it
AZURE_OPENAI_API_VERSION
OPENAI_API_VERSION
something else?
Additionally I have the issue that I want to use a “text-embedding-3-large” - which is deployed on azure - with 1536 dimensions. Anyhow, after creating the collection, the “model” parameter of the collection lists the “model” parameter as “text-embedding-3-large”. As far as I found out the model can only be specified in the OpenAI class directly, not in Azure OpenAI. Can I just ignore the wrong “model” parameter of the created collection or will this be an issue?
THANKS
Server Setup Information
Weaviate Server Version:
Deployment Method:
Multi Node? No
Client Language and Version: 1.28
Multitenancy?: No
Hey @franz_hals
Please have a look at:
opened 12:20PM - 05 Mar 25 UTC
bug
### How to reproduce this bug?
When creating a collection using the text2vec_az… ure_openai vectorizer and specifying the parameters:
```
resource_name="RES_HERE",
deployment_id="DEPLOY_ID_HERE"
```
Regardless of what is added in the configuration, the result always defaults to the model text-embedding-3-small and dimensions 1536, instead of the expected model from Azure OpenAI.
Code used to reproduce:
```
from weaviate.classes.config import Configure, Property, DataType
client.collections.create(
"embed",
# Define properties
properties=[
Property(name="embed_desc", data_type=DataType.TEXT),
],
vectorizer_config=[
# Set a named vector
Configure.NamedVectors.text2vec_azure_openai(
resource_name="RESOURCE_NAME",
deployment_id="DEPLOYMENT_ID",
name="embed_descNamedVector",
source_properties=["embed_desc"]
)
]
)
```
OR
```
from weaviate.classes.config import Configure, Property, DataType
client.collections.create(
"CollNam",
# Define properties
properties=[
Property(name="embedding", data_type=DataType.TEXT),
],
vectorizer_config=Configure.Vectorizer.text2vec_azure_openai(
resource_name="RES_HERE",
deployment_id="DEPLOY_ID_HERE"
)
)
```
### What is the expected behavior?
- The vectorizer should respect the resource_name and deployment_id and use the correct Azure OpenAI model.
- The correct configuration reflect on the collection definition.
### What is the actual behavior?
- Despite specifying a different resource_name and deployment_id, the model is always set to text-embedding-3-small and the dimensions remain 1536.
- This occurs consistently across different Weaviate versions.
### Supporting information
- Attached are screenshots demonstrating the issue below.
- The bug persists on multiple setups.
- It also occurs on 1.27 version.
<img width="1425" alt="Image" src="https://github.com/user-attachments/assets/6c214004-6f00-4b0f-bfba-abbae25b1ecb" />
### Server Version
1.29.0
### Weaviate Setup
Single Node
### Nodes count
1
### Code of Conduct
- [x] I have read and agree to the Weaviate's [Contributor Guide](https://weaviate.io/developers/contributor-guide) and [Code of Conduct](https://weaviate.io/service/code-of-conduct)
Let me know if that reflects what you are reporting and feel free to add a comment there in the Github issue if needed.
Regards,
Mohamed Shahin,
Support Engineer
1 Like
Hi Mohamed, thanks for creating the issue - it reflects my experience except that I did not try for bigger vector dimensions than 1536.
1 Like