provider/model-name string, or define named models in a top-level models map for reuse and fine-grained configuration.
Inline model references
The quickest way to assign a model is theprovider/model-name shorthand directly on the agent:
agent.yaml
<provider-key>/<model-name>.
Named models
For reusable configuration or advanced options, define models in the top-levelmodels section and reference them by name:
agent.yaml
Model fields
Provider identifier. See supported providers below.
Model name as understood by the provider (e.g.,
claude-sonnet-4-0, gpt-4o).Randomness of responses. Range 0.0 (deterministic) to 1.0 (creative). Provider defaults apply when omitted.
Maximum number of tokens in the model’s response.
Nucleus sampling probability. Range 0.0 to 1.0.
Reduces repetition of token sequences. Range 0.0 to 2.0.
Encourages the model to introduce new topics. Range 0.0 to 2.0.
Controls how much the model reasons before responding. Accepts a string effort level or an integer token count. See thinking budget below.
Custom API endpoint. Useful for proxies, gateways, or self-hosted models.
Environment variable name containing the API token. Overrides the provider default.
Whether the model can issue multiple tool calls in a single turn.
Arbitrary provider-specific options passed through to the API.
Supported providers
| Provider | Key | Example models | API key env var |
|---|---|---|---|
| OpenAI | openai | gpt-4o, gpt-5, gpt-5-mini | OPENAI_API_KEY |
| Anthropic | anthropic | claude-sonnet-4-0, claude-sonnet-4-5 | ANTHROPIC_API_KEY |
google | gemini-2.5-flash, gemini-3-pro | GOOGLE_API_KEY | |
| AWS Bedrock | amazon-bedrock | Claude, Nova, Llama models | AWS credentials |
| Docker Model Runner | dmr | ai/qwen3, ai/llama3.2 | None (local) |
| Mistral | mistral | Mistral models | MISTRAL_API_KEY |
| xAI | xai | Grok models | XAI_API_KEY |
Thinking budget
Control how much the model reasons before responding. The accepted values depend on the provider:| Provider | Format | Values | Default |
|---|---|---|---|
| OpenAI | string | minimal, low, medium, high | medium |
| Anthropic | integer | 1024–32768 tokens | 8192 |
| Gemini 2.5 | integer | 0 (off), -1 (dynamic), or token count | -1 (dynamic) |
| Gemini 3 | string | minimal, low, medium, high | varies |
| All | string | none or 0 to disable thinking | — |
agent.yaml
Fallback models
Configure fallback models on an agent for automatic failover when the primary is unavailable:agent.yaml
Alloy models
You can assign multiple models to a single agent by comma-separating them. Docker Agent alternates between them turn by turn, leveraging the strengths of each:agent.yaml
Multi-provider teams
Different agents in the same config can use different providers. Use named models to keep the config readable:dev-team.yaml
Agents in a multi-agent config can freely mix providers. This lets you use fast cheap models for simple tasks and powerful models only where needed.
Next steps
Model providers
Setup guides for every supported provider.
Model configuration reference
Full reference for model config fields.
Multi-Agent
Use different models for different agent roles.
Agents
How agents use models and configure fallbacks.