Chapter 6 / 96 min read

Part 6: Models and Compute

Many people ask, “Which model is strongest?” The more useful question is, “Which model should handle which type of task?”

01 Provider Overview

OpenClaw’s model freedom is one of its biggest advantages.

ProviderRepresentative modelInput / 1M tokensOutput / 1M tokensTypical role
AnthropicClaude Sonnet 4.6$3.00$15.00Primary agent model
OpenAIGPT-5.4$2.50$15.00General flagship
GoogleGemini 3 Pro$2.00$12.00Long-context and multimodal
DeepSeekDeepSeek-V3.2.2$0.14$0.28Ultra-low-cost daily work
ZhipuGLM-5$0.80$2.56Strong domestic coding option
QwenQwen 3.5 Max$1.20$6.00Chinese and coding balance
DoubaoSeed 2.0 Pro$0.47$2.37Lower-cost bulk tasks
KimiKimi K2.5$0.60$3.00Chinese agent tasks
MiniMaxM2.5$0.50$2.00Strong value
Ollama / LM StudioLocal modelsFreeFreePrivacy and zero API cost

02 The Three Core Configuration Ideas

1. Built-in providers

Anthropic, OpenAI, Google, and Zhipu are relatively straightforward. Add the credential and use them.

2. Custom providers

DeepSeek, Doubao, Kimi, MiniMax, SiliconFlow, and similar providers typically require manual entries under models.providers.

3. Fallbacks

Fallbacks are not just a rescue mechanism. They are one of the best cost-control mechanisms.

{
  "env": {
    "DEEPSEEK_API_KEY": "sk-xxx"
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-6",
        "fallbacks": [
          "anthropic/claude-haiku-4-5",
          "deepseek/deepseek-chat"
        ]
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {}
  }
}

models.mode: "merge" matters because it keeps built-in providers while layering your custom configuration on top.

03 International Models

Anthropic Claude

Claude is one of the strongest primary choices for agentic workflows.

ModelGood for
Claude Opus 4.6Hard reasoning and difficult tasks
Claude Sonnet 4.6Main daily driver
Claude Haiku 4.5Lightweight cheaper tasks

Config:

ANTHROPIC_API_KEY=sk-ant-xxx

The stable path is API-key based access rather than OAuth-style subscription bridging.

OpenAI GPT

OpenAI works well when you already have an established account and want a broad flagship option.

OPENAI_API_KEY=sk-xxx

The main thing to watch is long-context pricing.

Google Gemini

Gemini’s strengths are:

  • very large context
  • strong multimodality
  • attractive free or cheap Flash tiers

That makes it useful for:

  • heartbeat tasks
  • scheduled jobs
  • lighter low-cost usage
GOOGLE_API_KEY=xxx

04 Domestic Models

DeepSeek

DeepSeek is one of the most obvious value routes:

{
  "env": {
    "DEEPSEEK_API_KEY": "sk-xxx"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "deepseek": {
        "baseUrl": "https://api.deepseek.com/v1",
        "apiKey": "${DEEPSEEK_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "deepseek-chat", "contextWindow": 128000, "maxTokens": 8192 }
        ]
      }
    }
  }
}

It is cheap, but it should not be your only provider. Pair it with fallbacks.

GLM

GLM is one of the strongest domestic coding-oriented choices and is relatively easy to enable.

openclaw onboard --auth-choice zai-api-key

For many Chinese users, GLM-5 + DeepSeek is a very natural combination.

Qwen, Doubao, Kimi, MiniMax

At a high level:

  • Qwen: good Chinese balance, strong coding variants
  • Doubao: low-cost options
  • Kimi: long context and Chinese fluency
  • MiniMax: strong value with good coding reputation

Baidu

Baidu can work, but the integration path is relatively more complex. Unless you already want Baidu ecosystem alignment, it is usually not the first route to recommend.

05 Aggregators and Coding Plans

Aggregators

If you do not want to manage many API keys directly, aggregation layers help.

SiliconFlow

A common domestic option for routing into multiple open models.

OpenRouter

A common international option, but it introduces platform fees.

one-api / new-api

Good for team-level or self-hosted gateway management.

The key compatibility reminder is that the proxy layer should ideally support the Responses API, not only old chat completions patterns.

Coding plans

Coding plans are basically monthly bundles for model access. They are useful if you want predictable cost rather than per-token billing for everything.

A rough mental model:

  • cheap first-month trials: common on Chinese cloud vendors
  • long-term value: depends on renewal pricing and rate limits
  • heavy users: must pay attention to per-window request limits

06 Local Models

Ollama

ollama pull qwen2.5:32b
ollama pull deepseek-r1:14b
{
  "env": {
    "OLLAMA_API_KEY": "ollama-local"
  }
}

Avoid forcing OpenClaw through a generic /v1 compatibility layer when native Ollama API support is available.

LM Studio

LM Studio is often more comfortable for users who want a GUI-driven local model workflow.

{
  "models": {
    "mode": "merge",
    "providers": {
      "lmstudio": {
        "baseUrl": "http://127.0.0.1:1234/v1",
        "apiKey": "lm-studio",
        "api": "openai-responses",
        "models": [
          { "id": "model-name", "contextWindow": 32768, "maxTokens": 8192 }
        ]
      }
    }
  }
}

Local model suggestions

ModelGood forSuggested memory
Qwen3.5-Coder:32BCoding and tool-calling agents32 GB RAM
Devstral-24BAgent and tool workflows32 GB RAM
DeepSeek-R1:14BReasoning tasks16 GB RAM
Llama 3.3General work16 to 64 GB RAM

07 Five Practical Strategies

Strategy 1: ultra-cheap

  • main: DeepSeek-V3.2
  • backup: Qwen 3.5 Plus
  • heartbeat: free GLM Flash

Strategy 2: domestic value

  • main: GLM-5
  • backup: DeepSeek-V3.2
  • reasoning assist: Kimi K2.5

Strategy 3: international balanced

  • main: Claude Sonnet 4.6
  • light tasks: Claude Haiku or Gemini Flash

Strategy 4: mixed best-of-both

  • hard tasks: Claude Sonnet
  • daily work: DeepSeek-V3.2
  • heartbeat / cron: Gemini Flash or local Ollama
  • fallbacks: Sonnet -> Haiku -> DeepSeek

This is one of the most practical all-around strategies.

Strategy 5: fully free

  • local Ollama with a strong enough machine
  • or a bundle of free API tiers

That path is great for privacy or experimentation, but you should not expect cloud-flagship performance on the hardest agent tasks.