Skip to main content
OpenClaw

Prerequisites

Follow the official documentation to install OpenClaw (formerly Moltbot/Clawdbot). Supports macOS, Windows (WSL2), Linux. For price ratio, please refer to Models & Pricing. For API addresses and backup URLs, see API Call Examples

Locate the OpenClaw Configuration File

macOS / Linux / WSL2: ~/.openclaw/openclaw.json or ~/.moltbot/moltbot.json or ~/.clawdbot/clawdbot.json

Modify the Configuration File

Write the following content into your configuration file, replacing Your Authcode with your actual auth code:
{
  "models": {
    "mode": "merge",
    "providers": {
      "anthropic": {
        "baseUrl": "https://ai.liaobots.work",
        "apiKey": "Your Authcode",
        "models": []
      },
      "google": {
        "baseUrl": "https://ai.liaobots.work/v1beta",
        "apiKey": "Your Authcode",
        "models": []
      },
      "openai-codex": {
        "baseUrl": "https://ai.liaobots.work/codex/v1",
        "apiKey": "Your Authcode",
        "api": "openai-responses",
        "models": []
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-6"
      },
      "models": {
        "anthropic/claude-sonnet-4-6": {}
      }
    }
  }
}
Notes:
  • The models section configures three providers for Claude, Gemini, and OpenAI Codex model families respectively
  • models: [] means no filtering — all available models under that provider can be used
  • The agents section sets the default model to anthropic/claude-sonnet-4-6

Switch the Currently Used Model in OpenClaw

After completing the configuration, you can switch models using the following commands:
openclaw models set anthropic/claude-sonnet-4-6
openclaw models set google/gemini-2.5-pro
openclaw models set openai-codex/o3-pro