openai_compat.dart example.
Provider Capabilities
| Provider | Default Model | Default Embedding Model | Capabilities | Notes |
|---|---|---|---|---|
| OpenAI | gpt-4o | text-embedding-3-small | Chat, Embeddings, Vision, Tools, Streaming | Full feature support |
| OpenAI Responses | gpt-5 | text-embedding-3-small | Chat, Embeddings, Vision, Tools, Streaming, Thinking | Includes built-in server-side tools |
| Anthropic | claude-sonnet-4-0 | - | Chat, Vision, Tools, Streaming, Thinking | Extended thinking with token budgets |
gemini-2.5-flash | text-embedding-004 | Chat, Embeddings, Vision, Tools, Streaming, Thinking | Extended thinking with dynamic budgets | |
| Mistral | mistral-large-latest | mistral-embed | Chat, Embeddings, Tools, Streaming | European servers |
| Cohere | command-r-plus | embed-english-v3.0 | Chat, Embeddings, Tools, Streaming | RAG-optimized |
| Ollama | llama3.2:latest | - | Chat, Tools, Streaming | Local models only |
| OpenRouter | google/gemini-2.5-flash | - | Chat, Vision, Tools, Streaming | Multi-model gateway |
openai_compat.dart example. You can still use them by registering them with
Agent.providerFactories.
Provider Configuration
| Provider | Provider Prefix | Aliases | API Key | Provider Type |
|---|---|---|---|---|
| OpenAI | openai | - | OPENAI_API_KEY | OpenAIProvider |
| OpenAI Responses | openai-responses | - | OPENAI_API_KEY | OpenAIResponsesProvider |
| Anthropic | anthropic | claude | ANTHROPIC_API_KEY | AnthropicProvider |
google | gemini, googleai | GEMINI_API_KEY | GoogleProvider | |
| Mistral | mistral | - | MISTRAL_API_KEY | MistralProvider |
| Cohere | cohere | - | COHERE_API_KEY | CohereProvider |
| Ollama | ollama | - | None (local) | OllamaProvider |
| OpenRouter | openrouter | - | OPENROUTER_API_KEY | OpenAIProvider |
Setup
Usage
Find Providers
Custom Config
Custom Headers
All providers support custom HTTP headers for enterprise scenarios like authentication proxies, request tracing, or compliance logging:Check Capabilities
UseProvider.listModels() for runtime capability discovery:
Model Kinds
Models are categorized by their kind viaModelKind:
chat- Chat conversationsembeddings- Vector embeddingsmedia- Media generation (images, documents, etc.)
Typed Output With Tools
ThetypedOutputWithTools capability indicates a provider can handle both
function calling and structured JSON output in the same request:
| Provider | Support | Implementation |
|---|---|---|
| OpenAI | ✅ | Native response_format |
| OpenAI Responses | ✅ | Native response_format |
| Anthropic | ✅ | return_result tool |
| ✅ | Double agent orchestrator | |
| OpenRouter | ✅ | OpenAI-compatible |
| Ollama | ❌ | Coming soon |
| Cohere | ❌ | API limitation |
openai_compat.dart example.
Anthropic’s approach uses the return_result tool pattern. This is a
special tool that allows the model to return a structured JSON response. This
is handled automatically by the Anthropic provider.
Google’s approach uses a transparent two-phase workflow: Phase 1 executes
tools, Phase 2 requests structured output. This is handled automatically by the
Google provider.

