How to Switch AI Models in OpenClaw

OpenClaw FAQ

OpenClaw supports 20+ AI providers. Switch models by updating your config or using the CLI. You can use different models for different agents.

Supported Providers

OpenClaw works with all major AI providers:

  • Anthropic: Claude Opus, Sonnet, Haiku
  • OpenAI: GPT-4o, GPT-4, o1, o3
  • Google: Gemini Pro, Gemini Flash
  • Ollama: Llama, Mistral, Qwen (local)
  • Venice AI: Privacy-focused inference
  • OpenRouter: Access 100+ models through one API

How to Switch

Change the model.primary in your config and restart the gateway. You can also set per-agent models for different use cases.

Model Routing

Advanced users can route different tasks to different models — for example, use Haiku for simple queries and Opus for complex reasoning, saving costs while maintaining quality.

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

// Per-agent model override
{
  "agents": {
    "my-agent": {
      "model": {
        "primary": "openai/gpt-4o"
      }
    }
  }
}

Try OpenClaw — free and open source

Sign up and launch your AI agent in under a minute. No credit card required.

Get Started Free →