Models, providers & secrets
Choosing models and runtimes per agent, where provider API keys actually go, and the difference between Secrets and Environment — including the one backup you can't lose.
This page covers what powers an agent (models and gateways) and the two credential stores behind it.
Models & gateways#
Each agent has a model and a runtime gateway. Gateways: OpenClaw (the default), Anthropic, Claude Code, Ollama, and OpenRouter.
Note — Default agents route through OpenClaw even when their model name carries an
openrouter/…prefix — OpenClaw resolves the downstream provider internally. The non-OpenClaw gateways are for agents explicitly routed to them.
Provider API keys — where they go#
Set provider keys (Anthropic, OpenAI, Google, OpenRouter, Z.ai) in Settings → AI & Models → Model Providers.
Warning — Provider keys must go in Model Providers, not the generic Secrets tab. A key saved in Secrets is stored but not wired into the runtime — the agent will keep using the old key and you'll think it's set when it isn't. Same encrypted storage either way; only the Model Providers save routes it.
ChatGPT / Codex subscription#
Instead of a pay-per-token OpenAI API key, you can connect a real ChatGPT Plus/Pro or Codex subscription. In Settings → AI & Models → Model Providers, use Connect on the ChatGPT / Codex row and complete the sign-in. The runtime handles the OAuth flow and refreshes the token itself; damn.dev only records that it's connected, never the token. Agents then run on openai-codex/gpt-5.5, and connecting sets that as the default model for new agents in the workspace.
Tip — Connecting is additive. Your other providers stay available, existing agents keep their current model until you choose Apply to all agents (or change them one at a time), and the subscription falls back to your previous model automatically if it hits its usage cap.
Respects OpenAI's terms — a ChatGPT subscription is licensed for personal use by the subscriber, so damn.dev only lets a connected subscription run agents in a single-user workspace. If a second person joins, agents automatically move off the subscription back to their previous model. To run a team on GPT, connect a company OpenAI API key (billed to the organization) in the same Model Providers panel — it carries no such limit.
Secrets vs. Environment#
Two stores, on purpose:
- Secrets — credentials skills use (API tokens, passwords). Encrypted with AES-256-GCM under
~/.damn-dev/secrets.key. Agents reference them as${KEY}; the value is substituted server-side and never shown to the agent. - Environment — plaintext infrastructure config (paths, infra tokens) read at boot. Plaintext by design — encrypting it with a key sitting in the same directory would add nothing against a host-access threat.
Warning — Losing
~/.damn-dev/secrets.keymeans every secret is permanently unrecoverable. It's the one file with no other backup path. Both stores offer a Download button (the key, and the.env) — use them, and keep the key somewhere off the host. This is your responsibility as the deployer.
Next#
- Per-agent access — granting a secret to specific agents only.
- Architecture, gateways & runtime — how the gateways fit together.