Introduction

OpenClaw was originally built around Anthropic's Claude models. That history is baked into its name — "Clawd" was the original project name. But as the project evolved and the rebranding happened, a more significant architectural evolution occurred: OpenClaw became genuinely model-agnostic. It doesn't care what AI model is powering the agent. It works with any major cloud provider and any model you can run locally through Ollama.

This model-agnostic design is not a minor technical detail. It's a strategic property that protects users from vendor lock-in, lets you optimize for cost and quality across different tasks, and ensures that OpenClaw's value doesn't evaporate if any single AI provider changes their pricing or API terms. Here's what we're covering: every model category OpenClaw supports and helps you decide which to use for what.

Why Model-Agnostic Matters

The AI model landscape changes fast. A model that's the best option today may be outperformed by a competitor next month. Pricing changes. API terms evolve. Providers impose rate limits. Having your entire AI infrastructure locked to a single provider is a strategic liability.

OpenClaw's gateway architecture abstracts the model layer completely. From the agent's perspective, it issues a request and receives a response. The layer between those two events — which provider processes the request, which model does the inference — is entirely configurable. Switching from Claude to GPT to a local Llama model requires a single configuration change and a restart. No code changes. No retraining. No rebuilding workflows.

This also enables intelligent routing: using different models for different types of tasks within the same agent getting it running. A cheap, fast model handles heartbeat monitoring. A powerful reasoning model handles complex analysis. A local model handles sensitive data. All configured in a single YAML file.

OpenAI Models (GPT-4, GPT-5)

OpenAI's models were the primary alternative to Claude in OpenClaw's early community and have become more prominent following Peter Steinberger's move to OpenAI in February 2026.

GPT-4o is the workhorse for most OpenClaw deployments using OpenAI. It offers strong general reasoning, reliable tool use, good code generation, and a large context window. The multimodal capabilities (image understanding) are available in OpenClaw through the vision Skill, allowing the agent to interpret screenshots, photos, and diagrams.

GPT-4o Mini is the cost-effective sibling. It's significantly cheaper — roughly 17x lower cost per token — while retaining strong performance on structured tasks, summarization, and instruction following. For heartbeat tasks and high-frequency monitoring, GPT-4o Mini is the recommended OpenAI model. The cost savings are dramatic with no meaningful quality loss for routine automation.

GPT-5 (released in early 2026) represents the current frontier of OpenAI's capability. It demonstrates substantially improved complex reasoning, better tool use reliability, and stronger performance on long-horizon tasks. For demanding workflows — complex code generation, multi-step research, nuanced analysis — GPT-5 produces noticeably superior results. The premium pricing reflects this.

Configure OpenAI models in your config.yaml:

llm:
  providers:
    openai:
      api_key: "${OPENAI_API_KEY}"
      model: "gpt-4o"
      fallback_model: "gpt-4o-mini"

Anthropic Claude Models

Claude remains OpenClaw's most community-tested integration, carrying forward from the project's origins. Anthropic's models have a distinct quality profile: they tend to excel at careful reasoning, nuanced instruction following, and producing well-structured, readable text.

Claude Opus is Anthropic's most capable model. It produces exceptional results for complex tasks requiring careful reasoning, precise instruction following, and sophisticated writing. The trade-off is cost — it's among the most expensive models available. Use it for high-value, complex tasks where quality justifies the spend.

Claude Sonnet occupies the middle ground: better than Claude Haiku, cheaper than Opus. It's a strong choice for interactive tasks where you want good quality without the premium pricing of Opus. Many OpenClaw users run Claude Sonnet for interactive conversations and Claude Haiku for automated background tasks.

Claude Haiku is Anthropic's fast, cheap model. Despite its lower cost, it performs well on structured tasks, data extraction, summarization, and routine decision-making. For OpenClaw's heartbeat monitoring and high-frequency tasks, Haiku's performance-to-cost ratio is excellent.

One important note on the OpenClaw-Anthropic relationship: trademark disputes over the original "Clawdbot" name and reported API access tensions in early 2026 strained the relationship. Some community members report occasional rate limiting or policy issues. Monitor Anthropic's developer terms if using Claude models in production.

Google Gemini Models

Google's Gemini model family is available in OpenClaw through either the direct Gemini API or through Google's Vertex AI platform for enterprise deployments.

Gemini Pro is Google's capable mid-tier model. It performs well for general tasks, has strong multilingual capabilities (useful for international deployments), and benefits from integration with Google services when using Vertex AI. Gemini Pro is particularly strong at tasks involving structured data and table analysis.

Gemini Ultra is Google's frontier offering. Competitive with GPT-4o and Claude Opus in most benchmarks. For deployments already embedded in the Google Cloud ecosystem (GCS, BigQuery, Workspace), Gemini Ultra with Vertex AI integration can provide tighter, more efficient pipelines than competing models from other providers.

The Gemini integration in OpenClaw is generally considered more experimental than OpenAI and Anthropic integrations, as these models were added through community contributions. Test thoroughly before running in production workflows.

Local Models via Ollama

Any model available through Ollama can be used with OpenClaw — and the library is extensive. Over 100 model families are available through Ollama's registry, including Llama 3 (Meta), Mistral and Mixtral (Mistral AI), Phi-4 (Microsoft), Qwen 2.5 (Alibaba), DeepSeek, Gemma (Google), and many fine-tuned variants optimized for specific tasks like code generation or instruction following.

Key considerations for local models in OpenClaw:

  • Tool use reliability: Local models vary significantly in their ability to reliably generate well-formatted tool calls. Models explicitly fine-tuned for instruction following (look for "-instruct" or "-chat" suffixes) perform better. Llama 3.2 Instruct and Mistral 7B Instruct are community favorites for reliable tool use in OpenClaw.
  • Context length: Many local models have shorter context windows than their cloud counterparts. This can cause issues with complex heartbeat tasks that include long memory files. Choose models with 32K+ context for best results.
  • Quantization: Models are available in different precision levels (Q4, Q5, Q8). Lower quantization means smaller file size and faster inference but slightly lower quality. Q5_K_M is a good balance for most applications.

Choosing the Right Model

The right model depends on your specific requirements. Here's a decision framework:

Use CaseRecommended Model
Complex reasoning & analysisGPT-5 or Claude Opus
Heartbeat / background monitoringGPT-4o Mini or Claude Haiku
Privacy-sensitive tasksLlama 3.2 8B or Mistral 7B (local)
Code generation & debuggingGPT-5 or Claude Opus
Zero cost constraintLlama 3.1 70B (local, high-end hardware)
Multilingual tasksGemini Pro or Qwen 2.5 (local)

Start with a single model for simplicity. Once your deployment is stable and you understand your token consumption patterns, gradually introduce model routing to optimize cost and quality across different task types. The ability to do this without changing any code is one of OpenClaw's most practically valuable architectural features.

Wrapping Up

OpenClaw's model-agnostic design gives you flexibility that no cloud AI product can match. Switch providers when pricing changes. Use different models for different tasks. Migrate to local models for sensitive data. The intelligence layer is a commodity; the agent infrastructure, memory, and Skills you build on top of it are your proprietary value. OpenClaw protects that value by never tying it to any single AI provider.