Skip to content

AgentEntrySchema missing params field (schema/type mismatch persists on main) #27173

@moliendocode

Description

@moliendocode

Summary

The params field is defined in the TypeScript type (AgentEntry) but missing from the Zod validation schema (AgentEntrySchema). Since the schema uses .strict(), any params configuration is silently rejected at validation time, making the per-agent parameter overrides feature (introduced in PR #17470) unusable.

This was reported in #25903, which was closed after a maintainer checked main and concluded the issue was resolved. However, the schema mismatch still exists on main as of today.

Evidence (current main)

File params field
src/config/types.agents.ts:33 Presentparams?: Record<string, unknown>
src/config/zod-schema.agent-runtime.ts (AgentEntrySchema, line 673-708) Missing
src/config/zod-schema.agent-defaults.ts:27 (AgentDefaultsSchema) Presentparams: z.record(z.string(), z.unknown()).optional()

The defaults schema correctly includes params, but the per-agent entry schema does not.

Reproduction

  1. Add a params field to any agent entry in configuration
  2. Validation fails because AgentEntrySchema.strict() rejects undeclared keys

Fix

PR #26138 adds the missing field to AgentEntrySchema and includes regression tests. It is passing all CI checks (10,485 tests).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions