Skip to content

Azure OpenAI

Use ArtemisKit with Azure OpenAI Service.

The model field in your scenario is for display purposes only when using Azure OpenAI.

Unlike standard OpenAI, Azure OpenAI uses deployments. The actual model is determined by your Azure deployment configuration, not by what you specify in ArtemisKit.

Create an Azure OpenAI resource in the Azure Portal and deploy a model.

Terminal window
export AZURE_OPENAI_API_KEY="your-key"
export AZURE_OPENAI_RESOURCE_NAME="your-resource-name"
export AZURE_OPENAI_DEPLOYMENT_NAME="your-deployment-name"
export AZURE_OPENAI_API_VERSION="2024-02-15-preview" # Optional
name: my-test
provider: azure-openai
model: gpt-5 # Display only - actual model is your deployment
cases:
- id: example
prompt: "Hello"
expected:
type: contains
values: ["hello"]
mode: any

Configure Azure OpenAI in your artemis.config.yaml:

provider: azure-openai
model: gpt-5 # Display only
providers:
azure-openai:
apiKey: ${AZURE_OPENAI_API_KEY}
resourceName: ${AZURE_OPENAI_RESOURCE_NAME}
deploymentName: ${AZURE_OPENAI_DEPLOYMENT_NAME}
apiVersion: 2024-02-15-preview
timeout: 60000
maxRetries: 2
VariableDescription
AZURE_OPENAI_API_KEYYour Azure OpenAI API key
AZURE_OPENAI_RESOURCE_NAMEYour resource name
AZURE_OPENAI_DEPLOYMENT_NAMEYour deployment name
AZURE_OPENAI_API_VERSIONAPI version (optional)

Common API versions:

  • 2024-02-15-preview (recommended)
  • 2023-12-01-preview
  • 2023-05-15
Error: 401 Unauthorized

Check that:

  • AZURE_OPENAI_API_KEY is correct
  • AZURE_OPENAI_RESOURCE_NAME matches your Azure resource
  • The API key has access to the resource
Error: 404 DeploymentNotFound

Ensure AZURE_OPENAI_DEPLOYMENT_NAME matches an existing deployment in your Azure resource.