#Model Aliases

1 messages · Page 1 of 1 (latest)

magic lotus
#

How can I set aliases for the mode? The current one is so messy and I wanna make it organized. Also, how to check the current names? Do step by step

Version: OpenClaw 2026.4.22 (00bd2cf)
WSL2 Win 11

glad sunBOT
south atlasBOT
#

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

glad sunBOT
storm inletBOT
#

Let me verify the exact commands and config keys so I don’t send you on a wild goose chase.

#

Yep, this is model aliases.

1. Check what you have right now

Current default model

openclaw models status

Current aliases

openclaw models aliases list

Configured model IDs you can point aliases at

#
openclaw models list

If you want the chat version too, use:

/model list

2. Add a clean alias

Pick the exact provider/model from step 1, then run:

openclaw models aliases add <alias> <provider/model>
#

Example pattern:

openclaw models aliases add work <provider/model>

3. Verify it

openclaw models aliases list

4. Use the alias

In chat:

/model work
#

Or in CLI:

openclaw models set work

5. Remove an old alias

openclaw models aliases remove <old-alias>

6. If you prefer editing the config manually

In WSL2, the file is:

#
~/.openclaw/openclaw.json

Aliases live under:

agents.defaults.models["provider/model"].alias

Example shape:

{
  agents: {
    defaults: {
#
      models: {
        "provider/model": { alias: "work" }
      }
    }
  }
}

Notes

  • Alias names can use letters, numbers, ., _, :, and -
  • Your custom alias overrides a built-in one with the same name
  • You usually do not need to restart after changing aliases

Docs:
https://docs.openclaw.ai/concepts/models

magic lotus
#

GIve me preset to run to set exact model Aliases which I provide you, you just take the model names first. do step by step

storm inletBOT
#

Yep, let’s do it cleanly.

Step 1, get the exact model names

Run this in WSL:

openclaw models list --plain

Step 2, check your current aliases

Run:

openclaw models aliases list

Step 3, send me both outputs in this format

#
CURRENT MODELS:
<paste output from openclaw models list --plain>

CURRENT ALIASES:
<paste output from openclaw models aliases list>

WANTED ALIASES:
chat = ...
code = ...
fast = ...
smart = ...

If you don’t know the exact model IDs yet, that’s fine, just give me the nickname plan, like:

magic lotus
#

Hold up. first know my model names and current alises and tell me which I can change to what. one step at a time

storm inletBOT
#

Good call. Step 1 only:

Run this in WSL and paste the full output here:

openclaw models list --plain

That gives me your exact configured model names. After you paste it, I’ll give you Step 2 for current aliases.

magic lotus
#

I can't paste it here but I get it what I have,

storm inletBOT
#

No problem.

I can’t see your local model list from here, so we’ll do it on your machine, one step at a time.

Step 2

Run:

openclaw models aliases list

What to check

You’ll see lines like:

- gpt -> openai/gpt-5.4
#
- code -> openai-codex/gpt-5.4

Just note these two things for yourself:

  1. which aliases already exist
  2. which ones look messy / you want to rename

Reply with just this

You do not need to paste everything. Just tell me:

I have aliases already

or

#
No aliases configured

Then I’ll give you Step 3.

magic lotus
#

Aliases (5): - OpenRouter -> openrouter/auto - opus -> anthropic/claude-opus-4-7 - sonnet -> anthropic/claude-sonnet-4-6 - GPT -> openai/gpt-5.4 - gpt-mini -> openai/gpt-5.4-mini

storm inletBOT
#

Nice, that helps.

What you have now

  • OpenRouteropenrouter/auto
  • opusanthropic/claude-opus-4-7
  • sonnetanthropic/claude-sonnet-4-6
  • GPTopenai/gpt-5.4
  • gpt-miniopenai/gpt-5.4-mini

What I’d clean up

I’d make them all lowercase and consistent:

  • OpenRouteropenrouter
  • GPTgpt
  • keep opus
  • keep sonnet
  • keep gpt-mini
#

So yes, you can change those two messy ones first:

  • OpenRouter can become openrouter
  • GPT can become gpt

Step 3

Tell me just this:

Use those names

or tell me your preferred replacements for:

  • OpenRouter
  • GPT

Then I’ll give you the exact next command, one step only.

magic lotus
#

OpenRouter Auto
Claude opus 4.7
Claude Sonnet 4.6
OpenAI GPT 5.4
OpenAI GPT 5.4 Mini

I want it like this

storm inletBOT
#

Small gotcha, you can’t use spaces in model aliases.

So these exact names won’t work:

  • OpenRouter Auto
  • Claude opus 4.7
  • Claude Sonnet 4.6
  • OpenAI GPT 5.4
  • OpenAI GPT 5.4 Mini

Use these instead:

  • openrouter-auto
  • claude-opus-4.7
  • claude-sonnet-4.6
  • openai-gpt-5.4
  • openai-gpt-5.4-mini
#

Step 1

Run this first:

openclaw models aliases add openrouter-auto openrouter/auto

If that works, send “done” and I’ll give you Step 2.

magic lotus
#

OpenRouter-Auto
Claude opus-4.7
Claude Sonnet-4.6
OpenAI GPT-5.4
OpenAI GPT-5.4 Mini

Then this

storm inletBOT
#

Almost, but spaces still break it.

These are valid:

  • OpenRouter-Auto
  • Claude-opus-4.7
  • Claude-Sonnet-4.6
  • OpenAI-GPT-5.4
  • OpenAI-GPT-5.4-Mini

I’d still recommend lowercase for cleanliness:

  • openrouter-auto
  • claude-opus-4.7
  • claude-sonnet-4.6
  • openai-gpt-5.4
  • openai-gpt-5.4-mini
magic lotus
#

openclaw models aliases add OpenRouter-Auto openrouter/auto 🦞 OpenClaw 2026.4.22 (00bd2cf) — Say "stop" and I'll stop—say "ship" and we'll both learn a lesson. Config overwrite: /home/wrakeeb/.openclaw/openclaw.json (sha256 14591e00692e0f8dbf8d9853a621e0cd630fa47623fedb8ecfed5ddb5532c7d6 -> 74324dab85488e1b8b04f84964133fb347938e405a471b19efd6e62eff794314, backup=/home/wrakeeb/.openclaw/openclaw.json.bak) Updated ~/.openclaw/openclaw.json Alias OpenRouter-Auto -> openrouter/openrouter/auto

storm inletBOT
#

I’m checking why it doubled the provider so I can give you the safe next step, not guess.

#

Yep, that weird line is an OpenRouter Auto quirk. The alias is fine.

Also, one important bit: each model keeps one alias, so this will replace opus for that model.

Step 2

Run this next:

openclaw models aliases add Claude-opus-4.7 anthropic/claude-opus-4-7

If that works, send done and I’ll give you Step 3.

magic lotus
#

Ok let's go with

openrouter-auto
claude-opus-4.7
claude-sonnet-4.6
openai-gpt-5.4
openai-gpt-5.4-mini

storm inletBOT
#

Perfect. Run these one by one in WSL:

Step 1

openclaw models aliases add openrouter-auto openrouter/auto

Step 2

openclaw models aliases add claude-opus-4.7 anthropic/claude-opus-4-7

Step 3

openclaw models aliases add claude-sonnet-4.6 anthropic/claude-sonnet-4-6
#

Step 4

openclaw models aliases add openai-gpt-5.4 openai/gpt-5.4

Step 5

openclaw models aliases add openai-gpt-5.4-mini openai/gpt-5.4-mini

Step 6, verify

openclaw models aliases list

You should end up with:

#
  • openrouter-auto
  • claude-opus-4.7
  • claude-sonnet-4.6
  • openai-gpt-5.4
  • openai-gpt-5.4-mini

Two quick notes:

  • This replaces the old alias on each model, it does not keep both.
  • On openrouter/auto, 2026.4.22 may print a weird success line like openrouter/openrouter/auto. That’s just a display quirk.

Docs: https://docs.openclaw.ai/concepts/models https://docs.openclaw.ai/cli/models

If you want, after you run step 6 I can help you make them even shorter and cleaner too.

magic lotus
#

Aliases (6): - OpenRouter -> openrouter/auto - claude-opus-4.7 -> anthropic/claude-opus-4-7 - claude-sonnet-4.6 -> anthropic/claude-sonnet-4-6 - openai-gpt-5.4 -> openai/gpt-5.4 - openai-gpt-5.4-mini -> openai/gpt-5.4-mini - openrouter-auto -> openrouter/openrouter/auto

storm inletBOT
#

Nice, you’re basically done. The only messy part left is OpenRouter.

Your 4 others are correct already:

  • claude-opus-4.7
  • claude-sonnet-4.6
  • openai-gpt-5.4
  • openai-gpt-5.4-mini

The duplicate OpenRouter line is a 2026.4.22 quirk with models aliases add on openrouter/auto.

Next step, fix the real OpenRouter alias

Run this:

openclaw config set 'agents.defaults.models["openrouter/auto"].alias' "openrouter-auto"
magic lotus
#

how can I clear the alises so I can see the rdefault. Remove all alises

storm inletBOT
#

Yep. One important gotcha:

  • models aliases remove removes your custom alias
  • for some models, built-in default aliases can come back (opus, sonnet, gpt, gpt-mini)

So if you want to go back to defaults, do this.

Step 1, remove the aliases you currently have

Run these one by one:

openclaw models aliases remove OpenRouter
openclaw models aliases remove openrouter-auto
openclaw models aliases remove claude-opus-4.7
openclaw models aliases remove claude-sonnet-4.6
openclaw models aliases remove openai-gpt-5.4
#
openclaw models aliases remove openai-gpt-5.4-mini

Step 2, check what remains

openclaw models aliases list

What you should expect

You’ll likely see the built-in defaults come back for these:

  • opus
  • sonnet
  • gpt
  • gpt-mini
magic lotus
#

How can i remove claude API from y OpenClaw?

#

openclaw models aliases list

storm inletBOT
#

Let me verify the exact removal paths so I don’t give you stale auth advice.

#

If by “Claude API” you mean Anthropic auth, do this:

Option A, just stop using Claude

This is the safer one.

  1. See what model is active:
openclaw models status
  1. Switch to a non-Anthropic model from your list:
openclaw models list --plain
openclaw models set <provider/model>
  1. If you also have Anthropic fallbacks, remove them from ~/.openclaw/openclaw.json.
#

Option B, fully remove Anthropic from OpenClaw

Do all of these:

1. Find where Anthropic auth is coming from

Check:

openclaw models status --probe

Also, /model status shows the active agent and which auth-profiles.json is in use.

2. Remove Anthropic env keys

If you put keys in ~/.openclaw/.env, remove any of these lines:

#
ANTHROPIC_API_KEY=...
ANTHROPIC_API_KEYS=...
ANTHROPIC_API_KEY_1=...
ANTHROPIC_API_KEY_2=...
OPENCLAW_LIVE_ANTHROPIC_KEY=...

3. Remove Anthropic config values, if you set them in config

Only if they exist:

openclaw config unset env.ANTHROPIC_API_KEY
openclaw config unset models.providers.anthropic.apiKey

4. Remove stored Anthropic profiles

#

Open the active file:

~/.openclaw/agents/<agentId>/agent/auth-profiles.json

Then delete entries under profiles where the provider is anthropic.

5. Clear Anthropic auth order override

openclaw models auth order clear --provider anthropic

6. Restart the gateway

openclaw gateway restart
#

Yep, that command is just for showing your current aliases:

openclaw models aliases list

If you want cleaner output:

openclaw models aliases list --plain

But this does not remove Claude/Anthropic auth.

If your goal is to remove Claude API from OpenClaw, the next command should be:

#
openclaw models status --probe

That shows whether Anthropic is coming from:

  • ~/.openclaw/.env
  • auth-profiles.json
  • config

Run that next.

magic lotus
#

common hold up, step by step, one step at a time

I added Claude API but I don't need it anymore and don't wanna see it in my model list. Basically remove the API key and models

storm inletBOT
#

Yep, one step only.

Step 1

Run this in WSL:

openclaw models status --probe-provider anthropic

That tells us where Claude is coming from before we remove anything.

Reply with just the Anthropic result, and don’t paste any API key. Then I’ll give you Step 2.

magic lotus
#
openclaw models status --probe-provider anthropic                                                                                                                                                                                                                                                   🦞 OpenClaw 2026.4.22 (00bd2cf) — Deployed locally, trusted globally, debugged eternally.                                                                                                                                                                                                                                   Config        : ~/.openclaw/openclaw.json                                                                                                                     Agent dir     : ~/.openclaw/agents/main/agent                                                                                                                 Default       : openai/gpt-5.4-mini                                                                                                                           Fallbacks (9) : openrouter/auto, openrouter/openai/gpt-5.4-mini, anthropic/claude-opus-4-7, anthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-sonnet-20240229, anthropic/claude-sonnet-4-6, anthropic/claude-sonnet-4-5, anthropic/claude-3-5-sonnet-20240620, anthropic/claude-sonnet-4-0                           Image model   : -                                                                                                                                             Image fallbacks (0): -                                                                                                                                        Aliases (4)   : opus -> anthropic/claude-opus-4-7, sonnet -> anthropic/claude-sonnet-4-6, gpt -> openai/gpt-5.4, openai-gpt-5.4-mini -> openai/gpt-5.4-mini   Configured models (12): openrouter/auto, openrouter/openai/gpt-5.4-mini, anthropic/claude-opus-4-7, anthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-sonnet-20240229, anthropic/claude-sonnet-4-6, anthropic/claude-sonnet-4-5, anthropic/claude-3-5-sonnet-20240620, anthropic/claude-sonnet-4-0, openai/gpt-5.4, openai/gpt-5.4-mini, openrouter/openrouter/auto                                                                                                    Auth overview                                                                                                                                                 Auth store    : ~/.openclaw/agents/main/agent/auth-profiles.json                                                                                              Shell env     : off                                                                                                                                           Providers w/ OAuth/tokens (0): -                                                                                                                              - anthropic effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | anthropic:default=sk-ant-a...n0O_PQAA                                                                                                                                                          - elevenlabs effective=env:d97bbfd5...26c81b9b | env=d97bbfd5...26c81b9b | source=env: ELEVENLABS_API_KEY                                                     - openai effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openai:default=sk-proj-...DWL08pYA | env=sk-proj-...DWL08pYA | source=env: OPENAI_API_KEY                                                                                                         - openrouter effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1...ec8af903                                   OAuth/token status     

storm inletBOT
#

Good, we found it.

Your Claude key is coming from:

~/.openclaw/agents/main/agent/auth-profiles.json

Not from shell env.

Step 2

Open that file locally:

nano ~/.openclaw/agents/main/agent/auth-profiles.json
magic lotus
#

im in, next?

storm inletBOT
#

Yep, next step only:

Step 3

Inside that file, find the entry for:

"anthropic:default"

and delete that entire profile block only.

Leave your other profiles like OpenAI/OpenRouter alone.

It will be under the profiles section and look roughly like:

#
"anthropic:default": {
  "provider": "anthropic",
  ...
}

Delete that whole entry, then reply:

deleted
magic lotus
#

},                                                                                                                                                            "anthropic:default": {                                                                                                                                          "type": "api_key",                                                                                                                                            "provider": "anthropic",                                                                                                                                      "key": "sHIDDEN" 

It shows like this

storm inletBOT
#

Yep, that’s the one.

Step 4

Delete the entire anthropic:default block, from:

"anthropic:default": {

through its closing:

}

Also make sure the commas still make valid JSON after deleting it.

#

Then save in nano:

  • Ctrl+O
  • Enter
  • Ctrl+X

Reply with:

saved
magic lotus
#

Now look like this:

{                                                                                                                                                               "version": 1,                                                                                                                                                 "profiles": {                                                                                                                                                   "openrouter:default": {                                                                                                                                         "type": "api_key",                                                                                                                                            "provider": "openrouter",                                                                                                                                     "key": "HIDDEN"                                                                          },                                                                                                                                                            "openai:default": {                                                                                                                                             "type": "api_key",                                                                                                                                            "provider": "openai",                                                                                                                                         "key": "HIDDEN>    }                                                                                                                                                           }                                                                                                                                                           }                                                                                                                                                                  

storm inletBOT
#

Looks right. Don’t paste that file again, it has secrets.

Step 5

Save and exit nano:

  • Ctrl+O
  • Enter
  • Ctrl+X

Then reply:

saved
magic lotus
#

saved

storm inletBOT
#

Nice.

Step 6

Run this to confirm the Claude key is gone:

openclaw models status --probe-provider anthropic

You should not see profiles=1 for anthropic anymore.

Paste just the Anthropic part, then I’ll give you the next one step to remove the Anthropic models from your config.

magic lotus
#

openclaw models status --probe-provider anthropic                     🦞 OpenClaw 2026.4.22 (00bd2cf) — Like having a senior engineer on call, except I don't bill hourly or sigh audibly.                                                                                                                                                                                                        Config        : ~/.openclaw/openclaw.json                                                                                                                     Agent dir     : ~/.openclaw/agents/main/agent                                                                                                                 Default       : openai/gpt-5.4-mini                                                                                                                           Fallbacks (9) : openrouter/auto, openrouter/openai/gpt-5.4-mini, anthropic/claude-opus-4-7, anthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-sonnet-20240229, anthropic/claude-sonnet-4-6, anthropic/claude-sonnet-4-5, anthropic/claude-3-5-sonnet-20240620, anthropic/claude-sonnet-4-0                           Image model   : -            Image fallbacks (0): -                                                                                                                                        Aliases (4)   : opus -> anthropic/claude-opus-4-7, sonnet -> anthropic/claude-sonnet-4-6, gpt -> openai/gpt-5.4, openai-gpt-5.4-mini -> openai/gpt-5.4-mini   Configured models (12): openrouter/auto, openrouter/openai/gpt-5.4-mini, anthropic/claude-opus-4-7, anthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-sonnet-20240229, anthropic/claude-sonnet-4-6, anthropic/claude-sonnet-4-5, anthropic/claude-3-5-sonnet-20240620, anthropic/claude-sonnet-4-0, openai/gpt-5.4, openai/gpt-5.4-mini, openrouter/openrouter/auto                                 Auth overview                                                                                                                                                 Auth store    : ~/.openclaw/agents/main/agent/auth-profiles.json                                                                                              Shell env     : off                                                                                                                                           Providers w/ OAuth/tokens (0): -                                                                                                                              - elevenlabs effective=env:d97bbfd5...26c81b9b | env=d97bbfd5...26c81b9b | source=env: ELEVENLABS_API_KEY                                                     - openai effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openai:default=sk-proj-...DWL08pYA | env=sk-proj-...DWL08pYA | source=env: OPENAI_API_KEY                                                                                                         - openrouter effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1...ec8af903                                    Missing auth                                                                                                                                                  - anthropic Run `openclaw models auth login --provider anthropic`, `openclaw configure`, or set an API key env var.                                                                                                                                                                                                         OAuth/token status                                                                                                                                            - none                                                                                                 

storm inletBOT
#

Perfect, the key is gone. The Missing auth - anthropic line is expected now.

Step 7

Run this:

grep -n 'anthropic/' ~/.openclaw/openclaw.json

Paste the output here. That will show the Anthropic model lines we need to remove next, without dumping the whole config.

magic lotus
#
grep -n 'anthropic/' ~/.openclaw/openclaw.json                                                                                        8:        "anthropic/claude-opus-4-7": {},                                                                                                                    9:        "anthropic/claude-3-5-sonnet-20241022": {},                                                                                                         10:        "anthropic/claude-3-sonnet-20240229": {},                                                                                                          11:        "anthropic/claude-sonnet-4-6": {},                                                                                                                 12:        "anthropic/claude-sonnet-4-5": {},                                                                                                                 13:        "anthropic/claude-3-5-sonnet-20240620": {},                                                                                                        14:        "anthropic/claude-sonnet-4-0": {},                                                                                                                 26:          "anthropic/claude-opus-4-7",                                                                                                                     27:          "anthropic/claude-3-5-sonnet-20241022",                                                                                                          28:          "anthropic/claude-3-sonnet-20240229",                                                                                                            29:          "anthropic/claude-sonnet-4-6",                                                                                                                   30:          "anthropic/claude-sonnet-4-5",                                                                                                                   31:          "anthropic/claude-3-5-sonnet-20240620",                                                                                                          32:          "anthropic/claude-sonnet-4-0"              

storm inletBOT
#

Nice, that’s exactly what we needed.

Step 8

Open your config file:

nano ~/.openclaw/openclaw.json

Reply with:

opened

Then I’ll give you the next single step to remove those Anthropic model lines cleanly.

magic lotus
#

opened

storm inletBOT
#

Perfect.

Step 9

In ~/.openclaw/openclaw.json, delete only these 7 lines from the models section:

"anthropic/claude-opus-4-7": {},
"anthropic/claude-3-5-sonnet-20241022": {},
"anthropic/claude-3-sonnet-20240229": {},
"anthropic/claude-sonnet-4-6": {},
"anthropic/claude-sonnet-4-5": {},
"anthropic/claude-3-5-sonnet-20240620": {},
"anthropic/claude-sonnet-4-0": {},

Leave the OpenAI and OpenRouter lines alone.

#

When that’s done, reply:

first block deleted
magic lotus
#
{                                                                                                                                                               "agents": {                                                                                                                                                     "defaults": {                                                                                                                                                   "workspace": "/home/wrakeeb/.openclaw/workspace",                                                                                                             "models": {                                                                                                                                                     "openrouter/auto": {},                                                                                                                                        "openrouter/openai/gpt-5.4-mini": {},                                                                                                                         "anthropic/claude-opus-4-7": {},                                                                                                                              "anthropic/claude-3-5-sonnet-20241022": {},                                                                                                                   "anthropic/claude-3-sonnet-20240229": {},                                                                                                                     "anthropic/claude-sonnet-4-6": {},                                                                                                                            "anthropic/claude-sonnet-4-5": {},                                                                                                                            "anthropic/claude-3-5-sonnet-20240620": {},                                                                                                                   "anthropic/claude-sonnet-4-0": {},                                                                                                                            "openai/gpt-5.4": {},                                                                                                                                         "openai/gpt-5.4-mini": {                                                                                                                                        "alias": "openai-gpt-5.4-mini"                                                                                                                              },                                

Which ones?

storm inletBOT
#

These 7 Anthropic lines only:

"anthropic/claude-opus-4-7": {},
"anthropic/claude-3-5-sonnet-20241022": {},
"anthropic/claude-3-sonnet-20240229": {},
"anthropic/claude-sonnet-4-6": {},
"anthropic/claude-sonnet-4-5": {},
"anthropic/claude-3-5-sonnet-20240620": {},
"anthropic/claude-sonnet-4-0": {},

Leave these alone:

"openrouter/auto": {},
#
"openrouter/openai/gpt-5.4-mini": {},
"openai/gpt-5.4": {},
"openai/gpt-5.4-mini": { ... }

After deleting those 7 lines, reply:

first block deleted
magic lotus
#

how can i delete the lines fast?

storm inletBOT
#

Easiest way in nano:

Do this

Put your cursor on the first Anthropic line:

"anthropic/claude-opus-4-7": {},

Then press:

Ctrl+K

7 times

#

Ctrl+K cuts the whole current line, so that’s the fastest safe way here.

After the 7 Anthropic lines are gone, reply:

first block deleted
magic lotus
#

first block deleted

{ "agents": { "defaults": { "workspace": "/home/wrakeeb/.openclaw/workspace", "models": { "openrouter/auto": {}, "openrouter/openai/gpt-5.4-mini": {}, "openai/gpt-5.4": {}, "openai/gpt-5.4-mini": { "alias": "openai-gpt-5.4-mini"

storm inletBOT
#

Nice. Don’t paste the file again, it can contain secrets.

Step 10

Now find the fallbacks list and delete these same 7 Anthropic entries there too:

"anthropic/claude-opus-4-7",
"anthropic/claude-3-5-sonnet-20241022",
"anthropic/claude-3-sonnet-20240229",
"anthropic/claude-sonnet-4-6",
"anthropic/claude-sonnet-4-5",
"anthropic/claude-3-5-sonnet-20240620",
"anthropic/claude-sonnet-4-0"

Fastest way again:

  • put cursor on the first Anthropic fallback line
#
  • press Ctrl+K 7 times

Then reply:

fallbacks deleted
magic lotus
#

Done, there's no line of Claude

#

Done, there's no line of Claude

storm inletBOT
#

Good. Next step only:

Step 11

Save and exit nano:

  • Ctrl+O
  • Enter
  • Ctrl+X

Then reply:

saved
magic lotus
#

saved

storm inletBOT
#

Nice. One more step so OpenClaw fully reloads both changes.

Step 12

Run:

openclaw gateway restart

Then reply:

restarted
magic lotus
#

hurray!, It's gone

storm inletBOT
#

Nice 🎉 Claude auth and Claude models are out now.

If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it for the next person.

If you want, next we can do one tiny cleanup pass on the remaining model aliases.

magic lotus
#

Now, back to Aliases section to set and remove

storm inletBOT
#

Yep, let’s do aliases again, one step at a time.

Step 1

Run:

openclaw models aliases list --plain

Paste the output here, and then I’ll give you Step 2 to either:

  • remove the ones you don’t want, or
  • add the new ones you want.

Docs: https://docs.openclaw.ai/cli/models

magic lotus
#

openclaw models aliases list --plain

storm inletBOT
#

Yep, that’s the right command.

Step 1

Run:

openclaw models aliases list --plain

Then paste the output here, and I’ll give you Step 2 only. If it’s long, just paste the alias lines.

magic lotus
#
openclaw models aliases list --plain                                                                                                                                                                                                                                                                                                                                                  🦞 OpenClaw 2026.4.22 (00bd2cf) — I'll butter your workflow like a lobster roll: messy, delicious, effective.                                                                                                                                                                                                                                                                                                 gpt openai/gpt-5.4                                                                                                                                                                                     openai-gpt-5.4-mini openai/gpt-5.4-mini 

clear these now

storm inletBOT
#

Yep. Small gotcha, gpt is a built-in default alias, so the clean fix is to disable both aliases explicitly.

Step 1

Run these:

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' '""' --strict-json
openclaw config set 'agents.defaults.models["openai/gpt-5.4-mini"].alias' '""' --strict-json

That disables:

  • gpt
  • openai-gpt-5.4-mini
    and also prevents built-in gpt-mini from popping back in.

Reply done, then I’ll give you the verify step.

magic lotus
#

done, after we remove all aliases, we add new custom based on the name I give

storm inletBOT
#

Perfect.

Step 2

Run this to verify all aliases are gone:

openclaw models aliases list --plain

If it prints nothing, we’re clean and then you can send me your custom names.

magic lotus
#

nothing is coming up, now we set custom based on the available models exist

storm inletBOT
#

Nice. Clean slate.

Step 3

Run this so we only use models that actually exist in your config:

openclaw models list --plain

Paste the output here, and then I’ll help you map your custom names to those exact model IDs, one step at a time.

magic lotus
#
openai/gpt-5.4-mini                                                                                                                                                                                    openrouter/auto                                                                                                                                                                                        openrouter/openai/gpt-5.4-mini                                                                                                                                                                         openai/gpt-5.4    

storm inletBOT
#

Perfect. Step 4:

Send me the custom names you want in this format:

openai/gpt-5.4 = 
openai/gpt-5.4-mini = 
openrouter/auto = 
openrouter/openai/gpt-5.4-mini = 

Important:

  • no spaces
  • use only letters, numbers, ., _, :, or -

Example:

#
openai/gpt-5.4 = main
openai/gpt-5.4-mini = fast
openrouter/auto = auto
openrouter/openai/gpt-5.4-mini = router-fast

Once you send that, I’ll give you the exact commands to run.

magic lotus
#

fill it up for me, clear and easy to recognise

storm inletBOT
#

Yep. I’d use these, clear and easy to spot:

  • openai/gpt-5.4openai-gpt
  • openai/gpt-5.4-miniopenai-gpt-mini
  • openrouter/autoopenrouter-auto
  • openrouter/openai/gpt-5.4-miniopenrouter-gpt-mini

Since openrouter/auto was weird on your version, use config set for all 4:

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' "openai-gpt"
openclaw config set 'agents.defaults.models["openai/gpt-5.4-mini"].alias' "openai-gpt-mini"
openclaw config set 'agents.defaults.models["openrouter/auto"].alias' "openrouter-auto"
openclaw config set 'agents.defaults.models["openrouter/openai/gpt-5.4-mini"].alias' "openrouter-gpt-mini"

Then verify:

magic lotus
#

include the model name

#

mode code 5.4

storm inletBOT
#

Yep, then I’d use these:

  • openai/gpt-5.4openai-gpt-5.4
  • openai/gpt-5.4-miniopenai-gpt-5.4-mini
  • openrouter/autoopenrouter-auto
  • openrouter/openai/gpt-5.4-miniopenrouter-openai-gpt-5.4-mini

Step 1

Run these:

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' "openai-gpt-5.4"
openclaw config set 'agents.defaults.models["openai/gpt-5.4-mini"].alias' "openai-gpt-5.4-mini"
openclaw config set 'agents.defaults.models["openrouter/auto"].alias' "openrouter-auto"
openclaw config set 'agents.defaults.models["openrouter/openai/gpt-5.4-mini"].alias' "openrouter-openai-gpt-5.4-mini"
#

Then run:

openclaw models aliases list --plain

If you want, after that I can help shorten them a bit without making them confusing.

#

If you want the alias to read like “mode code 5.4”, use:

mode-code-5.4

Spaces won’t work in aliases.

Step 1

Run this for openai/gpt-5.4:

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' "mode-code-5.4"

Then reply:

#
done

If that’s not for openai/gpt-5.4, tell me which exact model it should map to.

magic lotus
#

done set

storm inletBOT
#

Nice.

Step 2

Run:

openclaw models aliases list --plain

You should see:

mode-code-5.4 openai/gpt-5.4

If that shows up, send me the next alias name you want.

magic lotus
#

I used this:

openai/gpt-5.4 → openai-gpt-5.4
openai/gpt-5.4-mini → openai-gpt-5.4-mini
openrouter/auto → openrouter-auto
openrouter/openai/gpt-5.4-mini → openrouter-openai-gpt-5.4-mini

The output of : openclaw models aliases list --plain

openrouter-auto openrouter/auto openrouter-openai-gpt-5.4-mini openrouter/openai/gpt-5.4-mini openai-gpt-5.4 openai/gpt-5.4 openai-gpt-5.4-mini openai/gpt-5.4-mini

storm inletBOT
#

Yep, that’s correct. Looks clean now.

Your aliases

  • openrouter-autoopenrouter/auto
  • openrouter-openai-gpt-5.4-miniopenrouter/openai/gpt-5.4-mini
  • openai-gpt-5.4openai/gpt-5.4
  • openai-gpt-5.4-miniopenai/gpt-5.4-mini

Use them like this

openclaw models set openai-gpt-5.4

or in chat:

/model openai-gpt-5.4
#

If you want to change one later

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' "new-name"

If you want to fully clear one later

openclaw config set 'agents.defaults.models["openai/gpt-5.4"].alias' '""' --strict-json

Glad we got it cleaned up 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.

magic lotus
#

now if I wanna add another mode from OpenRouter, such as Claude 4.7 then how can i name it the same format way?

storm inletBOT
#

Yep, same style.

If the OpenRouter model is:

openrouter/anthropic/claude-opus-4-7

then I’d name it:

openrouter-claude-opus-4.7

Step 1

First check the exact OpenRouter model id:

#
openclaw models list --plain | grep '^openrouter/'

If you see this line

openrouter/anthropic/claude-opus-4-7

set the alias with:

openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-opus-4-7"].alias' "openrouter-claude-opus-4.7"

Rule of thumb for your naming style:

  • openai/...openai-...
magic lotus
#

I need to add it first, it's not added

storm inletBOT
#

Yep, first add the model itself.

Step 1

Run this in WSL:

openclaw config set agents.defaults.models '{"openrouter/anthropic/claude-opus-4-7":{}}' --strict-json --merge

That adds the OpenRouter Claude 4.7 model to your allowed model list.

Reply:

added
#

Then I’ll give you the next one step to name it in the same format.

magic lotus
#

not as default bro,

glad sunBOT
storm inletBOT
#

Yep, you’re right, and good catch.

That command does not set it as the default model.
It only adds it to your available model list.

Your default stays whatever shows here:

openclaw models status

Step 1

If you want to add OpenRouter Claude 4.7 without making it default, run:

openclaw config set agents.defaults.models '{"openrouter/anthropic/claude-opus-4-7":{}}' --strict-json --merge
#

Reply:

added

Then I’ll give you the next one step to set its alias.

magic lotus
#

I told my bot to add these:

nthropic/claude-sonnet-4.6
anthropic/claude-opus-4.7
moonshotai/kimi-k2.5
google/gemini-2.5-flash

Now we can aliases based on the previous model style. GIve me step by step, one step at a time way

storm inletBOT
#

Yep. One quick gotcha first:

  • nthropic/... looks like a typo, should be anthropic/...
  • moonshotai/kimi-k2.5 may need a provider prefix in OpenClaw

Step 1

Run this and paste just those lines:

openclaw models list --plain | grep -E 'claude|kimi|gemini'

Then I’ll give you Step 2 with the alias names in the same style as before.

magic lotus
#

She already did?

Done — I added all 4 to ~/.openclaw/openclaw.json 🎀

Added:

openrouter/anthropic/claude-sonnet-4.6
openrouter/anthropic/claude-opus-4.7
openrouter/moonshotai/kimi-k2.5
openrouter/google/gemini-2.5-flash
Aliases:

openrouter-claude-sonnet-4-6
openrouter-claude-opus-4-7
openrouter-kimi-k2-5
openrouter-gemini-2-5-flash
I only added them to the available model list — I did not change your current default model or fallbacks.

If you want, I can also:

set one as primary
add them to fallbacks
remove old ones

storm inletBOT
#

Let me sanity-check those OpenRouter refs before I tell you “yes” and send you into a weird mismatch.

#

Yep, looks like she already added them.

But the alias style is a bit different from yours.

Current added aliases

  • openrouter-claude-sonnet-4-6
  • openrouter-claude-opus-4-7
  • openrouter-kimi-k2-5
  • openrouter-gemini-2-5-flash

Your existing style

  • openai-gpt-5.4
  • openai-gpt-5.4-mini

So if you want the same style, I’d rename them to:

  • openrouter-claude-sonnet-4.6
#
  • openrouter-claude-opus-4.7
  • openrouter-kimi-k2.5
  • openrouter-gemini-2.5-flash

Step 1

Run this first:

openclaw models aliases list --plain | grep '^openrouter-'

Paste that output here, and then I’ll give you Step 2 to rename them one by one.

magic lotus
#
openrouter-auto openrouter/auto                                                                                                                                                                        openrouter-openai-gpt-5.4-mini openrouter/openai/gpt-5.4-mini                                                                                                                                          openrouter-claude-sonnet-4-6 openrouter/anthropic/claude-sonnet-4.6                                                                                                                                    openrouter-claude-opus-4-7 openrouter/anthropic/claude-opus-4.7                                                                                                                                        openrouter-kimi-k2-5 openrouter/moonshotai/kimi-k2.5                                                                                                                                                   openrouter-gemini-2-5-flash openrouter/google/gemini-2.5-flash

bleak ridge
#

@magic lotus howdy

#

best to start a new thread

storm inletBOT
#

Yep, looks good.

Only these 4 need renaming to match your dot-style:

  • openrouter-claude-sonnet-4-6openrouter-claude-sonnet-4.6
  • openrouter-claude-opus-4-7openrouter-claude-opus-4.7
  • openrouter-kimi-k2-5openrouter-kimi-k2.5
  • openrouter-gemini-2-5-flashopenrouter-gemini-2.5-flash

Step 2

Run this first:

openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-sonnet-4.6"].alias' "openrouter-claude-sonnet-4.6"

Then reply:

#
done
bleak ridge
#

the context gotten too big on this one, you're gonna have a degraded experience

storm inletBOT
#

Yeah, good call.

This thread already mixed alias cleanup, auth removal, and new model adds. Better to start a fresh one for the new alias set.

In the new thread, paste:

openclaw models aliases list --plain
openclaw models list --plain

and say which naming style you want, for example:

  • openai-gpt-5.4
  • openrouter-claude-opus-4.7

Then we can do it cleanly, step by step.

magic lotus
storm inletBOT
#

Yeah, agreed. Fresh thread is better here.

In the new thread, just paste:

openclaw models list --plain
openclaw models aliases list --plain

and say the naming style you want, like:

openai-gpt-5.4
openrouter-claude-opus-4.7

Then we can do it cleanly from the current state, one step at a time.

#

Yep, all good.

Take your time. When that command finishes, send:

done

and I’ll give you the next alias rename.

magic lotus
#

She added these aliases

Aliases:

openrouter-claude-sonnet-4-6
openrouter-claude-opus-4-7
openrouter-kimi-k2-5
openrouter-gemini-2-5-flash

storm inletBOT
#

Yep. Let’s normalize them to your dot style, one by one.

Step 1

Run this:

openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-sonnet-4.6"].alias' "openrouter-claude-sonnet-4.6"

Then reply:

done
magic lotus
#

Done

storm inletBOT
#

Nice.

Step 2

Run this:

openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-opus-4.7"].alias' "openrouter-claude-opus-4.7"

Then reply:

done
magic lotus
#

can't do all together?

storm inletBOT
#

Yep, you can do them all together.

Paste this whole block in WSL:

openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-sonnet-4.6"].alias' "openrouter-claude-sonnet-4.6"
openclaw config set 'agents.defaults.models["openrouter/anthropic/claude-opus-4.7"].alias' "openrouter-claude-opus-4.7"
openclaw config set 'agents.defaults.models["openrouter/moonshotai/kimi-k2.5"].alias' "openrouter-kimi-k2.5"
openclaw config set 'agents.defaults.models["openrouter/google/gemini-2.5-flash"].alias' "openrouter-gemini-2.5-flash"

Then verify with:

openclaw models aliases list --plain
#

It won’t change your default model, only the aliases.

magic lotus
#
openclaw models aliases list --plain                                                                                                                                                                                                                                                                                                                                                  🦞 OpenClaw 2026.4.22 (00bd2cf) — Like having a senior engineer on call, except I don't bill hourly or sigh audibly.                                                                                                                                                                                                                                                                                          openrouter-auto openrouter/auto                                                                                                                                                                        openrouter-openai-gpt-5.4-mini openrouter/openai/gpt-5.4-mini                                                                                                                                          openrouter-claude-sonnet-4.6 openrouter/anthropic/claude-sonnet-4.6                                                                                                                                    openrouter-claude-opus-4.7 openrouter/anthropic/claude-opus-4.7                                                                                                                                        openrouter-kimi-k2.5 openrouter/moonshotai/kimi-k2.5                                                                                                                                                   openrouter-gemini-2.5-flash openrouter/google/gemini-2.5-flash                                                                                                                                         openai-gpt-5.4 openai/gpt-5.4                                                                                                                                                                          openai-gpt-5.4-mini openai/gpt-5.4-mini 

storm inletBOT
#

Yep, that looks clean now.

Final alias set

  • openrouter-auto
  • openrouter-openai-gpt-5.4-mini
  • openrouter-claude-sonnet-4.6
  • openrouter-claude-opus-4.7
  • openrouter-kimi-k2.5
  • openrouter-gemini-2.5-flash
  • openai-gpt-5.4
  • openai-gpt-5.4-mini

Use them like this

In chat:

/model openrouter-claude-opus-4.7
#

In CLI:

openclaw models set openrouter-claude-opus-4.7

So yeah, you’ve got the naming style consistent now. 🎉

If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so it gets indexed on Answer Overflow.

glad sunBOT
magic lotus
#

All done for now, then. Thanks from Miko & me.

storm inletBOT
#

Glad we got it sorted for you both 🦐

You’re welcome, to you and Miko.

If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it for future users.