
























@@ -29,13 +29,53 @@ Treat them differently from normal config:
29293030## Local model lean mode
313132-`agents.defaults.experimental.localModelLean: true` is a pressure-release valve
33-for weaker local-model setups. It trims heavyweight default tools like
34-`browser`, `cron`, and `message` so the prompt shape is smaller and less brittle
35-for small-context or stricter OpenAI-compatible backends.
32+`agents.defaults.experimental.localModelLean: true` is a pressure-release valve for weaker local-model setups. When it is on, OpenClaw drops three default tools — `browser`, `cron`, and `message` — from the agent's tool surface for every turn. Nothing else changes.
363337-That is intentionally **not** the normal path. If your backend handles the full
38-runtime cleanly, leave this off.
34+### Why these three tools
35+36+These three tools have the largest descriptions and the most parameter shapes in the default OpenClaw runtime. On a small-context or stricter OpenAI-compatible backend that is the difference between:
37+38+- Tool schemas fitting cleanly in the prompt vs. crowding out conversation history.
39+- The model picking the right tool vs. emitting malformed tool calls because there are too many similar-looking schemas.
40+- The Chat Completions adapter staying inside the server's structured-output limits vs. tripping a 400 on tool-call payload size.
41+42+Removing them does not silently rewire OpenClaw — it just makes the tool list shorter. The model still has `read`, `write`, `edit`, `exec`, `apply_patch`, web search/fetch (when configured), memory, and session/agent tools available.
43+44+### When to turn it on
45+46+Enable lean mode when you have already proved the model can talk to the Gateway but full agent turns misbehave. The typical signal chain is:
47+48+1. `openclaw infer model run --gateway --model <ref> --prompt "Reply with exactly: pong"` succeeds.
49+2. A normal agent turn fails with malformed tool calls, oversized prompts, or the model ignoring its tools.
50+3. Toggling `localModelLean: true` clears the failure.
51+52+### When to leave it off
53+54+If your backend handles the full default runtime cleanly, leave this off. Lean mode is a workaround, not a default. It exists because some local stacks need a smaller tool surface to behave; hosted models and well-resourced local rigs do not.
55+56+Lean mode also does not replace `tools.profile`, `tools.allow`/`tools.deny`, or the model `compat.supportsTools: false` escape hatch. If you need a permanent narrower tool surface for a specific agent, prefer those stable knobs over the experimental flag.
57+58+### Enable
59+60+```json5
61+{
62+ agents: {
63+ defaults: {
64+ experimental: {
65+ localModelLean: true,
66+ },
67+ },
68+ },
69+}
70+```
71+72+Restart the Gateway after changing the flag, then confirm the trimmed tool list with:
73+74+```bash
75+openclaw status --deep
76+```
77+78+The deep status output lists the active agent tools; `browser`, `cron`, and `message` should be absent when lean mode is on.
39794080## Experimental does not mean hidden
4181此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。