Set up Azure OpenAI
Connect Bristlenose to an Azure OpenAI deployment.
Azure OpenAI runs the analysis pass against a model deployment in your own Azure subscription, so the analysis runs within your Azure resource rather than against a provider’s shared endpoint.
Before you start
You need an Azure subscription, an Azure OpenAI resource with a model deployed in it, and three values from the Azure portal:
- The resource endpoint, e.g.
https://my-resource.openai.azure.com/ - An API key for the resource
- The deployment name you gave the model (this is used in place of a model name)
Where to find them
- Endpoint and key: open your Azure OpenAI resource in the Azure portal and look for its Keys and Endpoint page. Either of the two keys works.
- Deployment name: it is the name you typed when you deployed the model, listed under the resource’s deployments in Microsoft Foundry. It is not the model’s own name.
Microsoft has been renaming and moving these pages as Azure OpenAI becomes part of Foundry, so a label may differ from the one above. Microsoft’s guide to creating a resource and deploying a model is the current reference. If your organisation manages Azure for you, your administrator can give you the three values.
Azure OpenAI is billed through your Azure subscription, not a credit balance. Costs and quotas are in the Azure portal, under your subscription’s cost management.
Add the configuration
macOS app
- Open Settings (⌘,) and go to the LLM tab.
- Select Azure OpenAI and paste your key into the API Key field.
- In the Azure Settings section, fill in the Endpoint, Deployment name, and API version.
Command line
Set the endpoint and deployment as environment variables, then store the key:
export BRISTLENOSE_AZURE_ENDPOINT=https://my-resource.openai.azure.com/
export BRISTLENOSE_AZURE_DEPLOYMENT=my-deployment-name
bristlenose configure azure
$env:BRISTLENOSE_AZURE_ENDPOINT = "https://my-resource.openai.azure.com/"
$env:BRISTLENOSE_AZURE_DEPLOYMENT = "my-deployment-name"
bristlenose configure azure
The optional BRISTLENOSE_AZURE_API_VERSION defaults to 2024-10-21. In PowerShell a $env: value lasts for that window only; to keep the endpoint and deployment, put them in a .env file.
Unlike the other providers, the Azure key is not verified when you store it, because validation also needs the endpoint and deployment. Verify the whole configuration with bristlenose doctor before a run.
Run an analysis with Azure
bristlenose run interviews --llm azure
Troubleshooting
| Symptom | Cause and fix |
|---|---|
doctor reports a missing value |
All three of endpoint, key, and deployment are required. Check each environment variable is set. |
404 or DeploymentNotFound |
The deployment name must match the name in the Azure portal, not the underlying model name. |
For what is sent to the provider, see Cloud or local AI and Privacy and data.