From f2fe3afae59431202e7d66c37ee0715db2e98947 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Sun, 26 Apr 2026 03:38:33 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@b58223510c8134f4a91f6c289a4e8fe715dcb925 --- .openclaw-sync/source.json | 4 ++-- docs/gateway/config-agents.md | 1 + docs/providers/zai.md | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 686ed74ca..8fb5318da 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "2c8c79de5c778d25eba6a65c6fcbf38c107f42a9", - "syncedAt": "2026-04-26T03:29:14.078Z" + "sha": "b58223510c8134f4a91f6c289a4e8fe715dcb925", + "syncedAt": "2026-04-26T03:36:59.099Z" } diff --git a/docs/gateway/config-agents.md b/docs/gateway/config-agents.md index d5acd35f5..2586567c3 100644 --- a/docs/gateway/config-agents.md +++ b/docs/gateway/config-agents.md @@ -372,6 +372,7 @@ Time format in system prompt. Default: `auto` (OS preference). - `params` merge precedence (config): `agents.defaults.params` (global base) is overridden by `agents.defaults.models["provider/model"].params` (per-model), then `agents.list[].params` (matching agent id) overrides by key. See [Prompt Caching](/reference/prompt-caching) for details. - `params.extra_body`/`params.extraBody`: advanced pass-through JSON merged into `api: "openai-completions"` request bodies for OpenAI-compatible proxies. If it collides with generated request keys, the extra body wins; non-native completions routes still strip OpenAI-only `store` afterward. - `params.chat_template_kwargs`: vLLM/OpenAI-compatible chat-template arguments merged into top-level `api: "openai-completions"` request bodies. For `vllm/nemotron-3-*` with thinking off, OpenClaw automatically sends `enable_thinking: false` and `force_nonempty_content: true`; explicit `chat_template_kwargs` override those defaults, and `extra_body.chat_template_kwargs` still has final precedence. +- `params.preserveThinking`: Z.AI-only opt-in for preserved thinking. When enabled and thinking is on, OpenClaw sends `thinking.clear_thinking: false` and replays prior `reasoning_content`; see [Z.AI thinking and preserved thinking](/providers/zai#thinking-and-preserved-thinking). - `embeddedHarness`: default low-level embedded agent runtime policy. Omitted runtime defaults to OpenClaw Pi. Use `runtime: "pi"` to force the built-in PI harness, `runtime: "auto"` to let registered plugin harnesses claim supported models, or a registered harness id such as `runtime: "codex"`. Set `fallback: "none"` to disable automatic PI fallback. Explicit plugin runtimes such as `codex` fail closed by default unless you set `fallback: "pi"` in the same override scope. Keep model refs canonical as `provider/model`; select Codex, Claude CLI, Gemini CLI, and other execution backends through runtime config instead of legacy runtime provider prefixes. See [Agent runtimes](/concepts/agent-runtimes) for how this differs from provider/model selection. - Config writers that mutate these fields (for example `/models set`, `/models set-image`, and fallback add/remove commands) save canonical object form and preserve existing fallback lists when possible. - `maxConcurrent`: max parallel agent runs across sessions (each session still serialized). Default: 4. diff --git a/docs/providers/zai.md b/docs/providers/zai.md index 114965543..43f45d7e8 100644 --- a/docs/providers/zai.md +++ b/docs/providers/zai.md @@ -132,6 +132,38 @@ GLM models are available as `zai/` (example: `zai/glm-5`). The default bu + + Z.AI thinking follows OpenClaw's `/think` controls. With thinking off, + OpenClaw sends `thinking: { type: "disabled" }` to avoid responses that + spend the output budget on `reasoning_content` before visible text. + + Preserved thinking is opt-in because Z.AI requires the full historical + `reasoning_content` to be replayed, which increases prompt tokens. Enable it + per model: + + ```json5 + { + agents: { + defaults: { + models: { + "zai/glm-5.1": { + params: { preserveThinking: true }, + }, + }, + }, + }, + } + ``` + + When enabled and thinking is on, OpenClaw sends + `thinking: { type: "enabled", clear_thinking: false }` and replays prior + `reasoning_content` for the same OpenAI-compatible transcript. + + Advanced users can still override the exact provider payload with + `params.extra_body.thinking`. + + + The bundled Z.AI plugin registers image understanding.