diff --git a/CHANGELOG.md b/CHANGELOG.md index 9747d327fc0..65b7b72d1f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ Docs: https://docs.openclaw.ai ### Changes -- Agents/local models: add `agents.defaults.localModelMode: "lean"` to drop heavyweight default tools like `browser`, `cron`, and `message`, reducing prompt size for weaker local-model setups without changing the normal path. Thanks @ImLukeF. +- Docs/showcase: add a scannable hero, complete section jump links, and a responsive video grid for community examples. (#48493) Thanks @jchopard69. +- Agents/local models: add experimental `agents.defaults.experimental.localModelLean: true` to drop heavyweight default tools like `browser`, `cron`, and `message`, reducing prompt size for weaker local-model setups without changing the normal path. Thanks @ImLukeF. - QA/Matrix: split Matrix live QA into a source-linked `qa-matrix` runner and keep repo-private `qa-*` surfaces out of packaged and published builds. (#66723) Thanks @gumadeiras. - Control UI/Overview: add a Model Auth status card showing OAuth token health and provider rate-limit pressure at a glance, with attention callouts when OAuth tokens are expiring or expired. Backed by a new `models.authStatus` gateway method that strips credentials and caches for 60s. (#66211) Thanks @omarshahine. - GitHub Copilot/memory search: add a GitHub Copilot embedding provider for memory search, and expose a dedicated Copilot embedding host helper so plugins can reuse the transport while honoring remote overrides, token refresh, and safer payload validation. (#61718) Thanks @feiskyer and @vincentkoc. diff --git a/docs/.generated/config-baseline.sha256 b/docs/.generated/config-baseline.sha256 index 32d8fec82de..47d84462069 100644 --- a/docs/.generated/config-baseline.sha256 +++ b/docs/.generated/config-baseline.sha256 @@ -1,4 +1,4 @@ -8ae312a03361238f30a2454258808744b7ad6a5d079ff321eaa60f4b8af82005 config-baseline.json -2dac6cea7a03051e10c4f1ceeb8025c23220a550b940156d6eddeb8e3ecd75f1 config-baseline.core.json +900c26a9b060f1dfa712abfba877bd3bf9c7b0c9f2294faf9834038283ec24b6 config-baseline.json +d956a1d60f776bba712cb04374a4f5657cad95bb088b536c5e3e4e29d4a21328 config-baseline.core.json ef83a06633fc001b5b2535566939186ecb49d05cd1a90b40e54cc58d3e6e44e3 config-baseline.channel.json 5f5d4e850df6e9854a85b5d008236854ce185c707fdbb566efcf00f8c08b36e3 config-baseline.plugin.json diff --git a/docs/gateway/local-models.md b/docs/gateway/local-models.md index c54e2165c0e..28b1c2a12d7 100644 --- a/docs/gateway/local-models.md +++ b/docs/gateway/local-models.md @@ -165,8 +165,9 @@ Compatibility notes for stricter OpenAI-compatible backends: agent-runtime prompt shape, especially when tool schemas are included. If the backend works for tiny direct `/v1/chat/completions` calls but fails on normal OpenClaw agent turns, first try - `agents.defaults.localModelMode: "lean"` to drop heavyweight default tools - like `browser`, `cron`, and `message`; if that still fails, try + `agents.defaults.experimental.localModelLean: true` to drop heavyweight + default tools like `browser`, `cron`, and `message`; this is an experimental + flag, not a stable default-mode setting. If that still fails, try `models.providers..models[].compat.supportsTools: false`. - If the backend still fails only on larger OpenClaw runs, the remaining issue is usually upstream model/server capacity or a backend bug, not OpenClaw's diff --git a/src/agents/pi-tools.model-provider-collision.test.ts b/src/agents/pi-tools.model-provider-collision.test.ts index c04f8a8e6fb..e29b482f657 100644 --- a/src/agents/pi-tools.model-provider-collision.test.ts +++ b/src/agents/pi-tools.model-provider-collision.test.ts @@ -116,7 +116,7 @@ describe("applyModelProviderToolPolicy", () => { expect(toolNames(filtered)).toEqual(["read", "web_search", "exec"]); }); - it("drops heavyweight tools when lean local-model mode is enabled", () => { + it("drops heavyweight tools when the experimental lean local-model flag is enabled", () => { const filtered = __testing.applyModelProviderToolPolicy( [ { name: "read" }, @@ -129,7 +129,9 @@ describe("applyModelProviderToolPolicy", () => { config: { agents: { defaults: { - localModelMode: "lean", + experimental: { + localModelLean: true, + }, }, }, }, @@ -142,7 +144,7 @@ describe("applyModelProviderToolPolicy", () => { expect(toolNames(filtered)).toEqual(["read", "exec"]); }); - it("keeps heavyweight tools when lean local-model mode is not enabled", () => { + it("keeps heavyweight tools when the experimental lean local-model flag is not enabled", () => { const filtered = __testing.applyModelProviderToolPolicy( [ { name: "read" }, @@ -155,7 +157,9 @@ describe("applyModelProviderToolPolicy", () => { config: { agents: { defaults: { - localModelMode: "default", + experimental: { + localModelLean: false, + }, }, }, }, diff --git a/src/agents/pi-tools.ts b/src/agents/pi-tools.ts index 4a1679c70e9..a3f79754da0 100644 --- a/src/agents/pi-tools.ts +++ b/src/agents/pi-tools.ts @@ -131,7 +131,7 @@ function applyModelProviderToolPolicy( modelCompat?: ModelCompatConfig; }, ): AnyAgentTool[] { - if (params?.config?.agents?.defaults?.localModelMode === "lean") { + if (params?.config?.agents?.defaults?.experimental?.localModelLean === true) { const leanDeny = new Set(["browser", "cron", "message"]); tools = tools.filter((tool) => !leanDeny.has(tool.name)); } diff --git a/src/config/schema.base.generated.ts b/src/config/schema.base.generated.ts index 2da7b522cd9..f009aee0807 100644 --- a/src/config/schema.base.generated.ts +++ b/src/config/schema.base.generated.ts @@ -3243,20 +3243,20 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = { description: "Max total characters across all injected workspace bootstrap files (default: 150000).", }, - localModelMode: { - anyOf: [ - { - type: "string", - const: "default", + experimental: { + type: "object", + properties: { + localModelLean: { + type: "boolean", + title: "Enable Lean Local Model Mode (Experimental)", + description: + "Experimental local-model prompt trim. When enabled, OpenClaw drops heavyweight default tools like browser, cron, and message for weaker or smaller local-model backends.", }, - { - type: "string", - const: "lean", - }, - ], - title: "Local Model Mode", + }, + additionalProperties: false, + title: "Experimental Agent Flags", description: - 'Local-model prompt profile: "default" keeps the standard tool surface, while "lean" drops heavyweight non-essential tools for smaller or weaker models.', + "Experimental agent-default flags. Keep these off unless you are intentionally testing a preview surface.", }, bootstrapPromptTruncationWarning: { anyOf: [ @@ -24528,10 +24528,15 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = { help: "Max total characters across all injected workspace bootstrap files (default: 150000).", tags: ["performance"], }, - "agents.defaults.localModelMode": { - label: "Local Model Mode", - help: 'Local-model prompt profile: "default" keeps the standard tool surface, while "lean" drops heavyweight non-essential tools for smaller or weaker models.', - tags: ["advanced"], + "agents.defaults.experimental": { + label: "Experimental Agent Flags", + help: "Experimental agent-default flags. Keep these off unless you are intentionally testing a preview surface.", + tags: ["security", "advanced"], + }, + "agents.defaults.experimental.localModelLean": { + label: "Enable Lean Local Model Mode (Experimental)", + help: "Experimental local-model prompt trim. When enabled, OpenClaw drops heavyweight default tools like browser, cron, and message for weaker or smaller local-model backends.", + tags: ["security", "advanced"], }, "agents.defaults.bootstrapPromptTruncationWarning": { label: "Bootstrap Prompt Truncation Warning", diff --git a/src/config/schema.help.ts b/src/config/schema.help.ts index 9534dfe208b..c138a5fb064 100644 --- a/src/config/schema.help.ts +++ b/src/config/schema.help.ts @@ -848,8 +848,10 @@ export const FIELD_HELP: Record = { "Max characters of each workspace bootstrap file injected into the system prompt before truncation (default: 20000).", "agents.defaults.bootstrapTotalMaxChars": "Max total characters across all injected workspace bootstrap files (default: 150000).", - "agents.defaults.localModelMode": - 'Local-model prompt profile: "default" keeps the standard tool surface, while "lean" drops heavyweight non-essential tools for smaller or weaker models.', + "agents.defaults.experimental": + "Experimental agent-default flags. Keep these off unless you are intentionally testing a preview surface.", + "agents.defaults.experimental.localModelLean": + "Experimental local-model prompt trim. When enabled, OpenClaw drops heavyweight default tools like browser, cron, and message for weaker or smaller local-model backends.", "agents.defaults.bootstrapPromptTruncationWarning": 'Inject agent-visible warning text when bootstrap files are truncated: "off", "once" (default), or "always".', "agents.defaults.startupContext": diff --git a/src/config/schema.labels.ts b/src/config/schema.labels.ts index 89ae176cf77..8f1b63c9bf4 100644 --- a/src/config/schema.labels.ts +++ b/src/config/schema.labels.ts @@ -343,7 +343,8 @@ export const FIELD_LABELS: Record = { "agents.defaults.contextInjection": "Context Injection", "agents.defaults.bootstrapMaxChars": "Bootstrap Max Chars", "agents.defaults.bootstrapTotalMaxChars": "Bootstrap Total Max Chars", - "agents.defaults.localModelMode": "Local Model Mode", + "agents.defaults.experimental": "Experimental Agent Flags", + "agents.defaults.experimental.localModelLean": "Enable Lean Local Model Mode (Experimental)", "agents.defaults.bootstrapPromptTruncationWarning": "Bootstrap Prompt Truncation Warning", "agents.defaults.startupContext": "Startup Context", "agents.defaults.startupContext.enabled": "Enable Startup Context", diff --git a/src/config/types.agent-defaults.ts b/src/config/types.agent-defaults.ts index 005ae3feab6..4e7b53c01bb 100644 --- a/src/config/types.agent-defaults.ts +++ b/src/config/types.agent-defaults.ts @@ -13,7 +13,6 @@ import type { MemorySearchConfig } from "./types.tools.js"; export type AgentContextInjection = "always" | "continuation-skip"; export type EmbeddedPiExecutionContract = "default" | "strict-agentic"; -export type LocalModelMode = "default" | "lean"; export type AgentModelEntryConfig = { alias?: string; @@ -199,12 +198,14 @@ export type AgentDefaultsConfig = { bootstrapMaxChars?: number; /** Max total chars across all injected bootstrap files (default: 150000). */ bootstrapTotalMaxChars?: number; - /** - * Optional local-model prompt profile: - * - default: keep the standard tool surface - * - lean: drop heavyweight non-essential tools for smaller or weaker models - */ - localModelMode?: LocalModelMode; + /** Experimental agent-default flags. Keep off unless you are intentionally testing a preview surface. */ + experimental?: { + /** + * Drop heavyweight non-essential default tools for weaker or smaller local + * model backends. Experimental preview only. + */ + localModelLean?: boolean; + }; /** * Agent-visible bootstrap truncation warning mode: * - off: do not inject warning text diff --git a/src/config/zod-schema.agent-defaults.test.ts b/src/config/zod-schema.agent-defaults.test.ts index 62f99649bcc..7a193ffccbe 100644 --- a/src/config/zod-schema.agent-defaults.test.ts +++ b/src/config/zod-schema.agent-defaults.test.ts @@ -32,6 +32,15 @@ describe("agent defaults schema", () => { ).not.toThrow(); }); + it("accepts experimental.localModelLean", () => { + const result = AgentDefaultsSchema.parse({ + experimental: { + localModelLean: true, + }, + })!; + expect(result.experimental?.localModelLean).toBe(true); + }); + it("accepts contextInjection: always", () => { const result = AgentDefaultsSchema.parse({ contextInjection: "always" })!; expect(result.contextInjection).toBe("always"); diff --git a/src/config/zod-schema.agent-defaults.ts b/src/config/zod-schema.agent-defaults.ts index 5ed294f6c2c..cf4e07c3400 100644 --- a/src/config/zod-schema.agent-defaults.ts +++ b/src/config/zod-schema.agent-defaults.ts @@ -52,7 +52,12 @@ export const AgentDefaultsSchema = z contextInjection: z.union([z.literal("always"), z.literal("continuation-skip")]).optional(), bootstrapMaxChars: z.number().int().positive().optional(), bootstrapTotalMaxChars: z.number().int().positive().optional(), - localModelMode: z.union([z.literal("default"), z.literal("lean")]).optional(), + experimental: z + .object({ + localModelLean: z.boolean().optional(), + }) + .strict() + .optional(), bootstrapPromptTruncationWarning: z .union([z.literal("off"), z.literal("once"), z.literal("always")]) .optional(),