Skip to main content

Choose an AI Model

OpenClaw supports multiple LLM providers. You can use different models for different scenarios and even set up automatic switching. This guide helps you make the best choice.


Model Comparison Overview

ModelProviderCostSpeedQualityPrivacyBest For
Claude Opus 4.6Anthropic$$$Medium5/5CloudComplex reasoning, long-form writing
Claude Sonnet 4.5Anthropic$$Fast4/5CloudDaily conversation, general tasks
GPT-5.2 CodexOpenAI$$$Medium5/5CloudSoftware development, technical tasks
GPT-5.2 MiniOpenAI$Very fast3/5CloudSimple chat, quick responses
Gemini 3 ProGoogle$$Fast4/5CloudMultimodal, search integration
DeepSeek V3DeepSeek$Fast4/5Cloud*Chinese tasks, high cost-effectiveness
Ollama (Local)YouFreeHardware-dependent2-4/55/5Fully offline, maximum privacy
GLM-5Zhipu AI$Fast4/5CloudChinese tasks
KIMI K2.5Moonshot$$Medium4/5CloudLong context, Chinese tasks

*DeepSeek is a Chinese company; data processing is subject to Chinese law. Evaluate carefully if you have privacy concerns.


Detailed Introductions

Claude (Anthropic)

Claude is one of the most popular models in the OpenClaw community, especially strong in nuanced reasoning and safety scenarios.

# ~/.openclaw/providers/anthropic.yaml
provider:
name: anthropic
api_key: "${ANTHROPIC_API_KEY}"
models:
primary:
id: claude-opus-4-6
max_tokens: 8192
temperature: 0.7
fast:
id: claude-sonnet-4-5
max_tokens: 4096
temperature: 0.5
routing:
enabled: true
complexity_threshold: 0.6

Strengths: Exceptional reasoning quality, natural responses, comprehensive safety guardrails, ultra-long context (1M tokens) Weaknesses: Opus pricing is high, higher latency in some regions

GPT (OpenAI)

The GPT-5.2 series still leads in code generation and technical tasks.

# ~/.openclaw/providers/openai.yaml
provider:
name: openai
api_key: "${OPENAI_API_KEY}"
models:
primary:
id: gpt-5.2-codex
max_tokens: 8192
temperature: 0.7
fast:
id: gpt-5.2-mini
max_tokens: 2048
temperature: 0.5

DeepSeek

DeepSeek V3 delivers near-top-tier quality at a fraction of the cost, especially for Chinese-language scenarios.

provider:
name: deepseek
api_key: "${DEEPSEEK_API_KEY}"
endpoint: "https://api.deepseek.com"
models:
primary:
id: deepseek-v3
max_tokens: 8192
temperature: 0.7
DeepSeek Privacy Notice

DeepSeek is a Chinese company and its API service data processing is subject to Chinese regulations. If you handle sensitive personal data or trade secrets, evaluate carefully. You can run DeepSeek open-source models locally via Ollama instead.

Ollama (Local Models)

Run open-source LLMs on your own machine. Fully offline, zero cost, maximum privacy.

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.3:70b
ollama pull deepseek-v3:distill-32b
provider:
name: ollama
endpoint: "http://127.0.0.1:11434"
models:
primary:
id: llama3.3:70b
max_tokens: 4096
temperature: 0.7

Hardware recommendations:

Model SizeMinimum RAMRecommended GPU
7B params8 GB RAMNot required (CPU works)
13B params16 GB RAM6 GB VRAM
27-32B params32 GB RAM12 GB VRAM
70B params64 GB RAM24 GB VRAM
Apple Silicon Users

M1 Pro/Max and newer Macs run Ollama well thanks to unified memory architecture. M4 Max 64GB can smoothly run 70B models with near-cloud-API response speeds.


Local vs Cloud Trade-offs

FactorLocal (Ollama)Cloud API
PrivacyData never leaves your machineSent to third-party servers
CostOnly electricityPay per usage
SpeedHardware-dependentUsually faster
QualityOpen-source models slightly lagTop-tier closed models
AvailabilityAlways availableDepends on network and API status
Hybrid Mode Recommended

Best practice is hybrid mode: use local models for daily chat (zero cost, high privacy), auto-switch to cloud API when high-quality reasoning is needed.

routing:
strategy: hybrid
default: ollama
escalation:
provider: anthropic
model: claude-opus-4-6
trigger:
- complexity_score: 0.7
- explicit_request: true

Cost Estimates

Based on 100 conversations per day (average 500 input + 1000 output tokens each):

ModelDaily Cost (USD)Monthly Cost (USD)
Claude Opus 4.6~$2.25~$67.50
Claude Sonnet 4.5~$0.45~$13.50
GPT-5.2 Codex~$2.10~$63.00
GPT-5.2 Mini~$0.15~$4.50
Gemini 3 Pro~$0.53~$15.75
DeepSeek V3~$0.08~$2.40
Ollama (local)$0$0

Next Steps

After choosing your AI model, it is time to give it a unique personality: