Managing Models and Auth in OpenClaw
Setting up local environments often feels like a guessing game. You edit a config file, run a command, and hope for the best. If the model doesn’t respond, you’re left wondering if it’s a network issue, a typo, or a dead token.
I’ve spent too much time debugging configuration files when I should have been building. It’s much better to have a direct way to see exactly what your setup looks like and whether your credentials actually work.
What You’ll Need
Section titled “What You’ll Need”- An understanding of Providers and Models.
- Completion of the initial Provider auth setup.
Quick Start
Section titled “Quick Start”I recommend these four steps to get your environment ready in about five minutes.
1. Scan for models
Section titled “1. Scan for models”First, let OpenClaw find what’s available from your installed plugins.
openclaw models scan2. List and choose a model
Section titled “2. List and choose a model”See everything you have access to, then set your primary model.
openclaw models listopenclaw models set <model-or-alias>3. Log in to your provider
Section titled “3. Log in to your provider”Run the auth flow for your specific provider (like OpenAI or Anthropic).
openclaw models auth login --provider <id>4. Verify everything
Section titled “4. Verify everything”Check your resolved defaults and auth status. I use the --probe flag to run a live test against the provider.
openclaw models status --probeTroubleshooting
Section titled “Troubleshooting”If things aren’t working as expected, check these common areas I’ve identified from the documentation.
Model Reference Errors
Section titled “Model Reference Errors”Model refs are parsed by splitting on the first /. If you use a provider like OpenRouter where the model ID also contains a slash, you must include the provider prefix.
- Correct:
openrouter/moonshotai/kimi-k2 - Incorrect:
moonshotai/kimi-k2(This treatsmoonshotaias the provider).
Understanding Auth Markers
Section titled “Understanding Auth Markers”When you run models status, you might see marker(<value>) instead of masked secrets. This appears for non-secret placeholders like OPENAI_API_KEY, minimax-oauth, or ollama-local. It doesn’t mean your key is exposed; it’s just how OpenClaw identifies that specific auth type.
Anthropic Policy Restrictions
Section titled “Anthropic Policy Restrictions”If you are using Anthropic, keep in mind their technical compatibility. They have blocked some subscription usage outside of Claude Code in the past. I suggest verifying their current terms before you commit to a broad implementation.
Probing and Rate Limits
Section titled “Probing and Rate Limits”The --probe flag sends real requests to your providers to verify tokens. While this is the best way to ensure your setup works, it can consume tokens and trigger rate limits. You can control this with:
openclaw models status --probe-concurrency <n> --probe-timeout <ms>If you need help with a specific configuration, check out the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.