#Agents

1 messages · Page 1 of 1 (latest)

coarse zephyr
#

I have an issue i have codex ai and also calude models but when i suse openclaw configure and choose a model and then add a second provider claude i lose the open ai codex in models its like i cant configure additionals models

golden forgeBOT
alpine raftBOT
#

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

wind wrenBOT
#

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
coarse zephyr
#

openclaw configure --section model i cant select both models here

wind wrenBOT
#

Ah, two things:

  1. In that picker, Space selects multiple items, Enter confirms.
    If you press Enter on one model, it saves just that one.

  2. If it still refuses to keep both, skip the wizard and set it directly. agents.defaults.models is 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:

coarse zephyr
#

no the section models onlyallows to choose one auth provider

wind wrenBOT
#

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:

  1. Add auth for each provider separately
  2. 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
coarse zephyr
#

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

wind wrenBOT
#

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
#

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 credentials
  • agents.defaults.models = what actually shows in /model and 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.

coarse zephyr
#

not cli its claude code token method

wind wrenBOT
#

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.

coarse zephyr
#

I jus want the claude CLI token method to work

wind wrenBOT
#

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

Docs: https://docs.openclaw.ai/gateway/authentication

coarse zephyr
#

clear the auth-prifiles and models completely I will setup using wizard

wind wrenBOT
#

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: