Skip to main content

Azure AI Foundry

Use open-source and partner models hosted on Azure AI Foundry (formerly Azure AI Model Catalog) — access Phi, Llama, Mistral, Cohere, and more through Azure’s infrastructure with enterprise compliance. Azure AI Foundry exposes an OpenAI-compatible API, so Agentium connects to it using the standard openai SDK pointed at your Azure endpoint.

Setup

Uses the standard OpenAI SDK:

Factory

string
required
The model name as deployed on Azure AI Foundry (e.g., "Phi-4", "Meta-Llama-3.1-70B-Instruct").
AzureFoundryConfig
Optional configuration. See Config below.

Supported Models

Microsoft Models

Meta Models

Mistral Models

Cohere Models

Browse the full model catalog at Azure AI Foundry. Available models depend on your Azure region and subscription.

Config

string
Azure API key. Falls back to AZURE_API_KEY env var.
string
required
Azure AI Foundry endpoint URL. Falls back to AZURE_ENDPOINT env var. Format: https://<host>.<region>.models.ai.azure.com
string
API version. Falls back to AZURE_API_VERSION env var.

Authentication

Explicit Config


Tool Calling

Tool calling is supported by models that implement function calling (Mistral Large, Llama 3.1, Cohere Command R/R+):
Not all Azure AI Foundry models support tool calling. Phi models and some smaller models may not support function calling. Test with your specific model.

Vision Models

Some Azure AI Foundry models support image input (e.g., Phi-3.5-vision-instruct):

Full Example


Azure AI Foundry vs Other Providers

Use azureFoundry() when you want open-source model quality with Azure enterprise compliance — without managing GPU infrastructure.

Environment Variables


Cross-References