diff --git a/CHANGELOG.md b/CHANGELOG.md index a6f053d07..c69779cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ - Agent: deliver final replies for non-streaming models when block chunking is enabled. Thank you @mneves75 for PR #369! - Agent: trim bootstrap context injections and keep group guidance concise (emoji reactions allowed). Thanks @tobiasbischoff for PR #370. - Agent: return a friendly context overflow response (413/request_too_large). Thanks @alejandroOPI for PR #395. +- Agent: auto-enable Z.AI GLM-4.x thinking params (preserved for 4.7, interleaved for 4.5/4.6) unless disabled. Thanks @mneves75 for PR #443. - Sub-agents: allow `sessions_spawn` model overrides and error on invalid models. Thanks @azade-c for PR #298. - Sub-agents: skip invalid model overrides with a warning and keep the run alive; tool exceptions now return tool errors instead of crashing the agent. - Sessions: forward explicit sessionKey through gateway/chat/node bridge to avoid sub-agent sessionId mixups. diff --git a/docs/concepts/models.md b/docs/concepts/models.md index 7ad93c347..7b98afb5d 100644 --- a/docs/concepts/models.md +++ b/docs/concepts/models.md @@ -21,7 +21,7 @@ Clawdbot selects models in this order: Key pieces: - `provider/model` is the canonical model id (e.g. `anthropic/claude-opus-4-5`). -- `agent.models` is the **allowlist/catalog** of models Clawdbot can use, with optional aliases. +- `agent.models` is the **allowlist/catalog** of models Clawdbot can use, with optional aliases and provider params. - `agent.imageModel` is only used when the primary model **can’t** accept images. - `models.providers` lets you add custom providers + models (written to `models.json`). - `/model ` switches the active model for the current session; `/model list` shows what’s allowed. @@ -92,6 +92,7 @@ and an **Auth overview** section showing which providers have profiles/env/model ## Config changes - `agent.models` (configured model catalog + aliases). +- `agent.models.*.params` (provider-specific API params passed through to requests). - `agent.model.primary` + `agent.model.fallbacks`. - `agent.imageModel.primary` + `agent.imageModel.fallbacks` (optional). - `auth.profiles` + `auth.order` for per-provider auth failover. diff --git a/docs/gateway/configuration.md b/docs/gateway/configuration.md index 81be68269..29c457c01 100644 --- a/docs/gateway/configuration.md +++ b/docs/gateway/configuration.md @@ -906,6 +906,13 @@ Controls the embedded agent runtime (model/thinking/verbose/timeouts). `agent.models` defines the configured model catalog (and acts as the allowlist for `/model`). `agent.model.primary` sets the default model; `agent.model.fallbacks` are global failovers. `agent.imageModel` is optional and is **only used if the primary model lacks image input**. +Each `agent.models` entry can include: +- `alias` (optional model shortcut, e.g. `/opus`). +- `params` (optional provider-specific API params passed through to the model request). + +Z.AI GLM-4.x models automatically enable thinking mode unless you: +- set `--thinking off`, or +- define `agent.models["zai/"].params.thinking` yourself. Clawdbot also ships a few built-in alias shorthands. Defaults only apply when the model is already present in `agent.models`: @@ -925,7 +932,16 @@ If you configure the same alias name (case-insensitive) yourself, your value win models: { "anthropic/claude-opus-4-5": { alias: "Opus" }, "anthropic/claude-sonnet-4-1": { alias: "Sonnet" }, - "openrouter/deepseek/deepseek-r1:free": {} + "openrouter/deepseek/deepseek-r1:free": {}, + "zai/glm-4.7": { + alias: "GLM", + params: { + thinking: { + type: "enabled", + clear_thinking: false + } + } + } }, model: { primary: "anthropic/claude-opus-4-5",