Skip to content

[Bug]: AgentEntrySchema missing params field added in PR #17470 #29902

@darcuri

Description

@darcuri

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

  1. Add a params block to any agent in agents.list:
{
  "agents": {
    "list": [
      {
        "id": "my-agent",
        "params": {
          "cacheRetention": "short"
        }
      }
    ]
  }
}
  1. Start or reload the gateway.
  2. 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.models config 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions