Models and Runtimes
Warden selects one runtime backend for a config layer and can use separate model lanes for different kinds of model work.
Runtime
Section titled “Runtime”The runtime selects the backend used for model-backed execution. Configure it
under [defaults]:
[defaults]runtime = "pi"| Runtime | Purpose |
|---|---|
pi |
Default. Runs through Pi. Model values must use provider/<provider-specific-model-id> selectors. |
claude |
Runs through Claude Code. Requires Anthropic API key or Claude Code OAuth auth. |
Runtime selection is global within a config layer. runtime is not currently a
skill-level or trigger-level field.
Offline model catalogs
Section titled “Offline model catalogs”When runtime = "pi", Warden refreshes the selected provider catalog before
model resolution so newly published models are available without a package bump.
Disable that network refresh in durable config:
[defaults]offline = truedefaults.offline is preferred for permanent offline policy. It blocks both
remote skill network fetches and Pi model-catalog refresh. CLI --offline or
WARDEN_OFFLINE does the same for one run.
Pi Model Selectors
Section titled “Pi Model Selectors”When runtime = "pi", configured model values must include a provider prefix:
[defaults.agent]model = "anthropic/claude-sonnet-4-6"Examples:
| Selector | Credential |
|---|---|
openai/gpt-5.5 |
WARDEN_OPENAI_API_KEY |
anthropic/claude-sonnet-4-6 |
WARDEN_ANTHROPIC_API_KEY |
moonshotai/kimi-k3 |
WARDEN_MOONSHOT_API_KEY |
openrouter/moonshotai/kimi-k3 |
WARDEN_OPENROUTER_API_KEY |
fireworks/accounts/fireworks/models/kimi-k2p6 |
WARDEN_FIREWORKS_API_KEY |
groq/llama-3.3-70b-versatile |
WARDEN_GROQ_API_KEY |
openrouter/deepseek/deepseek-v4-pro |
WARDEN_OPENROUTER_API_KEY |
openrouter/deepseek/deepseek-v4-flash |
WARDEN_OPENROUTER_API_KEY |
openrouter/meta-llama/llama-3.3-70b-instruct |
WARDEN_OPENROUTER_API_KEY |
together/meta-llama/Llama-3.3-70B-Instruct-Turbo |
WARDEN_TOGETHER_API_KEY |
Warden splits Pi selectors at the first /. The provider comes before it and the
provider-specific model ID comes after it, so model IDs may contain additional
slashes.
Credential convention: Set WARDEN_{PROVIDER}_API_KEY to authenticate with a provider.
Warden mirrors these to the native {PROVIDER}_API_KEY expected by each SDK at runtime.
If you already have a native provider key set (e.g. OPENAI_API_KEY), Warden will use it
directly and the WARDEN_-prefixed form is not required.
Provider base URLs
Section titled “Provider base URLs”Set WARDEN_{PROVIDER}_BASE_URL to route a Pi provider through a gateway such
as LiteLLM or a corporate proxy. Warden applies the value to the selected Pi
model without changing its provider or model ID.
For example, a LiteLLM-managed router can keep the normal Warden model selector and use a LiteLLM virtual key:
env: WARDEN_ANTHROPIC_API_KEY: ${{ secrets.LITELLM_API_KEY }} WARDEN_ANTHROPIC_BASE_URL: https://litellm.example.com WARDEN_ANTHROPIC_HEADERS: '{"x-litellm-tags":"repo:acme/api,component:review"}' WARDEN_OPENAI_API_KEY: ${{ secrets.LITELLM_API_KEY }} WARDEN_OPENAI_BASE_URL: https://litellm.example.com/v1 WARDEN_OPENAI_HEADERS: '{"x-litellm-tags":"repo:acme/api,component:review"}'Use the LiteLLM root URL for Anthropic models because Pi appends
/v1/messages. Use the /v1 URL for OpenAI models because Pi appends its
OpenAI API path. Do not set both a native provider key and a LiteLLM virtual key
for the same provider.
Set WARDEN_{PROVIDER}_HEADERS to a JSON object when the gateway requires
additional request headers. Warden merges them with the selected Pi model’s
headers, with configured values taking precedence. Every header value must be a
string.
Claude Runtime Models
Section titled “Claude Runtime Models”When runtime = "claude", use the model IDs accepted by Claude Code:
[defaults]runtime = "claude"
[defaults.agent]model = "claude-sonnet-4-6"In GitHub Actions, set WARDEN_ANTHROPIC_API_KEY or provide Claude Code OAuth
auth. Locally, Claude runtime can also use existing Claude Code auth.
Model Lanes
Section titled “Model Lanes”Warden can use different models for different stages:
defaults.agent.model- Main repo-aware skill analysis. Preferred default model field.
defaults.agent.fallbackModel- Main analysis when the agent model’s provider fails. See Fallback Model.
defaults.auxiliary.model- Structured helper calls such as extraction, repair, merging, dedupe, and fix evaluation.
defaults.synthesis.model- Post-analysis synthesis and consolidation. Falls back to
defaults.auxiliary.modelwhen unset.
[defaults]runtime = "pi"
[defaults.agent]model = "anthropic/claude-sonnet-4-6"maxTurns = 30effort = "medium"
[defaults.auxiliary]model = "anthropic/claude-haiku-4-5"effort = "high"maxRetries = 3
[defaults.synthesis]model = "anthropic/claude-opus-4-5"defaults.model and defaults.maxTurns are legacy shorthand for the agent
lane. Prefer defaults.agent.model and defaults.agent.maxTurns in new config.
defaults.agent.effort optionally controls repo-aware skill effort
across runtimes. Supported values are off, low, medium, high, xhigh,
and max. When omitted, Warden sends explicit high adaptive thinking to the
Claude runtime; Pi uses its own default thinking level.
defaults.auxiliary.effort optionally controls reasoning effort for Pi-backed
auxiliary structured calls such as extraction repair, verification, merge,
dedupe, and fix evaluation. When omitted, Pi uses its own default. Claude
structured helper calls currently ignore this field.
Fallback Model
Section titled “Fallback Model”defaults.agent.fallbackModel keeps reviews running when the main model is
over capacity, erroring, or stalled:
[defaults.agent]model = "openrouter/x-ai/grok-4.5"fallbackModel = "openrouter/openai/gpt-5.6-luna"When a hunk fails with a provider error after the runtime’s own retries, Warden reviews that hunk again with the fallback model. After five provider failures in a row on a main model, the rest of the run uses the fallback model for it directly. If the fallback model also fails five hunks in a row, Warden stops the run. A hunk whose answer hits the output token limit gets one best-effort retry on the fallback model that never counts toward stopping the run.
Auth failures and invalid model selectors on the main model still stop the run
immediately. So does a provider spend cap, such as OpenRouter’s “Budget limit
exceeded”: Warden fails with budget_exceeded instead of spending past the cap
on the fallback. If the fallback model fails auth, Warden warns and finishes the
run without it. Auxiliary and synthesis calls keep their own models.
Pick a fallback from a different model vendor than the main model. Routing both
through one gateway, such as OpenRouter, covers model outages but not a gateway
outage. To cover that too, use a direct provider model and set its
WARDEN_{PROVIDER}_API_KEY.
Overrides
Section titled “Overrides”Skills and triggers can override the main agent model:
[[skills]]name = "security-review"model = "anthropic/claude-opus-4-5"
[[skills.triggers]]type = "pull_request"actions = ["opened", "synchronize", "reopened", "labeled"]draft = falselabels = ["Warden"]model = "anthropic/claude-sonnet-4-6"The CLI --model flag and WARDEN_MODEL environment variable are fallbacks.
They only apply when the resolved skill or trigger path does not set a model.
Main agent model precedence, from highest to lowest:
| Source | Notes |
|---|---|
skills.triggers.model |
Most specific. Applies to one trigger. |
skills.model |
Applies to one skill. |
defaults.agent.model |
Preferred global default. |
defaults.model |
Legacy global default. |
--model |
CLI fallback. |
WARDEN_MODEL |
Environment fallback. |
| SDK/runtime default | Used when no explicit model is set. |
Auxiliary and synthesis models only come from [defaults.auxiliary] and
[defaults.synthesis]. They do not inherit skill or trigger model overrides.
Effort is separate from model selection. For local runs,
--effort overrides defaults.agent.effort for that
invocation. Without either setting, each runtime uses its own default.
defaults.auxiliary.effort is independent of --effort and only affects
the auxiliary lane.
Generated Skill Commands
Section titled “Generated Skill Commands”warden build and warden improve use the synthesis lane because they generate
or revise skill artifacts. Their model fallback order is:
| Source | Notes |
|---|---|
defaults.synthesis.model |
Preferred generated-skill model. |
defaults.auxiliary.model |
Fallback when synthesis is unset. |
--model |
CLI fallback for this command. |
WARDEN_MODEL |
Environment fallback. |
| SDK/runtime default | Used when no explicit model is set. |