Use /model <provider/model> to switch the model for the current OpenClaw conversation. To change the default used by future sessions, run openclaw models set <provider/model> or edit only agents.defaults.model.primary in ~/.openclaw/openclaw.json. Authenticate the provider first, use the full provider/model identifier, and choose the scope deliberately so a temporary experiment does not become a shared default.
Antihost offers VPS plans with one-click OpenClaw, NVMe storage and a 14-day free trial.
The three ways to change an OpenClaw model
OpenClaw separates a model selection for one conversation from defaults that affect later work. The quickest route is a chat command; the durable route is the models CLI or a narrowly scoped configuration edit.
As an Amazon Associate I earn from qualifying purchases.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute| Goal | Command or setting | What changes | Permission or access |
|---|---|---|---|
| Try a model in this conversation | /model <provider/model> |
Current session only unless you add another scope | Normal session user, subject to policy |
| Make the session scope explicit | /model <provider/model> -s or --session |
Current conversation only | Normal session user, subject to policy |
| Request an agent-default change | /model <provider/model> -a or --agent |
Current session plus the agent-default request | Owner or administrator |
| Request a shared global change | /model <provider/model> -g or --global |
Current session plus the shared global-default request | Owner or administrator |
| Set the persistent default from a terminal | openclaw models set <provider/model> |
Updates model configuration for future sessions | CLI access |
| Set it in the configuration file | agents.defaults.model.primary in ~/.openclaw/openclaw.json |
Changes the configured primary model | Permission to edit the OpenClaw configuration |
The short, unscoped /model command is normally a session override. If you intend a different lifetime, include -s, -a, or -g rather than relying on an implicit scope.
Think of the choices as a ladder of impact. A session change is easiest to reverse and affects only the conversation in front of you. An agent change establishes a default for that agent, while a global change can alter what other sessions inherit. The CLI and configuration-file methods are persistent administrative changes, so they should be used when you have deliberately chosen the model and its provider.
#1 Best Overall
Before you switch: find a valid model and authenticate its provider
List the models OpenClaw can see
Start by checking the identifiers exposed by your installation:
- In a terminal, run
openclaw models list. - In chat, use
/model listor/models. - To narrow the result to one provider, use
/models <provider>.
Model references use the form provider/model. Copy the exact ID shown by the list command, including punctuation and version suffixes. The documentation examples include openai/gpt-5.5 and anthropic/claude-sonnet-4-6; those are examples of the naming pattern, not a guarantee that every account exposes those models.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Listing is useful for more than browsing names. It confirms that OpenClaw has a configured provider entry and shows the spelling that its resolver accepts. If a model is absent from the list, changing the command syntax will not make it available; complete that provider’s setup or use an identifier that is listed.
Authenticate before selecting
Provider credentials must be configured before OpenClaw can use a model. Follow the provider’s setup flow, commonly started with openclaw onboard or openclaw configure. The intended order is:
- Choose the provider.
- Complete its authentication or API-key setup.
- Select a default using the provider-qualified model ID.
Adding credentials does not, by itself, replace an existing primary model. OpenClaw preserves agents.defaults.model.primary when a provider is added or reauthenticated. Authentication and model selection are separate operations.
If you want the login operation to set the default intentionally, use the provider login flow’s explicit option where supported:
openclaw models auth login --provider <id> --set-default
That option is different from merely adding credentials. Without an explicit default-setting action, expect the existing primary model to remain in place.
How to pick a model in one OpenClaw chat
Use the fastest session-only command
- Open the conversation in which you want to test another model.
- Enter
/model <provider/model>, replacing the placeholder with an ID from the model list. - Send the command and continue chatting. New requests in that conversation use the selected model, subject to policy and availability.
For example:
/model openai/gpt-5.5
This is the appropriate choice for a temporary comparison, a task that needs a different capability, or a quick trial that should not alter defaults for other sessions. It does not rewrite the provider credentials, agent configuration, or shared default.
Make the session scope explicit
If you want the command to state its persistence clearly, use:
/model openai/gpt-5.5 -s
# or
/model openai/gpt-5.5 --session
The -s and --session forms both target the current conversation. They are useful in shared procedures because another administrator can see that the change is intentionally temporary.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #2
Confirm which model is active
Run /model status after the change. This lets you check the effective model rather than assuming that a command, alias, or provider fallback resolved as expected. Verification is especially important after switching between providers with similar model names or after changing a persistent default while an existing session still has an override.
How to change the default model for future sessions
Use the models CLI
The most direct persistent change is:
openclaw models set anthropic/claude-sonnet-4-6
Replace the example with the exact provider/model ID available to your account. This updates the model configuration used when later sessions do not have their own override.
A persistent default does not necessarily replace a model already pinned to an existing conversation. Check that conversation with /model status; if it has a temporary selection, clear it with /model default so it can inherit the newly configured primary model.
Set an agent default from chat
An owner or administrator can request an agent-default update with:
/model openai/gpt-5.5 -a
# or
/model openai/gpt-5.5 --agent
The command applies the model to the current session and requests that it become the agent default. The agent scope is different from a session override and from the shared global scope, so use it only when the intended owner of the change is the current agent configuration.
Set a shared global default from chat
An owner or administrator can request a shared default change with:
/model openai/gpt-5.5 -g
# or
/model openai/gpt-5.5 --global
This changes the current session and requests the shared global default. A global change can affect other users or sessions that inherit the shared setting; reserve it for an intentional administrative change. If you only wanted to test a model, do not use -g.
Change the model in openclaw.json without replacing the file
The persistent primary model is represented by agents.defaults.model.primary in ~/.openclaw/openclaw.json. If you edit configuration directly, change that field and leave unrelated settings intact. A minimal conceptual value looks like this:
Recommended Free Tools
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-6"
}
}
}
}
The surrounding file may contain many other required keys, so do not paste this fragment over the complete configuration. For RPC-based administration, inspect the relevant schema with config.schema.lookup and use a partial config.patch object. The documented rule is to change only model fields and avoid full-config replacement.
A partial patch also makes review and rollback easier: the intended change is visible, while channels, credentials, tools, and agent options remain untouched. Treat the JSON fragment above as the value to merge into the existing file, not as a complete replacement configuration.
If a full overwrite has already removed settings, restore a known-good backup or run openclaw doctor before attempting another model change. A model switch should not require rebuilding unrelated channels, credentials, tools, or agent options.
Choosing the right scope, persistence and authority
Use this decision path before entering a command:
- Only this conversation: choose
/model <provider/model> -s. - This agent and its future sessions: an owner or administrator can choose
-a. - Everyone inheriting the shared setting: an owner or administrator can choose
-g. - A durable terminal-side configuration change: run
openclaw models set <provider/model>. - Manual or automated configuration management: patch
agents.defaults.model.primary, not the entire file.
Owner or administrator status does not make an unscoped model selection global. Scope flags are what express the requested persistence, and authorization still applies to the agent and global forms.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches| Question | Choose | Reason |
|---|---|---|
| Am I testing a model briefly? | Session | Least persistent and easiest to reset |
| Should one agent use it by default? | Agent | Changes that agent’s inherited behavior |
| Should shared sessions inherit it? | Global | Broadest impact and owner/admin authority |
| Am I managing configuration from automation? | CLI or partial patch | Repeatable, persistent change without replacing unrelated keys |
Reset a temporary model override
When a conversation has a temporary model selection and should return to its configured default, enter:
/model default
The model concepts documentation also supports clearing a session override with a session patch equivalent to sessions.patch {model: null}. Clearing the override makes the session resolve through the normal configured default again; it does not erase the provider credentials or other OpenClaw settings.
After resetting, run /model status. The status result should show the model inherited from the agent or global configuration. If it does not, inspect the persistent primary value and any applicable policy allowlist before trying another switch.
Why OpenClaw may select a different model than expected
The provider prefix was omitted
A bare model name can be ambiguous. When the provider is missing, OpenClaw attempts aliases and configured-provider matches before a deprecated default-provider fallback. That resolution order can select a different model from the one you intended. Always write the full provider/model reference, especially when two providers expose similarly named models.
Free tools Windows power users keep installed
One-click scans. No signup required.
The provider was authenticated but the primary model stayed the same
This is expected behavior. Authentication supplies access; it does not intentionally switch agents.defaults.model.primary. Set the model separately with openclaw models set <provider/model>, or use the authentication command’s explicit default option when supported:
openclaw models auth login --provider <id> --set-default
Use the provider ID required by your installation and verify the result with /model status.
An allowlist blocks a model that exists
Model discovery and authorization are separate. The models-set command, provider setup, and alias commands do not change modelPolicy.allow. If an explicit allowlist is enabled, add the intended model through the appropriate configuration procedure, then try the selection again. Seeing a model in a list does not prove that policy permits an agent to use it.
A scope flag was misunderstood
A session command does not become global merely because the person running it is an owner or administrator. Conversely, the agent and global forms have broader effects and require the corresponding authority. Check the exact command entered, then inspect /model status and the configured primary value before changing anything else.
The identifier is valid but unavailable at runtime
A listed model can still fail if its provider authentication is incomplete or if policy denies it. Recheck the exact provider/model spelling, confirm the provider login, and inspect the allowlist. Do not work around a denied model by replacing the whole configuration; fix the provider or policy entry that governs that model.
A safe model-switching checklist
- Run
openclaw models listor/modelsand copy an exact model ID. - Complete provider authentication with
openclaw onboard,openclaw configure, or the provider’s documented flow. - Decide whether the change is session, agent, global, or persistent CLI scope.
- Use the full
provider/modelstring. - For a trial, use
/model <provider/model> -s. - For a future default, use
openclaw models set <provider/model>or patch onlyagents.defaults.model.primary. - Run
/model statusto verify the effective selection. - If the trial is over, run
/model defaultto remove the session override. - If configuration was accidentally overwritten, restore a backup or run
openclaw doctorbefore further edits.
Worked examples
Try a second provider for one task
/models
/model anthropic/claude-sonnet-4-6 -s
/model status
The first command reveals available IDs, the second changes only the current conversation, and the third confirms the effective model.
Make a model the normal default
openclaw models list
openclaw models set anthropic/claude-sonnet-4-6
/model status
This sequence checks the identifier, updates the persistent default, and verifies the active result in a session.
Authenticate and intentionally set a provider default
openclaw models auth login --provider <id> --set-default
/model status
The explicit --set-default option makes the otherwise separate authentication and default-selection actions part of one intentional operation.
Switch temporarily, then return to the configured default
/model openai/gpt-5.5 -s
/model status
/model default
/model status
The first status check confirms the temporary selection. After /model default, the final check confirms that the conversation is inheriting the configured primary model again.
Frequently asked questions
How do I change the default LLM in OpenClaw?
Run openclaw models set <provider/model>, using an exact ID from openclaw models list. You can also update agents.defaults.model.primary in ~/.openclaw/openclaw.json with a partial edit.
How do I switch models without wiping my config?
Use a session command for a temporary test, or change only agents.defaults.model.primary for a persistent default. Do not replace the whole JSON file. For RPC administration, inspect the schema and submit a partial config.patch.
How do I pick a model in chat?
Enter /model <provider/model>. Add -s or --session when you want the temporary scope to be explicit, then run /model status to verify it.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Does logging in to a new provider switch my model automatically?
No. Provider authentication does not change an existing primary model. Use openclaw models set or the login flow’s --set-default option when you intend to change the default.
What is the difference between -s, -a, and -g?
-s targets the current session, -a requests an agent-default change, and -g requests a shared global-default change. Agent and global forms require owner or administrator authority.
Best Value
Can an owner make an unscoped command global?
No. Authority and scope are separate. An owner still needs the explicit -g flag for a global request; an unscoped selection remains subject to its normal session behavior.
Why does a model shown by /models fail when I select it?
Check provider authentication and modelPolicy.allow. Listing establishes discovery, not permission. Also verify that you used the complete provider-qualified identifier.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsHow do I undo a model change?
For a temporary override, run /model default or clear the session model with sessions.patch {model: null}. For a persistent change, set the previous provider/model again. If the full configuration was overwritten, restore a backup or run openclaw doctor.
Do I need to change aliases when I change models?
Not necessarily. Aliases can participate in resolution, but the safest selection is the exact provider/model ID returned by the model list. Changing an alias does not automatically alter the primary model or the allowlist.
Frequently Asked Questions
What is the fastest way to test another model?
Use /model <provider/model> -s in the current chat, then verify with /model status.
What command changes the default for future OpenClaw sessions?
Run openclaw models set <provider/model> or change only agents.defaults.model.primary in the OpenClaw configuration.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Will provider authentication change my current model?
No. Authentication adds access but preserves the existing primary model unless you explicitly use a default-setting action.
Why should I include the provider name?
OpenClaw resolves aliases and configured-provider matches when the provider is omitted, so a bare model name can select an unintended model.
What should I do if a valid model is blocked?
Check the explicit modelPolicy.allow list and update it through the appropriate configuration process; model setup commands do not change that policy.
The Bottom Line
Use /model <provider/model> -s for a one-conversation test and openclaw models set <provider/model> for a persistent default. Authenticate first, specify the provider, use -a or -g only for the intended administrative scope, verify with /model status, and patch only the model field instead of replacing your OpenClaw configuration.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




