diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 68b117960..a5683cb91 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "7a85c1a8226eb7d3a96906d2721a189768d3034a", - "syncedAt": "2026-04-26T02:53:58.043Z" + "sha": "c3833f7729163a8f6cdc47d3b0be86fd5fcab160", + "syncedAt": "2026-04-26T02:56:41.507Z" } diff --git a/docs/concepts/model-providers.md b/docs/concepts/model-providers.md index 5104ecc90..818c8da7f 100644 --- a/docs/concepts/model-providers.md +++ b/docs/concepts/model-providers.md @@ -631,6 +631,11 @@ Notes: - For OpenAI-compatible Completions proxies that need vendor-specific fields, set `agents.defaults.models["provider/model"].params.extra_body` (or `extraBody`) to merge extra JSON into the outbound request body. +- For vLLM chat-template controls, set + `agents.defaults.models["provider/model"].params.chat_template_kwargs`. + OpenClaw automatically sends `enable_thinking: false` and + `force_nonempty_content: true` for `vllm/nemotron-3-*` when the session + thinking level is off. - If `baseUrl` is empty/omitted, OpenClaw keeps the default OpenAI behavior (which resolves to `api.openai.com`). - For safety, an explicit `compat.supportsDeveloperRole: true` is still overridden on non-native `openai-completions` endpoints. diff --git a/docs/gateway/config-agents.md b/docs/gateway/config-agents.md index 4a9d09b74..d5acd35f5 100644 --- a/docs/gateway/config-agents.md +++ b/docs/gateway/config-agents.md @@ -364,13 +364,14 @@ Time format in system prompt. Default: `auto` (OS preference). - `verboseDefault`: default verbose level for agents. Values: `"off"`, `"on"`, `"full"`. Default: `"off"`. - `elevatedDefault`: default elevated-output level for agents. Values: `"off"`, `"on"`, `"ask"`, `"full"`. Default: `"on"`. - `model.primary`: format `provider/model` (e.g. `openai/gpt-5.5` for API-key access or `openai-codex/gpt-5.5` for Codex OAuth). If you omit the provider, OpenClaw tries an alias first, then a unique configured-provider match for that exact model id, and only then falls back to the configured default provider (deprecated compatibility behavior, so prefer explicit `provider/model`). If that provider no longer exposes the configured default model, OpenClaw falls back to the first configured provider/model instead of surfacing a stale removed-provider default. -- `models`: the configured model catalog and allowlist for `/model`. Each entry can include `alias` (shortcut) and `params` (provider-specific, for example `temperature`, `maxTokens`, `cacheRetention`, `context1m`, `responsesServerCompaction`, `responsesCompactThreshold`, `extra_body`/`extraBody`). +- `models`: the configured model catalog and allowlist for `/model`. Each entry can include `alias` (shortcut) and `params` (provider-specific, for example `temperature`, `maxTokens`, `cacheRetention`, `context1m`, `responsesServerCompaction`, `responsesCompactThreshold`, `chat_template_kwargs`, `extra_body`/`extraBody`). - Safe edits: use `openclaw config set agents.defaults.models '' --strict-json --merge` to add entries. `config set` refuses replacements that would remove existing allowlist entries unless you pass `--replace`. - Provider-scoped configure/onboarding flows merge selected provider models into this map and preserve unrelated providers already configured. - For direct OpenAI Responses models, server-side compaction is enabled automatically. Use `params.responsesServerCompaction: false` to stop injecting `context_management`, or `params.responsesCompactThreshold` to override the threshold. See [OpenAI server-side compaction](/providers/openai#server-side-compaction-responses-api). - `params`: global default provider parameters applied to all models. Set at `agents.defaults.params` (e.g. `{ cacheRetention: "long" }`). - `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. - `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/openai.md b/docs/providers/openai.md index 84aab9012..95036c1ad 100644 --- a/docs/providers/openai.md +++ b/docs/providers/openai.md @@ -829,6 +829,7 @@ the Server-side compaction accordion below. - Use looser compat behavior - Strip Completions `store` from non-native `openai-completions` payloads - Accept advanced `params.extra_body`/`params.extraBody` pass-through JSON for OpenAI-compatible Completions proxies + - Accept `params.chat_template_kwargs` for OpenAI-compatible Completions proxies such as vLLM - Do not force strict tool schemas or native-only headers Azure OpenAI uses native transport and compat behavior but does not receive the hidden attribution headers. diff --git a/docs/providers/vllm.md b/docs/providers/vllm.md index 12330d6ba..5ab11cd33 100644 --- a/docs/providers/vllm.md +++ b/docs/providers/vllm.md @@ -82,6 +82,7 @@ Use explicit config when: - vLLM runs on a different host or port - You want to pin `contextWindow` or `maxTokens` values - Your server requires a real API key (or you want to control headers) +- You connect to a trusted loopback, LAN, or Tailscale vLLM endpoint ```json5 { @@ -91,6 +92,7 @@ Use explicit config when: baseUrl: "http://127.0.0.1:8000/v1", apiKey: "${VLLM_API_KEY}", api: "openai-completions", + request: { allowPrivateNetwork: true }, models: [ { id: "your-model-id", @@ -126,6 +128,45 @@ Use explicit config when: + + vLLM/Nemotron 3 can use chat-template kwargs to control whether reasoning is + returned as hidden reasoning or visible answer text. When an OpenClaw session + uses `vllm/nemotron-3-*` with thinking off, OpenClaw sends: + + ```json + { + "chat_template_kwargs": { + "enable_thinking": false, + "force_nonempty_content": true + } + } + ``` + + To customize these values, set `chat_template_kwargs` under the model params. + If you also set `params.extra_body.chat_template_kwargs`, that value has + final precedence because `extra_body` is the last request-body override. + + ```json5 + { + agents: { + defaults: { + models: { + "vllm/nemotron-3-super": { + params: { + chat_template_kwargs: { + enable_thinking: false, + force_nonempty_content: true, + }, + }, + }, + }, + }, + }, + } + ``` + + + If your vLLM server runs on a non-default host or port, set `baseUrl` in the explicit provider config: @@ -137,6 +178,7 @@ Use explicit config when: baseUrl: "http://192.168.1.50:9000/v1", apiKey: "${VLLM_API_KEY}", api: "openai-completions", + request: { allowPrivateNetwork: true }, models: [ { id: "my-custom-model", @@ -167,6 +209,10 @@ Use explicit config when: ``` If you see a connection error, verify the host, port, and that vLLM started with the OpenAI-compatible server mode. + For explicit loopback, LAN, or Tailscale endpoints, also set + `models.providers.vllm.request.allowPrivateNetwork: true`; provider + requests block private-network URLs by default unless the provider is + explicitly trusted.