#Add others providers and models

1 messages · Page 1 of 1 (latest)

twilit ravineBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

nocturne mapleBOT
#

To use OpenRouter + OpenAI + Anthropic in OpenClaw, you don’t “add providers” in a special registry — you mainly do two things:

  1. Give OpenClaw credentials for each provider
  2. Reference models as provider/model (and if you use a model allowlist, add them there)

1) Add credentials (recommended: on the Gateway host)

Put keys in ~/.openclaw/.env (works reliably even when the Gateway runs as a service):

OPENROUTER_API_KEY=sk-or-...
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...

Then restart:

#
openclaw models status --probe
openclaw models list
  • In chat, use:
    /model/model list (pick a model)

  • Or set via CLI (use real model IDs you picked from /model list):

openclaw models set openrouter/<…>
openclaw models fallbacks add anthropic/<…>
openclaw models fallbacks add openai/<…>

If you hit: “Model … is not allowed”, it means you have an allowlist in agents.defaults.models and you need to add the new models there (or remove the allowlist). Docs: https://docs.openclaw.ai/concepts/models