Registering a custom provider in OpenClaw's ~/.openclaw/openclaw.json lets you switch the default model to LongCat-2.0; the context-window and maximum-output settings given by the official source (1048576 / 131072) can be copied directly.
Suitable tasks: Use LongCat-2.0 in the OpenClaw multi-Agent framework; set LongCat as the default model for everyday Agent tasks
Unsuitable tasks: Scenarios without an OpenClaw environment (the configuration applies only to this framework)
Applicable model version: LongCat-2.0
Applicable clients, Agents, or APIs: OpenClaw (installed with npm/pnpm/curl, on macOS/Windows; Web console at http://127.0.0.1:18789)
Recommended reasoning tier and parameters: The official example sets "reasoning": false (disables the reasoning flag in the OpenClaw model); contextWindow: 1048576 (1M), maxTokens: 131072 (128K); use max_tokens for the billing field
# macOS
npm install -g openclaw@latest
# or pnpm add -g openclaw@latest
# or curl -fsSL https://openclaw.ai/install.sh | bash
# Windows PowerShell: iwr -useb https://openclaw.ai/install.ps1 | iexopenclaw onboard --install-daemonOfficial onboarding recommendations: choose QuickStart for Onboarding Mode; choose Skip for now for Model/Auth Provider; leave Default model unchanged; if no suitable Channel is available, choose Skip for now and configure it later; choose Install/Reinstall for Gateway Service. After completion, the default Web console address is http://127.0.0.1:18789, and the configuration file is at ~/.openclaw/openclaw.json.
openclaw.json){
"models": {
"mode": "merge",
"providers": {
"longCat": {
"baseUrl": "https://api.longcat.chat/openai/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"authHeader": true,
"models": [
{
"id": "LongCat-2.0",
"name": "LongCat-2.0",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 131072,
"compat": {
"maxTokensField": "max_tokens"
}
}
]
}
}
}
}{
"agents": {
"defaults": {
"model": {
"primary": "longCat/LongCat-2.0"
}
}
}
}The change takes effect immediately after saving. You can also use the GUI: Web console → Config → Models → Providers, choose openai-completions for Api, and enter the API key and baseUrl.
All configuration items were transcribed verbatim from the official documentation (collected on 2026-08-18).
The official model card lists OpenClaw as one of the three major Harnesses deeply adapted for LongCat-2.0 (alongside Claude Code and Hermes); the README explicitly says it is "deeply integrated with mainstream harnesses such as Claude Code, OpenClaw, and Hermes."
The same official documentation directory also has integration pages for OpenCode, Codex, ZCode, Cline, Kilo Code, Cherry Studio, CodeBuddy, WorkBuddy, CC Switch, and other tools. The configuration pattern is the same (an OpenAI-compatible endpoint plus a model ID).
"reasoning": false declares on the OpenClaw side whether the model outputs a reasoning field; it does not disable LongCat's thinking mode. LongCat's thinking mode is controlled by the thinking field in the request body (see the official API reference).
The official documentation's contextWindow: 1048576 is a provider declaration; whether a stable 1M context can actually be used depends on the task and deployment channel (the OpenRouter channel likewise labels it as 1M context).
LongCat 2.0