Overview
Azure is a cloud provider offering access to OpenAI and Anthropic models through the Azure OpenAI Service. Bifrost performs conversions including:- Deployment mapping - Model identifiers mapped to Azure deployment IDs with version handling
- Authentication modes - API key, Entra ID (Service Principal), or Managed Identity (DefaultAzureCredential) with automatic environment detection
- Model routing - Automatic provider detection (OpenAI vs Anthropic) based on deployment
- v1 API - Uses
/openai/v1/endpoints for all operations except transcription, which uses the classic/openai/deployments/{model}/audio/transcriptions?api-version=...path as the v1 equivalent is not yet available - Custom endpoints - Full control over Azure endpoint configuration
- Multi-model support - Unified interface for OpenAI, Anthropic (via Azure), and Gemini models
- Request/response pass-through - Support for raw request/response bodies for advanced use cases
Supported Operations
Azure-specific: Batch operations and Text Completions are not supported by
Azure OpenAI Service. Responses API is available for both OpenAI and Anthropic models.
Setup & Configuration
Azure requires an endpoint URL, deployment mappings, and authentication configuration. Three authentication methods are supported.The
aliases field (mapping model names to Azure deployment IDs) requires
v1.5.0-prerelease2 or later. On v1.4.x, use deployments inside
azure_key_config instead - see the v1.5.0 Migration
Guide
for details.1. Default Credential (System Identity)
Leavevalue and all Entra ID fields empty. Bifrost calls azidentity.NewDefaultAzureCredential(nil), which tries credential sources in this order:
- Environment variables (
AZURE_CLIENT_ID+AZURE_CLIENT_SECRET+AZURE_TENANT_ID, or certificate/username variants) - Workload Identity (AKS with Workload Identity Federation)
- Managed Identity (Azure VMs, App Service, AKS, Container Instances)
- Azure CLI (
az login) - Azure Developer CLI (
azd auth login)
az login. No credentials need to be stored or rotated.
- Web UI
- API
- config.json
- Go SDK

- Navigate to “Model Providers” → “Configurations” → “Azure”
- Click “Add Key” (or edit an existing key)
- Under Authentication Method, select “Default Credential”
- Set Endpoint: Your Azure OpenAI resource URL (e.g.,
https://your-org.openai.azure.com) - Configure Aliases: Map model names to deployment IDs (e.g.,
gpt-4o→my-gpt4o-deployment) - Save
AZURE_CLIENT_ID/AZURE_CLIENT_SECRET/AZURE_TENANT_ID env vars, or az login for local development.2. Azure Entra ID (Service Principal)
Setclient_id, client_secret, and tenant_id to authenticate with a Service Principal. This takes priority over API key and managed identity.
- Web UI
- API
- config.json
- Go SDK

- Navigate to “Model Providers” → “Configurations” → “Azure”
- Click “Add Key” (or edit an existing key)
- Under Authentication Method, select “Entra ID (Service Principal)”
- Set Client ID: Your Azure Entra ID client ID
- Set Client Secret: Your Azure Entra ID client secret
- Set Tenant ID: Your Azure Entra ID tenant ID
- Set Endpoint: Your Azure OpenAI resource URL
- Set Scopes (Optional): Override the default OAuth scope (
https://cognitiveservices.azure.com/.default). Any configured scopes replace the default entirely - if you customize this field, you must include all required scopes (the default is not automatically added) - Configure Aliases: Map model names to deployment IDs
- Save
- OpenAI models:
Cognitive Services OpenAI User - Anthropic models:
Cognitive Services AI Services User
3. Direct Authentication (API Key)
Provide the Azure API key in thevalue field. Use this for simple setups without managed identity or Service Principal.
- Web UI
- API
- config.json
- Go SDK

- Navigate to “Model Providers” → “Configurations” → “Azure”
- Click “Add Key” (or edit an existing key)
- Under Authentication Method, select “API Key”
- Set API Key: Your Azure API key
- Set Endpoint: Your Azure OpenAI resource URL
- Configure Aliases: Map model names to deployment IDs
- Save
Authentication precedence: (1) Entra ID if
client_id, client_secret,
and tenant_id are all set; (2) API key if value is non-empty; (3)
DefaultAzureCredential (managed identity) if neither is provided.azure_key_config fields:
Key-level fields:
Beta Headers
For Anthropic models on Azure, Bifrost validatesanthropic-beta headers and drops unsupported headers from the request. Azure supports most Anthropic beta features.
Supported: computer-use-*, structured-outputs-*, advanced-tool-use-*, mcp-client-*, prompt-caching-scope-*, compact-*, context-management-*, files-api-*, interleaved-thinking-*, skills-*, context-1m-*, redact-thinking-*
Not supported: fast-mode-*
You can override these defaults per provider via the Beta Headers tab in provider configuration or via beta_header_overrides. See the full support matrix in the Anthropic provider docs.

1. Chat Completions
Request Parameters
Core Parameter Mapping
Authentication Configuration
Azure uses custom endpoint and deployment configuration:- Gateway
- Go SDK
Key Configuration
Azure supports three authentication methods: Managed Identity (DefaultAzureCredential), Entra ID (Service Principal), and Direct (API Key). Precedence: Entra ID (if configured) → API key (ifvalue set) → DefaultAzureCredential.
Managed Identity / DefaultAzureCredential
If no API key and no Entra ID credentials are provided, Bifrost automatically usesDefaultAzureCredential, which
detects the auth environment.
Azure Entra ID (Service Principal)
If you setclient_id, client_secret, and tenant_id, Azure Entra ID authentication will be used with priority over API key authentication.
- For OpenAI models:
Cognitive Services OpenAI User - For Anthropic models:
Cognitive Services AI Services User
Direct Authentication (API Key)
endpoint- Azure OpenAI resource endpoint (required)client_id- Azure Entra ID client ID (optional, for Service Principal auth)client_secret- Azure Entra ID client secret (optional, for Service Principal auth)tenant_id- Azure Entra ID tenant ID (optional, for Service Principal auth)scopes- OAuth scopes for token requests (default:["https://cognitiveservices.azure.com/.default"])use_speech_endpoints- Send speech and transcription requests to Azure AI Speech (optional, defaultfalse; an alias can override it)use_voice_live_endpoints- Send realtime WebSocket sessions to Azure Voice Live (optional, defaultfalse; an alias can override it)aliases- Map of model names to Azure deployment IDs (optional, set at key level)allowed_models- List of allowed models to use from this key (optional)
Deployment Selection
Deployments can be specified at three levels (in order of precedence):-
Per-request (highest priority)
-
Key configuration
- Model name (lowest priority, if no deployment specified) Model name is used as deployment ID directly
OpenAI Models
When using OpenAI models (GPT-4, GPT-4 Turbo, GPT-3.5-Turbo, etc.), Bifrost passes through OpenAI-compatible parameters directly.Parameter Mapping for OpenAI
All OpenAI-standard parameters are supported. Refer to OpenAI documentation for detailed conversion details.Anthropic Models
When using Anthropic models through Azure (Claude 3 family), Bifrost converts requests to Anthropic format.Parameter Mapping for Anthropic
All Anthropic-standard parameters are supported with special handling:- Reasoning/Thinking:
reasoningparameters converted to Anthropic’sthinkingstructure - System messages: Extracted and placed in separate
systemfield - Tool message grouping: Consecutive tool messages merged
Special Notes for Azure + Anthropic
- API version automatically set to
2023-06-01for Anthropic models - Endpoints use
/anthropic/v1/paths internally - Authentication uses
x-api-keyheader for Anthropic models - Minimum reasoning budget: 1024 tokens
Streaming
Streaming uses OpenAI or Anthropic format depending on model type:- OpenAI models: Standard OpenAI streaming with
chat.completion.chunkevents - Anthropic models: Anthropic streaming format with content blocks
2. Responses API
The Responses API is available for both OpenAI and Anthropic models on Azure using the/openai/v1/responses endpoint.
Request Parameters
Core Parameter Mapping
OpenAI Models
For OpenAI models (GPT-4, etc.), conversion follows OpenAI’s Responses API format.Anthropic Models
For Anthropic models (Claude, etc.), conversion follows Anthropic’s message format:instructionsbecomes system messagereasoningmapped tothinkingstructure
Endpoint Configuration
- Gateway
- Go SDK
Special Handling
- Uses
/openai/v1/responsesendpoint - All request body conversions handled automatically
- Supports raw request body passthrough for advanced cases
3. Embeddings
Embeddings are supported for OpenAI models only (not available for Anthropic models on Azure).Request Parameters
- Gateway
- Go SDK
Response Conversion
Embeddings response is passed through directly from Azure OpenAI with standard format:4. Files API
Files operations are supported for OpenAI models only.Supported Operations
Files are stored in Azure and can be used with batch operations.
5. Image Generation
Image Generation is supported for OpenAI models on Azure and uses the OpenAI-compatible format.Request Parameters
Core Parameter Mapping
Azure uses the same conversion as OpenAI (see OpenAI Image Generation):
- Model & Prompt:
bifrostReq.Model→req.Model(mapped to deployment),bifrostReq.Prompt→req.Prompt - Parameters: All other fields from
bifrostReqare embedded directly into the request struct via struct embedding
Configuration
- Gateway
- Go SDK
Response Conversion
- Non-streaming: Azure responses are unmarshaled directly into
BifrostImageGenerationResponsesince Bifrost’s response schema is a superset of OpenAI’s format. All fields are passed through as-is. - Streaming: Azure streaming responses use Server-Sent Events (SSE) format with the same event types as OpenAI (see OpenAI Image Generation Streaming).
Streaming
Image generation streaming is supported and uses OpenAI’s streaming format with Server-Sent Events (SSE).6. Image Edit
Image Edit is supported for OpenAI models on Azure and uses the OpenAI-compatible format. Azure uses the same conversion as OpenAI (see OpenAI Image Edit):- Request Conversion: Uses
openai.HandleOpenAIImageEditRequestwith Azure-specific URL construction - URL Format:
{endpoint}/openai/v1/images/edits - Authentication: Azure API key or OAuth bearer token (via
getAzureAuthHeaders) - Deployment Mapping: Model identifier mapped to Azure deployment ID
- Response Conversion: Same as OpenAI - responses unmarshaled directly into
BifrostImageGenerationResponse - Streaming: Supported via
openai.HandleOpenAIImageEditStreamRequestwith Azure-specific URL and authentication
7. List Models
Request Parameters
None required.Response Conversion
Lists available models/deployments configured in the Azure key. Response includes model metadata, capabilities, and lifecycle status.Caveats
Deployment ID Required
Deployment ID Required
Severity: High Behavior: Model names must map to Azure deployment IDs
Impact: Request fails without valid deployment mapping Code:
azure.go:145-200Model Provider Detection
Model Provider Detection
Severity: Medium Behavior: Automatic detection of OpenAI vs Anthropic
based on model name Impact: Different conversion logic applied
transparently Code:
azure.go:92-114Version Matching for Deployments
Version Matching for Deployments
Severity: Low Behavior: Model version differences ignored when
matching to deployments Impact:
gpt-4 and gpt-4-turbo can map to same
deployment Code: models.go:13-588. Video Generation
Azure routes video generation to OpenAI’s Sora models via the Azure OpenAI-compatible endpoint. All parameters are identical to OpenAI Video Generation. Supported Operations9. Context Compaction
Context compaction is supported for OpenAI models on Azure. It follows the same request and response format as OpenAI Context Compaction. Endpoint:POST /openai/v1/responses/compact
Bifrost routes the request to {endpoint}/openai/v1/responses/compact using the configured Azure deployment. Deployment mapping and authentication (API key, Entra ID, or managed identity) are applied automatically, identical to the Responses API.
10. Decisions
Two kinds of Azure deployment answer/v1/decisions, each on its own endpoint and in its own format:
Bifrost picks the endpoint by model name: a deployment of the
gpt-6-luna family goes to /openai/v1/decisions, and any other deployment to /providers/microsoft/v1/systemone. Azure sends the deployment name as the model, so when your deployment is named differently, map the model name to it with a key alias. Bifrost then recognizes the deployment by the alias name:
gpt-6-luna
POST {endpoint}/openai/v1/decisions in OpenAI’s decisions format, so requests and answers map as on OpenAI, including input_image parts (a base64 data URL or a public HTTPS URL). Authentication (API key, Entra ID, or managed identity) is applied as for every other Azure call, and no api-version is sent. Azure is rolling the endpoint out by region; a deployment in a region without it returns Azure’s own error. See Microsoft’s Decisions API guide for availability and limits.
Microsoft-Decision-1
POST {endpoint}/providers/microsoft/v1/systemone, which uses TypeSafe’s System One format, so questions are converted as on TypeSafe. Authentication (API key, Entra ID, or managed identity) is applied as for every other Azure call, and no api-version is sent. Differences from TypeSafe:
- Text only. An
input_imagepart is rejected by Bifrost with a400; the model would otherwise read it as text. - Strict top-level fields. An extra field forwarded with
x-bf-passthrough-extra-paramscomes back as Azure’s400(Unrecognized request argument supplied). - Limits. Choice questions take 2-255 options and score questions 2-10 levels; the context window is 32,768 tokens.
- No response
id. Azure’sx-request-idis inextra_fields.provider_response_headers.
convert_decision_to_responses on, gpt-6-luna and Microsoft-Decision-1 are still served natively. The complexity router can use Microsoft-Decision-1 as its classifier.
A decision is priced from the model catalog: at the model’s decision rates where it lists them, otherwise at its chat rates. A model the catalog does not list is priced at $0; add a pricing override for the Decisions request type to bill it.
11. Azure AI Speech
use_speech_endpoints sends speech and transcription requests to Azure AI Speech instead of an Azure OpenAI deployment, on the same key and endpoint. Set it in azure_key_config to route every audio request on the key, or on an alias to route one model. An alias value wins over the key’s in both directions. Other requests on the key, such as chat, still go to Azure OpenAI.
The endpoint must be a Foundry (AI Services) resource or a Speech resource with a custom domain. Both *.openai.azure.com and *.cognitiveservices.azure.com work.
An API key is sent as Ocp-Apim-Subscription-Key. Entra ID and managed identity send a bearer token, as for every other Azure call. A key with an explicit models list must list the alias names it serves.
model_id or the requested model on a key with use_speech_endpoints, picks the voice or transcription mode.
Text to speech
Endpoint:POST /v1/audio/speech, sent to {endpoint}/tts/cognitiveservices/v1 as SSML
A voice that already contains
: is sent as is. OpenAI voice names such as alloy are not Azure voices and get a 400.
stream_format: "sse" streams the audio as Azure synthesizes it. usage.input_chars counts characters as Azure bills them: the whole SSML except the <speak> and <voice> tags, with each Chinese character counted twice. Markup Bifrost adds, such as <prosody>, is billed.
Speech to text
Endpoint:POST /v1/audio/transcriptions, sent to {endpoint}/speechtotext/transcriptions:transcribe?api-version=2025-10-15 as an audio part and a JSON definition
LLM Speech and MAI-Transcribe are available only in some regions; other regions answer
400 with Enhanced mode is currently not supported yet.
The response carries
text, duration, language, segments (speaker-labelled when diarized) and words. usage.seconds is the duration rounded up to the second, which is what Azure meters.
12. Azure Voice Live
use_voice_live_endpoints sends realtime WebSocket sessions to Azure Voice Live instead of Azure OpenAI, on the same key and endpoint. Set it in azure_key_config for every realtime session on the key, or on an alias for one model. An alias value wins over the key’s in both directions. Other requests on the key still go to Azure OpenAI.
Endpoint: /v1/realtime (WebSocket), sent to {endpoint}/voice-live/realtime?api-version=2026-04-10&model={model ID} with the key’s API key or Entra token. An alias api_version replaces the default version.
gpt-realtime, gpt-4.1 or phi4-mm-realtime, which needs no deployment. Connect to ws://localhost:8080/v1/realtime?model=azure/gpt-realtime-vl. Events pass through as Voice Live sends them, including object voices such as {"name": "en-US-Ava:DragonHDLatestNeural", "type": "azure-standard"}, azure_semantic_vad, noise suppression, word timestamps, visemes and session.avatar.connect.
- WebRTC (
/v1/realtime/calls) and client secrets (/v1/realtime/client_secrets) answer400: Voice Live signals WebRTC over its own WebSocket and reports usage on the browser’s data channel. - A realtime
intentanswers400. - Turns are priced at the Azure OpenAI rates for the same model name until the model catalog lists Voice Live rates.
13. GPT Live
Azure serves GPT-Live on OpenAI’s wire protocol, so a session’s events, delegation, billing and log row are the same as on OpenAI. Open the session on/v1/live/sessions (a WebSocket, or a POST with an SDP offer for WebRTC) with the azure/ prefix on the voice model:
/openai/v1/live/sessions, the same provider the session’s attach and content routes default to.
Bifrost connects to {endpoint}/openai/v1/live/sessions with the key’s API key or Entra ID token. Both session.model and delegation.responses.model are deployment names on Azure, and Bifrost maps each through the key’s aliases. Azure runs the backend on the voice deployment’s resource, so one key must serve both models, and the key’s endpoint is used even when an alias sets its own.
- Sidebands:
/v1/live/sessions/{session_id}/attachand/openai/v1/live/sessions/{session_id}/attachtake?provider=azureor thex-model-provider: azureheader, and the Azure OpenAI SDK’s user agent selects Azure too. Without any of these, the route uses OpenAI when OpenAI is configured. - Browser permissions: Azure rejects
session.clienton WebRTC create, so Bifrost drops it upstream and appliesallowed_client_eventsandallowed_server_eventsitself on the browser’s data channel. A browser event outside the list gets OpenAI’sevent_not_allowederror and never reaches Azure. Sidebands are not restricted. - Recordings:
/v1/live/sessions/{session_id}/contentanswers400 unsupported_operation. Azure does not store GPT-Live sessions yet and rejectssession.store. - Pricing overrides match the deployment name Bifrost sends, not the alias.
Configuration
HTTP Settings: Max Connections 5000 | Max Idle 60 seconds Endpoint Format:https://{resource-name}.openai.azure.com/openai/v1/{path}
Note: Bifrost uses the Azure OpenAI v1 API. No api-version query parameter is needed.

