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 |
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")
)
Hope it helps.
Thank you