Skip to main content

Supported Providers

ADE supports multiple AI provider categories, configurable in any combination.

Anthropic (Claude)

Default and recommended. Models: claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5. Best for complex reasoning, long-context tasks, and code review.

OpenAI

Supported via the OpenAI API. Models: gpt-4o, gpt-4o-mini, o1, o3. Best for structured output, code completion, and tool use.

OpenRouter

Route to hundreds of models through a single API key. Useful for cost optimization, model comparison, and accessing open-source models (Llama, Mistral, Gemini).

OpenCode

OpenCode runs as a local server process and exposes an OpenAI-compatible endpoint. Supports API key, OpenRouter, and fully local model configurations. See Windsurf / OpenCode for setup.

Local Models

Via Ollama or LM Studio. Point ADE to a local OpenAI-compatible endpoint — no API key required. Best for offline use or privacy-sensitive codebases.

Provider Comparison


Where to Configure Providers

Provider configuration lives in three places:
  1. local.secret.yaml — API keys and endpoint URLs. Never committed to git.
  2. ade.yaml — Default model and budget defaults. Committed to git and shared with your team.
  3. Settings → AI Providers — GUI for adding/rotating keys, testing connections, and setting per-provider defaults. Writes to local.secret.yaml on save.

Setting Up Anthropic (Claude)

1

Get an API key

Go to console.anthropic.com and create an API key. Keys start with sk-ant-.
2

Add the key to local.secret.yaml

Or use Settings → AI Providers → Anthropic → Add API Key.
3

Set the default model in ade.yaml

Available models: claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5.
4

Test the connection

In Settings → AI Providers → Anthropic, click Test Connection. ADE sends a minimal request to the API and reports success or an error with the HTTP status code.

Setting Up OpenAI

1

Get an API key

Go to platform.openai.com and create an API key. Keys start with sk-.
2

Add the key to local.secret.yaml

3

Optionally set OpenAI as default

Available models: gpt-4o, gpt-4o-mini, o1, o3.

Setting Up OpenRouter

OpenRouter provides a single API key that routes to hundreds of upstream models. This is useful for comparing models, accessing open-source models, or optimizing cost by routing different agent types to cheaper models.
OpenRouter model identifiers use the format <provider>/<model-name>. Find the full list at openrouter.ai/models. When using OpenRouter, the model string you set in ade.yaml should use the OpenRouter format, prefixed with openrouter: — for example: openrouter:anthropic/claude-opus-4-7.

Setting Up Local Models (Ollama)

Local models run entirely on your machine. No API key is needed. ADE communicates with locally-running Ollama or LM Studio through their OpenAI-compatible API endpoints.
1

Install and start Ollama

Install Ollama and pull a model:
Ollama listens on http://localhost:11434 by default.
2

Configure the local endpoint in local.secret.yaml

For LM Studio, use http://localhost:1234/v1 (or your configured port).
3

Set a local model as default in ade.yaml

Local models have significantly smaller context windows than cloud models (typically 4K–32K tokens versus 128K–200K). ADE’s context compaction will trigger more frequently. For complex worker runs or large codebases, cloud models are strongly recommended.

Model Reference

Anthropic (Claude)

OpenAI


Permission modes

Chat and Workers share the same permission picker. Each provider exposes a small set of presets that map directly to provider flags.

Claude

Codex (via the Codex CLI)

Codex presets combine --approval-policy and --sandbox. There is no separate “Guarded edit” preset anymore. The previous Guarded edit preset is replaced by Default permissions, which is the same workspace-write sandbox but with the on-request approval policy rather than on-failure. The Codex sandbox in Workers is derived from the chosen mode — the separate sandbox dropdown has been removed from the Worker Permissions editor.

OpenCode

OpenCode follows its own internal permission scheme. Set it to full-auto for the standard preset; override in OpenCode’s config when the project needs a different boundary.

Model Selection by Context

ADE lets you assign different models to AI task categories. This is the recommended approach for cost efficiency: use larger models for planning and review, and cheaper models for routine generation tasks.
For solo developers running many automations, routing routine review or text-generation tasks to a cheaper model and reserving claude-opus-4-7 for planning can reduce monthly spend with minimal quality impact on routine tasks.

Budget Configuration

Budget caps prevent runaway spend from long-running agents or automation loops. Caps are enforced in the main process — when a session reaches its cap, the agent receives a stop signal and the session ends gracefully.
ai.chat.sessionBudgetUsd sets the default budget for chat sessions that read project config. You can still adjust the current session from chat controls when available.
ai.budgets is keyed by ADE feature, such as commit_messages, pr_descriptions, terminal_summaries, narratives, and initial_context. Each entry supports dailyLimit.
Worker monthly budgets are edited in CTO > Team. They are stored with the worker identity, not as defaultBudgetPerWorkerRun in ade.yaml.
Usage-wide monthly caps are managed from Settings → Usage. They are not configured with ai.monthlyBudgetCap in ade.yaml.

Context Compaction

ADE monitors context usage for every active agent session. When usage reaches the configured threshold (default 70%), ADE automatically compacts the context to free space. How compaction works:
  1. ADE identifies the oldest message segments in the context window
  2. A compaction request is sent to summarize those segments into a compact narrative
  3. The summary replaces the original messages in the context
  4. Key details (function signatures, file paths, error messages, agent decisions) are preserved verbatim in the summary
Some providers handle large contexts better than others. If you notice quality degradation at high context usage with a specific provider, lower the compaction threshold for that provider. Per-provider thresholds can be set in Settings → AI → Context Management.

API Key Security

API keys are handled according to ADE’s trust boundary model:
  • Storage: Keys live only in local.secret.yaml on disk. ADE reads them into main process memory at startup.
  • In-memory handling: Once loaded, keys are held in the main process (Electron main) only. They are never passed to the renderer process.
  • SQLite: Keys are never written to ADE’s SQLite database. The database stores session metadata, costs, and audit records — not credentials.
  • Log redaction: Any key value that appears in log output is automatically redacted and replaced with ***.
  • IPC bridge: The preload bridge does not expose any IPC channel that returns raw API key values to the renderer.

Troubleshooting

Your API key is invalid or has been revoked. Verify the key value in local.secret.yaml — ensure there are no leading or trailing spaces, and that the key is for the correct provider. Anthropic keys start with sk-ant-; OpenAI keys start with sk-.
You are hitting the provider’s rate limit. ADE automatically retries with exponential backoff (up to 3 retries). If rate limits are consistently hit, consider: (1) switching to a less popular model tier, (2) upgrading your API plan, or (3) routing some agents through OpenRouter which aggregates capacity.
Your provider account has exhausted its monthly quota. This is separate from ADE’s budget cap — it is a limit set by the provider. Log in to your provider’s billing dashboard to review and increase your quota. ADE will resume automatically once the provider accepts requests again.
The model string in ade.yaml does not match a valid model ID for the configured provider. Check the exact model IDs in the Model Reference table above. Model IDs are case-sensitive.
If using Ollama, confirm that ollama serve is running and that the model is pulled (ollama list). Verify the baseUrl in local.secret.yaml matches the port Ollama is listening on (default 11434). Use Test Connection in Settings → AI Providers → Local to get the exact error.
The agent’s conversation has exceeded the model’s context limit even after compaction. Options: (1) lower the compaction threshold so compaction fires earlier, (2) start a new session (the Lane Pack will provide continuity), (3) switch to a model with a larger context window.

What’s Next

Settings

Configure usage graphs, notification thresholds, and per-agent model overrides.

Permissions

Review the trust boundary model and configure per-agent access rules.

Workers

Learn how model routing rules apply during worker run planning and execution phases.

Permissions

Understand how API keys are protected by ADE’s trust boundary architecture.