URGENT: How to Set Up Claude Opus 4.6 on OpenClaw

URGENT: How to Set Up Claude Opus 4.6 on OpenClaw

Configure Claude Opus 4.6 on OpenClaw with copy-paste settings. Unlock 1M token context and 128K output for your AI assistant.

Why “URGENT”

On February 5, 2026, Anthropic released Claude Opus 4.6. 1 million token context, 128K token output, enhanced planning and self-correction capabilities.

If you’re an OpenClaw user, you want to set this up right now. For a deeper look at how to leverage Opus 4.6’s tool-calling capabilities, see the Claude Agent SDK Tool Use Complete Guide.

This post gives you the shortest path to a working setup — copy, paste, and go.

Prerequisites

  • OpenClaw installed (npm install -g openclaw@latest)
  • Anthropic API key configured (claude setup-token)

If not, see the official docs. If you’re also using Claude Code, Claude Code Best Practices is worth reviewing for workflow setup.

Editing the Config File

Open ~/.openclaw/openclaw.json and add or modify these two sections.

1. models — Define Opus 4.6

"models": {
  "mode": "merge",
  "providers": {
    "anthropic": {
      "baseUrl": "https://api.anthropic.com",
      "api": "anthropic-messages",
      "models": [
        {
          "id": "claude-opus-4-6",
          "name": "Claude Opus 4.6",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 1000000,
          "maxTokens": 128000
        }
      ]
    }
  }
}

Key points:

  • mode: "merge"adds to OpenClaw’s built-in model catalog (doesn’t replace it)
  • reasoning: true — enables Opus 4.6 reasoning mode
  • contextWindow: 1000000 — full 1M token context
  • maxTokens: 128000 — 128K token long output

2. agents — Set the Default Model

"agents": {
  "defaults": {
    "model": {
      "primary": "anthropic/claude-opus-4-6",
      "fallbacks": [
        "anthropic/claude-opus-4-5"
      ]
    },
    "contextTokens": 1000000
  }
}

Key points:

  • primary — uses Opus 4.6 as default for all sessions
  • fallbacks — falls back to Opus 4.5 when Opus 4.6 is unavailable
  • contextTokens: 1000000 — lets the agent use the full 1M context

Applying the Config

After saving, two steps are required.

Step 1: Restart the Gateway

openclaw gateway restart

This reloads the config file.

Step 2: Start a New Session

Existing sessions retain the old model config. Send this in chat:

/new

Or /reset. The new model won’t apply until you start a new session.

Verify the Setup

Check if the config is correct:

openclaw models status

If anthropic/claude-opus-4-6 shows as the primary model, you’re good.

You can also check from within chat:

/model status

Summary

  1. Edit the models and agents sections in openclaw.json
  2. Run openclaw gateway restart
  3. Start a new session with /new
  4. Verify with openclaw models status

That’s it. Welcome to the world of 1 million token context. To track usage and costs over time, Claude Code Usage Insights Analysis has the monitoring setup you need.

References

Read in Other Languages

Was this helpful?

Your support helps me create better content. Buy me a coffee.

About the Author

jw

Kim Jangwook

Full-Stack Developer specializing in AI/LLM

Building AI agent systems, LLM applications, and automation solutions with 10+ years of web development experience. Sharing practical insights on Claude Code, MCP, and RAG systems.

Back to Blog