-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[Bug]: AgentEntrySchema missing params field added in PR #17470 #29902
Description
Summary
agents.list[].params was added to the TypeScript type (AgentConfig) and runtime code (extra-params.ts) in PR #17470 (commit 160bd61ff), but the corresponding Zod validation schema (AgentEntrySchema in zod-schema.agent-runtime.ts) was not updated. Since the schema uses .strict(), any config with params on an agent entry is rejected at validation time.
Steps to reproduce
- Add a
paramsblock to any agent inagents.list:
{
"agents": {
"list": [
{
"id": "my-agent",
"params": {
"cacheRetention": "short"
}
}
]
}
}- Start or reload the gateway.
- Observe config validation failure.
Expected behavior
Config loads successfully. The params field is accepted and merged with global model params at runtime, as implemented in extra-params.ts.
Actual behavior
Config reload is rejected with:
[reload] config reload skipped (invalid config): agents.list.0: Unrecognized key: "params"
Impact and severity
- Affected: Any user configuring per-agent stream params (e.g.
cacheRetention,temperature) as documented - Severity: Medium — feature is documented and runtime-supported but blocked by validation
- Frequency: 100% reproducible
- Consequence: Per-agent params silently rejected; users must fall back to global
agents.defaults.modelsconfig only
Additional information
The fix is a one-line addition to AgentEntrySchema in src/config/zod-schema.agent-runtime.ts:
params: z.record(z.string(), z.unknown()).optional(),This matches the existing pattern used in agents.defaults.models (zod-schema.agent-defaults.ts line 27) and aligns the schema with the TypeScript type at src/config/types.agents.ts line 33.
OpenClaw version: 2026.2.27
OS: Linux 6.8.0-101-generic (Ubuntu, x64)
Install method: pnpm dev (git clone)