Disable Model Router in Azure Container Apps
Quick Reference - How to disable Model Router and use direct model
Steps to Disable Model Router
Option 1: Delete the Environment Variable (Recommended)
- Azure Portal → Container Apps →
staging-env-api - Configuration → Environment variables
- Find
AZURE_AI_MODEL_ROUTER - Click Delete (trash icon)
- Click Save
- Wait for new revision to deploy (~14 minutes)
Option 2: Set to Empty String
- Azure Portal → Container Apps →
staging-env-api - Configuration → Environment variables
- Find
AZURE_AI_MODEL_ROUTER - Click Edit (pencil icon)
- Set Value to:
""(empty string) - Click Save
- Wait for new revision to deploy (~14 minutes)
Verify Direct Model is Set
Ensure AZURE_AI_DEPLOYMENT is set to your direct model:
- Configuration → Environment variables
- Find
AZURE_AI_DEPLOYMENT - Should be set to:
gpt-5.1-chat(orgpt-5-chatif that’s what worked) - If not set, add it with value:
gpt-5.1-chat
After Deployment
Check backend logs for confirmation:
Should see:
INFO: Using direct model deployment: gpt-5.1-chat (Model Router disabled)
Should NOT see:
INFO: Using Model Router via APIM Gateway: model-router
Test
After deployment completes, test chat:
python3 scripts/test-chat-quick.py --token <JWT_TOKEN> --message "hi"
Chat should now work with the direct gpt-5.1-chat model.
Re-enable Model Router Later
If you want to re-enable Model Router:
- Set
AZURE_AI_MODEL_ROUTERto:model-router - Save and wait for deployment