People ask for the best LLM for OpenClaw as if the project shipped with one official brain. OpenClaw is the assistant: memory, skills, channels, and schedules. The LLM is only the engine for a turn. Swap the engine and the assistant stays.
Anyone asking what LLM does OpenClaw use will not get a single name. OpenClaw LLM models are whatever you set, a provider/model-name value. Choose an id that can follow tools, and keep a second id ready when the first fails. The model explainer covers the default path.
What the OpenClaw LLM Model Is
An OpenClaw LLM model is the provider and model id used for a turn. Anthropic, OpenAI, xAI, Google, DeepSeek, and a local Ollama server are all valid providers once credentials or a local endpoint exist. The id is not a personality. Your soul file, memory, and skills still load. The new model only reads the prompt and writes the next reply.
One install can point primary at a large hosted model. Another can point it at a 14B local model. Both are valid. If the local one ignores tool results, that is a model limit, not a missing feature. A better release next month should be a one-line edit.
How to Judge the Best LLM for OpenClaw
Do not pick from a chat demo. Give the candidate three jobs you already run:
- A short reply that has to follow a house style.
- A tool call that reads a file or fetches a page and returns a short result.
- A longer task, such as a summary or a small edit, that must stay inside the facts you supplied.
If it fails the tool call, it is not the best LLM for OpenClaw. The agent spends many turns calling tools. A model that only chats will stall, and you will blame the install.
Then check four things. The model must emit a tool call and use the result. Context should match what you really send, not a pasted transcript from yesterday. Privacy decides hosted versus local. Cost decides the default: a strong model on every heartbeat dominates the bill, and a tiny model on a coding task wastes the afternoon.
Use the cheapest LLM for OpenClaw when budget is the filter, and the best open source LLM when you want weights you can run yourself. The best overall choice is often a pair: a capable primary, and a fallback for errors and hard steps.
OpenClaw Supported Models
OpenClaw supported models are the models your configured providers can actually call. Four groups cover almost every install.
- Hosted frontier models. Current Claude, GPT, Gemini, and Grok models handle long instructions and tool use. Use one as primary for drafting, coding, and multi-step jobs.
- Small hosted models. Faster and cheaper. Fine for short replies and checks. Weak as the only model if the agent edits files.
- Local models through Ollama. Llama, Qwen, Mistral, and Gemma run on your own machine. Use them when prompts include private notes. A 7B to 14B model can handle routine chat. Harder tool use usually wants a larger local model or a hosted fallback. See the Ollama LLM guide.
- Routers. One key in front of many models is useful while you test. Log the id that answered.
If the id is missing from the provider account, or the Ollama tag is not pulled, OpenClaw cannot invent it. Confirm the id, then put it in config.
OpenClaw Model Config
The openclaw model config lives in the OpenClaw JSON file, under agent defaults. The fields that matter are the primary model and the fallback list:
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-6",
"fallbacks": ["openai/gpt-4o", "ollama/qwen2.5:14b"]
}
}
}
}
Primary handles ordinary turns. Fallbacks run when the primary errors, rate-limits, or is down. Order them from the model you want next to the one you will tolerate. Do not put an untested local tag first, or an outage dumps real work onto it.
A single agent can override the default when it should stay cheaper or more private. A string is enough: "model": "ollama/qwen2.5:14b". Keep API keys in provider auth or an env file, not in the model name.
The OpenClaw Default Model
The openclaw default model is whatever primary says. New sessions inherit it. Change that line when you want the whole assistant to move. Leave it alone when only one session needs a different engine.
A one-off switch is normal. Point a coding session at a stronger model, or a private chat at a local model, and keep the default for everything else. Multi-model routing is built for that split. Use it when the work changes, not as a way to avoid picking a default.
If you are unsure, set a hosted model you trust as primary and a cheaper model later in the fallback list. If the default fails tool calls, move up. If it is only bored on simple checks, move those checks down.
How to Change the OpenClaw Model
To change the OpenClaw model, edit config and restart the gateway. You do not reinstall, and you do not wipe memory.
- Confirm the provider and the exact model id in the account or on the local Ollama host.
- Set
agents.defaults.model.primaryto that id. - Add at least one fallback on a different provider, so one outage does not stop the agent.
- Restart OpenClaw and send a test that forces a tool call, not only "say hello."
- Read the reply and the log. Confirm the model id that answered is the one you set.
Memory, skills, and channel logins stay. If behavior changes, the model changed, not the install. Give it the same task the old model handled. If it is sloppier, restore the old primary and keep the new id as a fallback.
A timeout is often a long prompt or a cold local model. A missing tool is often a skill that is not enabled. Fix those before you blame the LLM. If the bill jumps, check OpenClaw cost per month before you swap again.
A Practical Pick
For most installs in 2026, the best LLM for OpenClaw is a strong hosted model as primary and a smaller or local model as backup.
- Mixed tools and writing. A current Claude, GPT, or Grok model as primary. This is the safest default if you want the assistant to finish work the first time.
- Privacy first. An Ollama model that fits your RAM as primary, with a hosted fallback for the jobs local quality cannot finish.
- Tight budget. A small local or cheap hosted model as primary, and a stronger model only for tasks that already failed once. Retrying the weak model three times is not savings.
Write the choice into the openclaw model config, test one real task, and leave it until the work changes. Pick the smallest model that passes your three jobs, keep a different provider behind it, and stop chasing a new name every week.
Set the Model, Keep the Assistant
Install OpenClaw on a VPS, point primary at a model you trust, and add a fallback before you need it.
Install OpenClaw Free