Skip to main content
Version: 2026 R2

Azure AI Foundry

Azure AI Foundry is Microsoft’s platform for accessing a wide range of AI models — from proven models such as GPT-4o, through cost-efficient options, to newer models such as DeepSeek. It offers enterprise-grade reliability, Microsoft technical support, and seamless integration with the Azure ecosystem.

When to choose Azure AI Foundry

You are already using Azure:

  • your infrastructure runs in Azure,
  • you want centralized cost and subscription management,
  • you need integration with services such as Azure AD, Key Vault, or Application Insights.

You have enterprise requirements:

  • you require high service availability,
  • you need Microsoft technical support,
  • you must comply with internal corporate policies.

You need flexibility in model selection:

  • you want access to OpenAI models such as GPT-4o and GPT-4o-mini,
  • you also want to use open-source models such as DeepSeek, Llama, or Mistral,
  • you want the option to use Model Router for automatic model selection.

You want better cost control:

  • you need shared TPM limits across multiple deployments,
  • you want detailed usage reporting in Azure Cost Management,
  • you need the ability to define budgets and alerts.

Security and compliance are important to you:

  • data remains in the selected Azure region,
  • the platform supports compliance with GDPR and other regulations,
  • you can use private endpoints and VNET integration.

Requirements

  • an Active Azure subscription,
  • an Azure AI Foundry workspace with a deployed model,
  • an API Key and endpoint URL.

Step 1: Prepare your Azure environment

Get access credentials

  1. Log in to Azure Portal.
  2. Go to your Azure AI Foundry workspace.
  3. In the menu, open Keys and Endpoint.
  4. Copy the following values:
    • Key (API Key),
    • Endpoint OpenAI URL.

Deploy a model

  1. In your workspace, go to Deployments.
  2. Click Create new deployment.
  3. Select a model, for example GPT-4o, GPT-4o-mini, or another model that supports the Responses API.
  4. Enter a deployment name (e.g., gpt-4o-mini).
  5. Click Create.
Supported models

Azure AI Foundry supports a variety of models, including:

  • GPT models such as gpt-4o, gpt-4o-mini, gpt-35-turbo,
  • Model-router, which automatically selects the most suitable model,
  • DeepSeek and other models that support responses.

Step 2: Configure AI Proxy

Example aiconfiguration.json

{
"ProviderConnections": {
"AzureFoundry": {
"Description": "Azure AI Foundry Connection",
"Type": "AzureAi",
"ProviderConfiguration": {
"ApiKey": "your-azure-api-key-here",
"Endpoint": "https://your-workspace.openai.azure.com/"
}
}
},
"ProviderModels": [
{
"ConnectionName": "AzureFoundry",
"Priority": 100,
"Name": "Azure GPT-4o-mini",
"Description": "",
"TextModel": {
"ModelName": "gpt-4o-mini"
},
"ImageModel": {
"ModelName": "gpt-4o-mini"
},
"EmbeddingModel": {
"ModelName": "text-embedding-3-small"
}
}
],
"MethodTypesConfiguration": {
"ConciergePrompt": [ "Azure GPT-4o-mini" ],
"ConciergeExecuteTool": [ "Azure GPT-4o-mini" ]
}
}
Important

In the ModelName field, enter the deployment name you created in Azure, not the underlying model name. For example, if your deployment is named my-gpt4, use "ModelName": "my-gpt4".

Example docker-compose.yml

name: aiproxy_containers
services:
ai-proxy:
image: webconbps/aiproxy:1.0.0.235
container_name: ai-proxy
restart: unless-stopped
ports:
- "5298:8080"
- "7033:8081"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- AppConfiguration__SelfHosted__Certificate__Path=/app/https/certificate.pem
- Logging__LogLevel__Default=Information
- Logging__LogLevel__Microsoft=Warning
volumes:
- ./certificates/certificate.pem:/app/https/certificate.pem:ro
- ./aiconfiguration.json:/app/aiconfiguration.json:ro

Step 3: Startup

# Make sure you have prepared files
# - ./certificates/certificate.pem
# - ./aiconfiguration.json (with filled data)

# Run container
docker-compose up -d

# Check logs
docker-compose logs -f ai-proxy

Troubleshooting

Error: 401 Unauthorized

Possible causes:

  • the API key is invalid,
  • the endpoint URL is incorrect.

Solution:

# Check if key and endpoint are correct in aiconfiguration.json
# Verify in Azure Portal > Keys and Endpoint
# Restart container
docker-compose restart ai-proxy

Error: 404 Not Found / Model not found

Possible causes:

  • the value in ModelName does not match the name of an existing deployment,
  • the specified deployment does not exist or is not active.

Solution:

# Check deployment name in Azure Portal > Deployments
# Make sure deployment has "Succeeded" status
# Update ModelName in aiconfiguration.json
# Restart container
docker-compose restart ai-proxy

Error: 429 Too Many Requests

Possible cause:

  • the TPM (Tokens Per Minute) limit for the selected deployment has been exceeded.

Solution:

  • wait a moment before retrying,
  • consider increasing the TPM limit for the deployment in Azure.

When creating a deployment, you can choose from models such as:

  • gpt-4o - the latest model from the GPT-4 Optimized family,
  • gpt-4o-mini - a faster and more cost-efficient variant of gpt-4o,
  • gpt-4-turbo - a GPT-4 model with a larger context window,
  • gpt-35-turbo - a GPT-3.5 family model, listed in Azure as gpt-35-turbo,
  • text-embedding-3-small - a model designed for generating embeddings,
  • model-router - a mechanism for automatically selecting the most suitable model,
  • deepseek and other models that support responses.
info

To work correctly with AI Proxy, a model must support the Responses API.