All guides
ModelsGetting started

Which AI model should you use on OpenClaw? (2026 guide)

OpenClaw supports dozens of AI models. This guide tells you exactly which one to use for writing, research, coding, and everyday tasks — and how to switch without getting a new API key.

8 min readUpdated 2026-04-04

The short answer

OpenClaw supports dozens of AI models — Anthropic, OpenAI, Google, Mistral, DeepSeek, Groq and more. Picking the wrong one means overpaying or getting mediocre results. Here's the cheat sheet:

You want to…Use this model
Best all-round for most tasksanthropic/claude-sonnet-4-6
Hardest tasks, best reasoninganthropic/claude-opus-4-6
Fast responses, simple tasksopenai/gpt-4o-mini
Access every model with one keyOpenRouter (any of the above)
Zero cost, fully offlineOllama + local model

If you're not sure, start with Claude Sonnet 4.6. It's the best cost-to-capability ratio available right now and handles the vast majority of what people use OpenClaw for.

Why model choice matters more in OpenClaw

When you use ChatGPT or Claude.ai directly, the model is fixed. You get whatever they give you.

In OpenClaw, the model is powering an agent — it's not just answering questions, it's deciding what to do, calling tools, reading files, executing multi-step workflows. A weaker model doesn't just give you worse answers — it fails to follow instructions, misses steps in automations, and makes mistakes that a better model wouldn't.

This is why model choice in OpenClaw is a bigger deal than people expect.

The main models explained

Claude Sonnet 4.6 — the default recommendation

Provider: Anthropic  |  Model string: anthropic/claude-sonnet-4-6
Best for: General use, writing, email, analysis, automation workflows

Claude Sonnet 4.6 is the best starting point for most OpenClaw users. It's fast, follows complex instructions reliably, handles long context windows well, and is significantly cheaper than Opus. For everyday tasks — drafting emails, summarising documents, managing workflows, answering questions — it performs at a level that's hard to fault.

It's also the model least likely to make agent errors. When your AI is running automations while you're asleep, you want a model that stays on track.

Claude Opus 4.6 — when you need the best

Provider: Anthropic  |  Model string: anthropic/claude-opus-4-6
Best for: Complex reasoning, difficult research, nuanced writing, legal/technical analysis

Opus is the most capable model available through OpenClaw right now. Use it when Sonnet isn't cutting it — deep research tasks, complex multi-step reasoning, situations where being wrong has real consequences. The tradeoff: it's noticeably more expensive per token and slightly slower.

GPT-4o — solid alternative, great for coding

Provider: OpenAI  |  Model string: openai/gpt-4o
Best for: Coding assistance, structured output, tasks where you already use OpenAI

GPT-4o is OpenAI's flagship and genuinely excellent. For coding tasks in particular it's highly competitive with Claude. If you already have an OpenAI API key and are used to GPT's style, there's no strong reason to switch.

GPT-4o mini — fast and cheap for simple tasks

Provider: OpenAI  |  Model string: openai/gpt-4o-mini
Best for: High-volume simple tasks, quick replies, anything where speed matters more than depth

When you're running lots of small automations — sorting emails, tagging messages, quick lookups — GPT-4o mini is dramatically cheaper than the full models and plenty capable for simple tasks. A good secondary model to set as failover.

Gemini 2.0 Flash — Google's fast option

Provider: Google  |  Model string: google/gemini-2.0-flash
Best for: Speed, multimodal tasks (images + text), Google Workspace integration

Gemini Flash is fast and cheap. If you're doing tasks involving images or are deeply in the Google ecosystem, it's worth trying.

DeepSeek — the budget pick

Provider: DeepSeek  |  Model string: deepseek/deepseek-chat
Best for: Cost-sensitive setups, coding tasks on a budget

DeepSeek delivers surprisingly good performance at a very low price point. The tradeoff is that it's hosted on Chinese infrastructure — a consideration for privacy-sensitive workloads.

Ollama — fully local, fully free

Provider: Ollama (local)  |  Best for: Privacy-first setups, no API cost, offline use

Ollama lets you run models like Llama, Mistral, or Phi directly on your machine. No API key, no cost, no data leaving your device. The tradeoff is capability — local models aren't as powerful as frontier models — and you need decent hardware (16GB RAM minimum for a usable model).

How to switch models in OpenClaw

You don't need to reinstall or re-run onboarding to switch models. Edit your config file directly:

openclaw config edit

Find the model.primary line and update it:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-6"
      }
    }
  }
}

Change the model string and save. The new model takes effect immediately.

Model failover — the feature most people don't know about

OpenClaw supports automatic model failover. If your primary model fails or hits a rate limit, it automatically switches to a backup. This is huge for automations running while you're not watching.

Set it up in your config:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-6",
        "fallback": "openai/gpt-4o-mini"
      }
    }
  }
}

Now if Claude hits its limit at 2am while an automation is running, GPT-4o mini picks up the slack.

The case for OpenRouter

If you want access to every model above through a single API key, use OpenRouter.

Instead of managing separate Anthropic, OpenAI, and Google API keys, you get one OpenRouter key that routes to any model. It adds a small markup per token (~10–15% on most models) but the convenience is worth it if you like experimenting with different models.

We have a dedicated guide: How to connect OpenClaw to OpenRouter →

Enjoyed this? Get more guides in your inbox.

Weekly OpenClaw tips, new guides, and skill pack updates.

No spam. Unsubscribe anytime.

Related guides

Something not working or have a question? Ask in the ClawMatic Discord →