mirror of https://github.com/openclaw/openclaw.git
fix(config): add missing params field to agents.list[] validation schema (#41171)
Merged via squash.
Prepared head SHA: 9522761cf1
Co-authored-by: atian8179 <255488364+atian8179@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
This commit is contained in:
parent
f9ea879729
commit
b72c87712d
|
|
@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai
|
|||
- 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.
|
||||
- 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.
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
## 2026.3.12
|
||||
|
||||
|
|
|
|||
|
|
@ -361,6 +361,33 @@ describe("config strict validation", () => {
|
|||
expect(res.ok).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts documented agents.list[].params overrides", () => {
|
||||
const res = validateConfigObject({
|
||||
agents: {
|
||||
list: [
|
||||
{
|
||||
id: "main",
|
||||
model: "anthropic/claude-opus-4-6",
|
||||
params: {
|
||||
cacheRetention: "none",
|
||||
temperature: 0.4,
|
||||
maxTokens: 8192,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.ok).toBe(true);
|
||||
if (res.ok) {
|
||||
expect(res.config.agents?.list?.[0]?.params).toEqual({
|
||||
cacheRetention: "none",
|
||||
temperature: 0.4,
|
||||
maxTokens: 8192,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it("flags legacy config entries without auto-migrating", async () => {
|
||||
await withTempHome(async (home) => {
|
||||
await writeOpenClawConfig(home, {
|
||||
|
|
|
|||
|
|
@ -757,6 +757,7 @@ export const AgentEntrySchema = z
|
|||
.strict()
|
||||
.optional(),
|
||||
sandbox: AgentSandboxSchema,
|
||||
params: z.record(z.string(), z.unknown()).optional(),
|
||||
tools: AgentToolsSchema,
|
||||
runtime: AgentRuntimeSchema,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue