Skip to main content

LLM Providers

Microsoft Agent Framework supports multiple LLM providers, giving you the flexibility to choose the best model for your use case. Whether you’re using Azure OpenAI, OpenAI, Anthropic, AWS Bedrock, or local models with Ollama, the framework provides a consistent API across all providers.

Supported Providers

Azure OpenAI

Enterprise-grade OpenAI models hosted on Azure

OpenAI

Direct integration with OpenAI’s API

Anthropic

Claude models via Anthropic’s API

Other Providers

AWS Bedrock, Ollama, GitHub Copilot, and more

Choosing a Provider

When selecting a provider, consider:
  • Enterprise requirements: Azure OpenAI offers enterprise-grade SLAs, compliance, and regional deployment
  • Model capabilities: Different providers offer different models with varying capabilities (reasoning, vision, function calling)
  • Cost: Pricing varies significantly between providers and models
  • Latency: Geographic proximity and infrastructure affect response times
  • Privacy: Some providers offer better data privacy guarantees
  • Local development: Ollama enables local development without API costs

Common Patterns

All providers follow a consistent pattern in the framework:

Chat Clients

Most providers offer a chat client for direct chat completion:

Assistant/Agent Providers

Some providers offer persistent agents with managed state:

Authentication

Authentication varies by provider:
For production deployments, always use managed identities or secure credential management rather than API keys in code.

Configuration

Providers can be configured via:
  1. Environment variables - Most providers read from environment variables by default
  2. Constructor parameters - Explicit configuration overrides environment variables
  3. Settings classes - Pydantic settings for structured configuration (Python)

Environment Variables

Common environment variables:

Streaming Support

All providers support streaming responses:

Function Calling

Most providers support function calling (tool use):
Not all models support function calling. Check the provider documentation for model capabilities.

Model Capabilities

Next Steps

Explore the provider-specific documentation for detailed setup instructions, authentication patterns, and advanced features:

Azure OpenAI

Enterprise-grade models with Azure integration

OpenAI

Latest GPT models directly from OpenAI

Anthropic

Claude models with advanced capabilities

Other Providers

Bedrock, Ollama, GitHub Copilot, and more