fix(config): add missing params field to agents.list[] validation schema#41171
Conversation
Greptile SummaryThis PR fixes a validation gap where The one-line addition of
The No other changes are needed: the fix is a targeted schema-to-type alignment with minimal risk and no behavioural impact. Confidence Score: 5/5
Last reviewed commit: 2701b2b |
The AgentConfig TypeScript type already declares params as Record<string, unknown>, but the Zod validation schema in AgentEntrySchema omits it. Because the schema uses .strict(), any agents.list[] entry containing params (e.g. cacheRetention, temperature, maxTokens) is rejected by `openclaw config validate`. Add the params field to AgentEntrySchema to match the type definition. Fixes openclaw#41160
2701b2b to
9522761
Compare
|
Merged via squash.
Thanks @atian8179! |
1 similar comment
|
Merged via squash.
Thanks @atian8179! |
…ema (openclaw#41171) Merged via squash. Prepared head SHA: 9522761 Co-authored-by: atian8179 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
* main: (168 commits) fix: stabilize macos daemon onboarding fix(ui): keep shared auth on insecure control-ui connects (openclaw#45088) docs(plugins): clarify workspace shadowing fix(node-host): harden perl approval binding fix(node-host): harden pnpm approval binding fix(discovery): add missing domain to wideArea Zod config schema (openclaw#35615) chore(gitignore): add docker-compose override (openclaw#42879) feat(ios): add onboarding welcome pager (openclaw#45054) fix(signal): add groups config to Signal channel schema (openclaw#27199) fix: restore web fetch firecrawl config in runtime zod schema (openclaw#42583) fix: polish Android QR scanner onboarding (openclaw#45021) fix(android): use Google Code Scanner for onboarding QR fix(config): add missing params field to agents.list[] validation schema (openclaw#41171) docs(contributing): update Android app ownership fix(agents): rephrase session reset prompt to avoid Azure content filter (openclaw#43403) test(config): cover requiresOpenAiAnthropicToolPayload in compat schema fixture fix(agents): respect explicit user compat overrides for non-native openai-completions (openclaw#44432) Android: fix HttpURLConnection leak in TalkModeVoiceResolver (openclaw#43780) Docker: add OPENCLAW_TZ timezone support (openclaw#34119) fix(agents): avoid injecting memory file twice on case-insensitive mounts (openclaw#26054) ...
…ema (openclaw#41171) Merged via squash. Prepared head SHA: 9522761 Co-authored-by: atian8179 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…ema (openclaw#41171) Merged via squash. Prepared head SHA: 9522761 Co-authored-by: atian8179 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…ema (openclaw#41171) Merged via squash. Prepared head SHA: 9522761 Co-authored-by: atian8179 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Problem
openclaw config validaterejectsagents.list[].paramseven though this field is defined in theAgentConfigTypeScript type and documented as a per-agent override for stream parameters likecacheRetention,temperature, andmaxTokens.The root cause is that
AgentEntrySchema(Zod validation) uses.strict()but does not include theparamsfield, so any config containing it fails validation.Fix
Add
params: z.record(z.string(), z.unknown()).optional()toAgentEntrySchema, matching the existing TypeScript type:One-line change in
src/config/zod-schema.agent-runtime.ts.Testing
Verified the Zod schema change aligns with the existing
AgentConfigtype definition insrc/config/types.agents.ts.Fixes #41160