Skip to content

Commit 9522761

Browse files
committed
fix(config): cover agents.list params validation
1 parent d483915 commit 9522761

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai
1919
- Agents/memory bootstrap: load only one root memory file, preferring `MEMORY.md` and using `memory.md` as a fallback, so case-insensitive Docker mounts no longer inject duplicate memory context. (#26054) Thanks @Lanfei.
2020
- Agents/OpenAI-compatible compat overrides: respect explicit user `models[].compat` opt-ins for non-native `openai-completions` endpoints so usage-in-streaming capability overrides no longer get forced off when the endpoint actually supports them. (#44432) Thanks @cheapestinference.
2121
- Agents/Azure OpenAI startup prompts: rephrase the built-in `/new`, `/reset`, and post-compaction startup instruction so Azure OpenAI deployments no longer hit HTTP 400 false positives from the content filter. (#43403) Thanks @xingsy97.
22+
- Config/validation: accept documented `agents.list[].params` per-agent overrides in strict config validation so `openclaw config validate` no longer rejects runtime-supported `cacheRetention`, `temperature`, and `maxTokens` settings. (#41171) Thanks @atian8179.
2223

2324
## 2026.3.12
2425

src/config/config-misc.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,33 @@ describe("config strict validation", () => {
361361
expect(res.ok).toBe(false);
362362
});
363363

364+
it("accepts documented agents.list[].params overrides", () => {
365+
const res = validateConfigObject({
366+
agents: {
367+
list: [
368+
{
369+
id: "main",
370+
model: "anthropic/claude-opus-4-6",
371+
params: {
372+
cacheRetention: "none",
373+
temperature: 0.4,
374+
maxTokens: 8192,
375+
},
376+
},
377+
],
378+
},
379+
});
380+
381+
expect(res.ok).toBe(true);
382+
if (res.ok) {
383+
expect(res.config.agents?.list?.[0]?.params).toEqual({
384+
cacheRetention: "none",
385+
temperature: 0.4,
386+
maxTokens: 8192,
387+
});
388+
}
389+
});
390+
364391
it("flags legacy config entries without auto-migrating", async () => {
365392
await withTempHome(async (home) => {
366393
await writeOpenClawConfig(home, {

0 commit comments

Comments
 (0)