Skip to content

Models & Providers

This page covers the part of /agent-settings where you decide whether the built-in steward can run and which models it can use.

Enable AI agent

The Enable AI agent toggle turns the built-in Web UI assistant on or off.

You can also enable it through configuration:

bash
export DAGU_AGENT_ENABLED=true

Models Table

When AI agent is enabled, Dagu shows a models table where you can:

  • add a model
  • edit an existing model
  • set the default model
  • delete a model

The table helps you compare:

  • display name
  • provider
  • model ID
  • whether credentials are ready
  • which model is the default

Default Model

The default model is the one the Web UI steward uses unless you override it in a chat session.

Workflow steps with action: agent.run also fall back to this default unless the step sets its own model.

Add Or Edit A Model

The form includes these common fields:

FieldWhat It Means
NameHuman-friendly label shown in the UI
IDStable short name for this saved model, used in the UI, config, and API
ProviderWhich model service Dagu should call
ModelThe provider's actual model name or tag
API KeyCredential for hosted providers; optional for Local unless your proxy requires it
Base URLOptional endpoint override
DescriptionOptional note shown in the UI
Context WindowOptional capacity metadata
Max Output TokensOptional limit metadata
Input Cost / 1M tokensOptional pricing metadata
Output Cost / 1M tokensOptional pricing metadata
Supports ThinkingWhether this model should expose reasoning controls in Dagu
Reasoning EffortDefault reasoning depth when thinking is enabled

On creation, Dagu can generate the ID from the Name. After a model exists, the ID is treated as stable.

Providers In The UI

The provider list may include:

  • Anthropic
  • OpenAI
  • OpenAI Codex
  • Google Gemini
  • OpenRouter
  • OpenCode
  • Local
  • Z.AI

Available providers can expand as Dagu adds support for more backends.

Credential Patterns

Most providers use the API Key field.

The main exception is OpenAI Codex, which uses a ChatGPT Plus/Pro login flow instead of a raw API key. For that path, see OpenAI Subscription.

Local Models

For Ollama and other local servers:

  • choose Provider = Local
  • set Model to the exact local model tag
  • leave Base URL empty or set http://localhost:11434/v1

See Local AI for setup and troubleshooting.

OpenCode

For Kimi, DeepSeek, GLM, Qwen, and other models via an OpenCode subscription:

  • choose Provider = OpenCode
  • set Model to the model ID (e.g. kimi-k2.6, deepseek-v4-pro, glm-5.1)
  • leave Base URL empty (defaults to https://opencode.ai/zen/go/v1)
  • set API Key to your OpenCode API key

Models that support reasoning (Kimi K2, DeepSeek V4 Pro, GLM-5, Qwen3) work with Supports Thinking enabled.

See OpenCode for available models and workflow YAML examples.

A Practical Rule

Not every field matters equally for every provider. Focus on the fields your provider actually needs:

  • hosted models usually need provider, model, and API key
  • local models usually need provider, model, and sometimes base URL
  • pricing and context fields mostly help Dagu label and reason about the model in the UI

Released under the MIT License.