Skip to main content
Version: 2026 R1

Azure AI Foundry

Azure AI Foundry is Microsoft's platform providing access to multiple AI models - from proven GPT-4o, through economical GPT-3.5-turbo, to the newest models like DeepSeek. It offers enterprise-grade SLA, Microsoft technical support, and easy integration with the Azure ecosystem.

When to choose Azure AI Foundry

Already using Azure:

  • Infrastructure in Azure
  • Centralized cost and subscription management
  • Integration with Azure AD, Key Vault, Application Insights

Enterprise requirements:

  • 99.9% SLA for models
  • Microsoft technical support
  • Compliance with corporate policies

Flexibility in model selection:

  • Access to OpenAI models (GPT-4o, GPT-4o-mini)
  • Open-source models (DeepSeek, Llama, Mistral)
  • Model Router - automatic selection of best model

Cost control:

  • Shared TPM limits for multiple deployments
  • Detailed usage reports in Azure Cost Management
  • Ability to set budgets and alerts

Security and compliance:

  • Data remains in selected Azure region
  • GDPR and other regulations compliance
  • Private endpoints and VNET integration

Requirements

  • Active Azure subscription
  • Azure AI Foundry workspace with deployed model
  • API Key and Endpoint URL

Step 1: Azure preparation

Get access credentials

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

Deploy model

  1. In workspace go to Deployments
  2. Click Create new deployment
  3. Select a model (e.g., GPT-4o, GPT-4o-mini, or other model supporting responses)
  4. Assign a deployment name (e.g., gpt-4o-mini)
  5. Click Create
Supported models

You can use various models available in Azure AI Foundry:

  • GPT models (gpt-4o, gpt-4o-mini, gpt-35-turbo)
  • Model-router (automatic model selection)
  • DeepSeek and other models supporting responses

Step 2: AI Proxy Configuration

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 model name). If you named the deployment 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

Causes:

  • Invalid API Key
  • Invalid Endpoint URL

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

Causes:

  • Deployment name in ModelName is incorrect
  • Deployment doesn't 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

Cause:

  • Exceeded TPM (Tokens Per Minute) limit for deployment

Solution:

  • Wait a moment before next requests
  • Consider increasing TPM limits in Azure for your deployment

When creating deployment you can choose:

  • gpt-4o - newest GPT-4 Optimized model
  • gpt-4o-mini - faster and cheaper version
  • gpt-4-turbo - GPT-4 with larger context
  • gpt-35-turbo - GPT-3.5 model (in Azure called 35 instead of 3.5)
  • text-embedding-3-small - for creating embeddings
  • model-router - automatic selection of best model
  • deepseek and other models supporting responses
info

All models must support responses API to work correctly with AI Proxy.