Model version with AzureOpenAI #2304
Unanswered
miguel-arrf
asked this question in
Q&A
Replies: 1 comment
-
|
Yes, that's correct -- in Azure OpenAI, the model version is tied to the deployment. You can't change the model version on an existing deployment. To switch versions, you have two options: Option 1: Create a new deployment (recommended) az cognitiveservices account deployment create \
--name your-openai-resource \
--resource-group your-rg \
--deployment-name gpt4o-0806 \
--model-format OpenAI \
--model-name gpt-4o \
--model-version "2024-08-06" \
--sku-capacity 10 \
--sku-name StandardThen update your code to point to the new deployment name: from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint="https://your-resource.openai.azure.com",
api_key="...",
api_version="2024-10-21",
)
response = client.chat.completions.create(
model="gpt4o-0806", # your new deployment name
messages=[{"role": "user", "content": "Hello"}],
)Option 2: Delete and recreate the deployment If you don't want multiple deployments, delete the existing one and create a new one with the desired version. Be aware this causes downtime. A few things to keep in mind:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have an Azure OpenAI Service deployment where the model version is set to 2024-11-20.
If I want to switch to a different model version (e.g., 2024-08-06), how can I do that?
From what I understand so far, I need to create a new deployment — is that correct, or is there another way to switch versions?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions