Most AI assistants make a quiet decision for you: which AI model you get to use. ChatGPT gives you OpenAI's models. Copilot gives you Microsoft's. Gemini gives you Google's.

OpenClaw doesn't work that way.

Because it's self-hosted and open, you configure which model powers it. You can change that at any time. You can run different models for different tasks. And if a better model releases tomorrow, you're not waiting for someone else to flip a switch — you just update a config line.

This guide explains how OpenClaw's multi-model system works, which models are supported out of the box, and how to choose the right one for your use case.

Why Model Flexibility Matters

AI models differ in ways that actually matter to daily users:

When you're locked into one provider's model, you're always making a compromise. OpenClaw lets you stop compromising.

How OpenClaw Routes Model Requests

OpenClaw uses a model string in its config — typically following the provider/model-name format. When you send a message, OpenClaw calls the configured provider's API and returns the response.

The core architecture looks like this:

# In your OpenClaw config
model: anthropic/claude-sonnet-4-6
# or
model: openai/gpt-4o
# or
model: google/gemini-1.5-pro
# or (local via Ollama)
model: ollama/llama3.1

Switching models is a config change and a restart. That's it. Your memory, your skills, your personality files — they all stay the same. The model is just the inference engine underneath.

Supported Model Providers

OpenAI (GPT-4o, GPT-4 Turbo, GPT-4o Mini)

OpenAI's models are the most widely known and well-tested. GPT-4o is OpenClaw's best general-purpose choice for most users — strong reasoning, good coding, reliable instruction-following.

model: openai/gpt-4o

For cost-conscious setups, GPT-4o Mini handles most conversational tasks at a fraction of the price. Good for high-volume automations where you're watching your API spend.

Anthropic (Claude 3.5 Sonnet, Claude 3 Haiku)

Claude models tend to excel at long-context tasks, code review, and writing. Claude 3.5 Sonnet is arguably the best all-round model for agentic work — it follows complex multi-step instructions particularly well, which matters for OpenClaw's automation features.

model: anthropic/claude-sonnet-4-6

Claude Haiku is the budget pick: blazing fast, very cheap, solid for simple tasks and quick answers.

Google Gemini (1.5 Pro, 1.5 Flash)

Gemini's standout feature is context length — up to 1 million tokens in Gemini 1.5 Pro. If you're feeding OpenClaw large documents, entire codebases, or long conversation histories, Gemini handles it without truncating.

model: google/gemini-1.5-pro

Gemini 1.5 Flash is Google's speed-optimised variant — faster and cheaper, with a still-generous 1M context window.

Mistral (Mistral Large, Mistral 7B)

Mistral models are known for efficiency. Mistral Large punches above its weight for reasoning tasks; Mistral 7B is compact enough to run locally on decent hardware.

model: mistral/mistral-large-latest

Local Models via Ollama

This is where OpenClaw diverges most sharply from cloud-only assistants. If you've set up Ollama on your server, you can point OpenClaw at any locally-running model — Llama 3.1, Phi-3, Gemma 2, Qwen 2.5, or anything else in the Ollama library.

model: ollama/llama3.1
# Make sure Ollama is running at localhost:11434

Zero API costs. Zero data leaving your machine. Ideal for sensitive personal data or if you want complete air-gap privacy.

For a deeper dive into running local models, see our guide on running your own local AI with OpenClaw and Ollama.

OpenRouter (Access 100+ Models in One Place)

OpenRouter is a meta-provider that gives you a single API key with access to most major models — OpenAI, Anthropic, Google, Mistral, Meta, and many others. It's a convenient option if you want to experiment without managing multiple API keys.

model: openrouter/anthropic/claude-3.5-sonnet

OpenRouter also has a free tier with limited access to several models — useful for testing OpenClaw on a budget before committing to paid APIs.

Using Different Models for Different Tasks

OpenClaw's cron job system lets you specify a model per scheduled job. This is powerful: you might want your cheap daily-summary cron to use Gemini Flash, while your deep research tasks use Claude Sonnet.

# In your cron config
- name: morning-summary
  model: google/gemini-flash-1.5   # cheap and fast
  schedule: 0 8 * * *

- name: weekly-research-brief
  model: anthropic/claude-sonnet-4-6   # better reasoning
  schedule: 0 9 * * 1

This kind of per-task model routing is something closed AI products simply can't offer. For more on building these kinds of automated schedules, see the guide on OpenClaw cron jobs.

Model Performance: Quick Comparison

Model Best For Context Cost Privacy
openai/gpt-4o General use, tools 128K $$ Cloud
anthropic/claude-sonnet Coding, long tasks 200K $$ Cloud
google/gemini-1.5-pro Big documents 1M $$ Cloud
anthropic/claude-haiku Quick answers 200K $ Cloud
openai/gpt-4o-mini High-volume tasks 128K $ Cloud
ollama/llama3.1 Full privacy 8K–128K Free Local ✓

Switching Models: Step-by-Step

Here's the full process for changing your OpenClaw model:

  1. Get your API key for the provider you want (Anthropic, OpenAI, Google AI Studio, etc.)
  2. Add the key to your OpenClaw secrets or environment config:
    # e.g. for Anthropic
    ANTHROPIC_API_KEY=sk-ant-xxxx
  3. Update your model string in the OpenClaw gateway config:
    model: anthropic/claude-sonnet-4-6
  4. Restart the gateway:
    openclaw gateway restart
  5. Test it — send a message and confirm the new model is responding

Your memory files, SOUL.md, skills, and all customisations survive a model switch intact. The model is stateless — your state lives in files, not the model.

Which Model Should You Start With?

If you're new to OpenClaw and want a single recommendation: start with Claude 3.5 Sonnet. It has the best balance of capability, context length, and instruction-following for OpenClaw's agentic patterns. Anthropic's API is straightforward to set up and the free tier covers initial testing.

Once you're comfortable, experiment. Try GPT-4o for comparison. Add a cheap model for your routine crons. If privacy is a concern, test an Ollama setup on the side.

The whole point of OpenClaw's architecture is that the model isn't a lock-in decision — it's a tunable parameter. Use that freedom.

What Doesn't Change Between Models

One concern people raise: "If I switch models, does my assistant lose its personality?"

No — because in OpenClaw, personality, memory, and behaviour are defined in files (SOUL.md, USER.md, MEMORY.md), not baked into the model. Every model reads those files at the start of each session.

A well-written SOUL.md will produce a consistent persona whether you're running Claude, GPT-4o, or a local Llama model. The model changes; the assistant's character and memory don't. For a deeper look at how this system works, see the post on OpenClaw's memory system.

Summary

// get started

Ready to Run OpenClaw with Your Preferred Model?

Install OpenClaw on your VPS in minutes and connect it to any AI model you choose. No lock-in, full control.

Install OpenClaw Free →