openclaw - 💡(How to fix) Fix Guide: Restoring tool-calling after Anthropic dropped OC support (model migration to OpenRouter) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62273Fetched 2026-04-08 03:06:52
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

On 2026-04-04, Anthropic dropped OpenClaw support. Agents that relied on Claude as their model lost tool-calling ability. This documents the root causes and fixes for migrating to OpenRouter models while keeping tools working.

Root Cause

On 2026-04-04, Anthropic dropped OpenClaw support. Agents that relied on Claude as their model lost tool-calling ability. This documents the root causes and fixes for migrating to OpenRouter models while keeping tools working.

Code Example

{
  "id": "openai/gpt-4.1-mini",
  "name": "GPT-4.1 Mini (OpenRouter)",
  "compat": {
    "supportsTools": true,
    "supportsStrictMode": false,
    "supportsStore": false,
    "supportsDeveloperRole": true
  }
}

---

## Tool Access
Your tools are OC native tools: read, write, exec, web_search, web_fetch, browser.

Rules:
- Do NOT narrate tool calls as text — ACTUALLY CALL the tool
- If you want to check a file, call `read` with the path
- If you want to run a command, call `exec`
- Every response that involves files or commands MUST include actual tool calls

---

mkdir -p ~/.openclaw/workspace/memory
touch ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
RAW_BUFFERClick to expand / collapse

Context

On 2026-04-04, Anthropic dropped OpenClaw support. Agents that relied on Claude as their model lost tool-calling ability. This documents the root causes and fixes for migrating to OpenRouter models while keeping tools working.

Root Causes

1. Slug-generator timeout kills thinking models

OC's internal llm-slug-generator has a timeout (was 15s in older versions, 60s in 2026.4.5). Models with thinking/reasoning mode (like Kimi K2.5) exceed the timeout, which crashes the entire session lane — the agent goes completely silent.

Fix: Update to OC 2026.4.5+ (npm install -g openclaw@latest). The timeout was bumped to 60s.

2. Not all models actually emit tool calls

Some models technically "support" tools but never emit tool_call JSON through OpenRouter/OC:

ModelTool CallsNotes
GPT-4.1-miniYesBest budget option for tool-calling
Kimi K2.5SometimesWorks but inconsistent, thinking mode can still timeout
DeepSeek V3NeverNarrates tool use as text instead of calling
Gemini (Google direct)BrokenOC's request format incompatible, returns 400

3. compat.supportsTools must be set

OC 2026.4.5 requires compat.supportsTools: true on non-Anthropic model definitions in openclaw.json, otherwise tools are not passed to the model at all.

{
  "id": "openai/gpt-4.1-mini",
  "name": "GPT-4.1 Mini (OpenRouter)",
  "compat": {
    "supportsTools": true,
    "supportsStrictMode": false,
    "supportsStore": false,
    "supportsDeveloperRole": true
  }
}

4. Boot.md tool names must match OC's tools

If your boot.md references Claude Code tool names (Bash, WebFetch, Read, Write, Edit, Glob, Grep), non-Anthropic models won't recognize them. OC's native tools are:

  • read — read files
  • write — write/create files
  • exec — run shell commands
  • web_search — search the web
  • web_fetch — fetch URL content
  • browser — headless browser automation

Update your boot.md to reference these names and explicitly instruct the model to call tools, not narrate them:

## Tool Access
Your tools are OC native tools: read, write, exec, web_search, web_fetch, browser.

Rules:
- Do NOT narrate tool calls as text — ACTUALLY CALL the tool
- If you want to check a file, call `read` with the path
- If you want to run a command, call `exec`
- Every response that involves files or commands MUST include actual tool calls

5. Missing memory files cause boot errors

The session-memory internal hook tries to read workspace/memory/YYYY-MM-DD.md on session start. If the file doesn't exist, it throws ENOENT on every boot. Create today's file:

mkdir -p ~/.openclaw/workspace/memory
touch ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md

Migration Steps

  1. Update OC: npm install -g openclaw@latest (need 2026.4.5+)
  2. Set model: In openclaw.json, set agents.defaults.model.primary to openrouter/openai/gpt-4.1-mini
  3. Add compat flags: Add compat.supportsTools: true to your OpenRouter model definitions
  4. Update boot.md: Replace Claude Code tool names with OC native tool names (see above)
  5. Create memory file: touch ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
  6. Restart: pkill -f openclaw-gateway (launchd or systemd respawns it)
  7. Test: Ask your agent to read a specific file path — confirm it returns actual file contents, not a narration

Don't Use

  • Google direct API provider — returns 400/404 errors with OC's format
  • DeepSeek V3 as primary — can chat but never calls tools
  • Nexos — unreliable
  • Anthropic direct — they dropped OC support

Environment

  • OC 2026.4.5
  • macOS (launchd-managed gateway)
  • OpenRouter API for model access

extent analysis

TL;DR

Update OpenClaw to version 2026.4.5 or later and modify the openclaw.json and boot.md files to ensure compatibility with OpenRouter models and tool-calling functionality.

Guidance

  • Update OpenClaw to the latest version using npm install -g openclaw@latest to increase the timeout for thinking models and ensure compatibility with OpenRouter models.
  • Set compat.supportsTools: true in the openclaw.json file for non-Anthropic model definitions to enable tool-calling functionality.
  • Update the boot.md file to reference OpenClaw's native tool names and instruct the model to call tools instead of narrating them.
  • Create a memory file using touch ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md to prevent boot errors caused by missing memory files.

Example

{
  "id": "openai/gpt-4.1-mini",
  "name": "GPT-4.1 Mini (OpenRouter)",
  "compat": {
    "supportsTools": true,
    "supportsStrictMode": false,
    "supportsStore": false,
    "supportsDeveloperRole": true
  }
}

Notes

The provided guidance assumes that the user is running OpenClaw on a macOS environment with launchd-managed gateway and has access to the OpenRouter API for model access.

Recommendation

Apply the workaround by updating OpenClaw to the latest version, modifying the openclaw.json and boot.md files, and creating a memory file to ensure compatibility with OpenRouter models and tool-calling functionality. This is recommended because the official fix is to update to OpenClaw version 2026.4.5 or later, which addresses the root causes of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING