#Agents
1 messages · Page 1 of 1 (latest)
Yep, that usually means agents.defaults.models got rewritten.
In OpenClaw, agents.defaults.models is the allowlist for what shows up in /model and the model picker. If configure only leaves Anthropic models in there, your openai-codex/* models disappear from the list even though the auth may still exist.
Also, small gotcha: Codex subscription models are openai-codex/*, not openai/*.
Can you paste these?
openclaw --version
openclaw models status
openclaw config get agents.defaults.models
Likely fix:
openclaw configure --section model
Then in the model section, keep both your Codex model and Claude model selected in the allowlist.
If you want to stop restricting the picker entirely, clear the allowlist:
openclaw config unset agents.defaults.models
Then set your default again, for example:
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add anthropic/claude-opus-4-6
Docs:
- https://docs.openclaw.ai/cli/configure
- https://docs.openclaw.ai/concepts/models
- https://docs.openclaw.ai/help/faq#why-do-i-see-model-is-not-allowed-and-then-no-reply
Paste those 3 outputs and I can tell you the exact line causing it.
openclaw configure --section model i cant select both models here
Ah, two things:
-
In that picker, Space selects multiple items, Enter confirms.
If you press Enter on one model, it saves just that one. -
If it still refuses to keep both, skip the wizard and set it directly.
agents.defaults.modelsis just the allowlist.
If you want all available models to show again:
openclaw config unset agents.defaults.models
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add anthropic/claude-sonnet-4-6
openclaw models status
If you want only those two visible in the picker:
openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{},"anthropic/claude-sonnet-4-6":{}}' --strict-json
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models status
Also please paste:
openclaw --version
because on current docs openclaw configure --section model is supposed to be a real multi-select, so if you still can't do it after using Space, that may be version-specific or a bug.
Docs:
no the section models onlyallows to choose one auth provider
Yep, that part is single-provider on purpose. It configures one auth provider per pass, not “all providers at once”.
So the working flow is:
- Add auth for each provider separately
- Then set your model list/defaults separately
Try this:
openclaw models auth login --provider openai-codex
openclaw models auth login --provider anthropic
Then either show everything:
openclaw config unset agents.defaults.models
Or explicitly allow both:
openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{},"anthropic/claude-sonnet-4-6":{}}' --strict-json
Then set default + fallback:
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add anthropic/claude-sonnet-4-6
openclaw models status
So basically: the auth picker is single-select, but OpenClaw itself is not single-provider.
If openclaw models auth login --provider anthropic doesn’t fit your Anthropic auth method, use:
openclaw models auth add
and pick Anthropic there.
Docs:
- https://docs.openclaw.ai/cli/models
- https://docs.openclaw.ai/providers/openai
- https://docs.openclaw.ai/providers/anthropic
If you paste openclaw --version plus openclaw models status, I can tell you the exact clean setup for your case.
I ma using the claude code token path not the actul antropic api so give me accoridiong to that
one thing i already those in auth-profiles
Got it, then use the Claude Code / Claude CLI path, not the Anthropic API-key path.
Use this flow:
openclaw models auth login --provider openai-codex
openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status
That second command is the Claude Code token / Claude CLI route.
Then for the model list:
Option 1, easiest, show everything
openclaw config unset agents.defaults.models
Option 2, keep only Codex + Claude visible
Use the exact Claude model ref from openclaw models status.
For Claude CLI it is often something like claude-cli/claude-sonnet-4-6.
Example:
openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{},"claude-cli/claude-sonnet-4-6":{}}' --strict-json
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add claude-cli/claude-sonnet-4-6
openclaw models status
So for your setup, think of it as:
- Codex auth:
openai-codex - Claude Code auth:
anthropic --method cli - Claude model refs may show up as
claude-cli/*
If you paste the output of:
openclaw models status
I can rewrite the exact commands with your real Claude model name, no guessing.
Docs:
Perfect, that narrows it down.
If they’re already in auth-profiles, then the issue is not auth.
It’s almost certainly the model allowlist/config:
auth-profiles= stored credentialsagents.defaults.models= what actually shows in/modeland the picker
So check these:
openclaw models status
openclaw config get agents.defaults.model --json
openclaw config get agents.defaults.models --json
Fast fix, show all available models again
openclaw config unset agents.defaults.models
openclaw models status
Or explicitly keep both Codex + Claude CLI
Use the exact Claude ref from openclaw models status:
openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{},"claude-cli/claude-sonnet-4-6":{}}' --strict-json
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add claude-cli/claude-sonnet-4-6
openclaw models status
So yeah, having both auth profiles is not enough by itself.
You also need the model list to allow both.
If you paste the output of:
openclaw config get agents.defaults.models --json
openclaw models status
I can tell you the exact line to change.
not cli its claude code token method
Ah, got it, thanks, that changes one important detail:
If you’re using the Anthropic setup-token / Claude Code token method, then use anthropic/* model refs, not claude-cli/*.
So the fix becomes:
Show all models again
openclaw config unset agents.defaults.models
openclaw models status
Or explicitly keep both Codex + Anthropic visible
openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{},"anthropic/claude-sonnet-4-6":{}}' --strict-json
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models fallbacks add anthropic/claude-sonnet-4-6
openclaw models status
So for your auth path:
- Codex =
openai-codex/* - Claude Code token / Anthropic setup-token =
anthropic/*
If you ever need to re-add that auth manually, the token command is:
openclaw models auth paste-token --provider anthropic
But since you already have it in auth-profiles, the real problem is still the agents.defaults.models allowlist hiding one provider.
If you paste:
openclaw config get agents.defaults.models --json
openclaw models status
I can give you the exact final commands with your real Claude model name.
I jus want the claude CLI token method to work
Nice, that’s much simpler then.
If you want only Claude, do this:
openclaw config set agents.defaults.model.primary anthropic/claude-sonnet-4-6
openclaw models fallbacks clear
openclaw config set agents.defaults.models '{"anthropic/claude-sonnet-4-6":{}}' --strict-json
openclaw models status
If you prefer Opus instead, swap it for:
anthropic/claude-opus-4-6
Since you’re on the Anthropic token path, anthropic/* is the right provider prefix.
So yeah, you can just ignore Codex entirely and pin OpenClaw to Claude only.
Small but important distinction:
These are two different Anthropic paths in OpenClaw:
- Claude CLI reuse
openclaw models auth login --provider anthropic --method cli - Anthropic token path (what you seem to mean by Claude Code token)
openclaw models auth paste-token --provider anthropic
If you want the token path, use anthropic/* models, not claude-cli/*.
Exact setup for token method
openclaw models auth paste-token --provider anthropic
openclaw config set agents.defaults.model.primary anthropic/claude-sonnet-4-6
openclaw models fallbacks clear
openclaw config set agents.defaults.models '{"anthropic/claude-sonnet-4-6":{}}' --strict-json
openclaw models status --probe
If you already added the token before, skip the first line.
If you want Opus instead, swap:
anthropic/claude-sonnet-4-6
for:
anthropic/claude-opus-4-6
If it still fails, paste these and I’ll tell you the exact fix:
openclaw --version
openclaw models status --probe
openclaw config get agents.defaults.models --json
clear the auth-prifiles and models completely I will setup using wizard
Yep, you can do that, but one important gotcha:
openclaw reset --scope config+creds+sessions does not remove auth-profiles.json.
If you want a clean auth + model wipe for the wizard, I’d do this instead:
openclaw backup create
openclaw config unset agents.defaults.model
openclaw config unset agents.defaults.models
mv ~/.openclaw/agents/main/agent/auth-profiles.json ~/.openclaw/agents/main/agent/auth-profiles.json.bak
openclaw configure
If you’re not using the default agent, replace main with your agent id.
If you want to nuke everything and start totally fresh, then use: