From e01107fb4ab3b78c01b36bdf89303d960bce8578 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Tue, 28 Apr 2026 04:24:11 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@870d993eb85c02bdcaba5e13e53167b3a641b296 --- .openclaw-sync/source.json | 4 ++-- docs/concepts/models.md | 1 + docs/gateway/protocol.md | 10 +++++++++- docs/web/control-ui.md | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 349e1a775..5989f85b4 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "738f5f7508ae829e5976cd45b240771fb0832937", - "syncedAt": "2026-04-28T04:17:55.058Z" + "sha": "870d993eb85c02bdcaba5e13e53167b3a641b296", + "syncedAt": "2026-04-28T04:22:51.393Z" } diff --git a/docs/concepts/models.md b/docs/concepts/models.md index 630fbaebd..ab4e70f01 100644 --- a/docs/concepts/models.md +++ b/docs/concepts/models.md @@ -61,6 +61,7 @@ The same `provider/model` can mean different things depending on where it came f - Auto fallback selections are temporary recovery state. They are stored with `modelOverrideSource: "auto"` so later turns can keep using the fallback chain without probing a known-bad primary first. - User session selections are exact. `/model`, the model picker, `session_status(model=...)`, and `sessions.patch` store `modelOverrideSource: "user"`; if that selected provider/model is unreachable, OpenClaw fails visibly instead of falling through to another configured model. - Cron `--model` / payload `model` is a per-job primary. It still uses configured fallbacks unless the job supplies explicit payload `fallbacks` (use `fallbacks: []` for a strict cron run). +- The Control UI model picker asks the Gateway for its configured model view: `agents.defaults.models` when present, otherwise explicit `models.providers.*.models`, otherwise the full catalog so fresh installs are not blank. ## Quick model policy diff --git a/docs/gateway/protocol.md b/docs/gateway/protocol.md index 803e7666b..e9cae71fc 100644 --- a/docs/gateway/protocol.md +++ b/docs/gateway/protocol.md @@ -288,7 +288,7 @@ enumeration of `src/gateway/server-methods/*.ts`. - - `models.list` returns the runtime-allowed model catalog. + - `models.list` returns the runtime-allowed model catalog. Pass `{ "view": "configured" }` for picker-sized configured models (`agents.defaults.models` first, then `models.providers.*.models`), or `{ "view": "all" }` for the full catalog. - `usage.status` returns provider usage windows/remaining quota summaries. - `usage.cost` returns aggregated cost usage summaries for a date range. - `doctor.memory.status` returns vector-memory / cached embedding readiness for the active default agent workspace. Pass `{ "probe": true }` or `{ "deep": true }` only when the caller explicitly wants a live embedding provider ping. @@ -465,6 +465,14 @@ enumeration of `src/gateway/server-methods/*.ts`. - Config mode patches `skills.entries.` values such as `enabled`, `apiKey`, and `env`. +### `models.list` views + +`models.list` accepts an optional `view` parameter: + +- Omitted or `"default"`: current runtime behavior. If `agents.defaults.models` is configured, the response is the allowed catalog; otherwise the response is the full Gateway catalog. +- `"configured"`: picker-sized behavior. If `agents.defaults.models` is configured, it still wins. Otherwise the response uses explicit `models.providers.*.models` entries, falling back to the full catalog only when no configured model rows exist. +- `"all"`: full Gateway catalog, bypassing `agents.defaults.models`. Use this for diagnostics and discovery UIs, not normal model pickers. + ## Exec approvals - When an exec request needs approval, the gateway broadcasts `exec.approval.requested`. diff --git a/docs/web/control-ui.md b/docs/web/control-ui.md index 439c7ceb7..4fee01d4c 100644 --- a/docs/web/control-ui.md +++ b/docs/web/control-ui.md @@ -148,6 +148,7 @@ Imported themes are stored only in the current browser profile. They are not wri - During an active send and the final history refresh, the chat view keeps local optimistic user/assistant messages visible if `chat.history` briefly returns an older snapshot; the canonical transcript replaces those local messages once the Gateway history catches up. - `chat.inject` appends an assistant note to the session transcript and broadcasts a `chat` event for UI-only updates (no agent run, no channel delivery). - The chat header model and thinking pickers patch the active session immediately through `sessions.patch`; they are persistent session overrides, not one-turn-only send options. + - The chat model picker requests the Gateway's configured model view. If `agents.defaults.models` is present, that allowlist drives the picker. Otherwise the picker shows explicit `models.providers.*.models` entries before falling back to the full catalog for fresh installs. - When fresh Gateway session usage reports show high context pressure, the chat composer area shows a context notice and, at recommended compaction levels, a compact button that runs the normal session compaction path. Stale token snapshots are hidden until the Gateway reports fresh usage again.