Skip to content

modelByChannel config validation rejects with 'unknown channel id' despite being in code #23146

@tiagocampo

Description

@tiagocampo

Description

After updating to v2026.2.21-2, the modelByChannel feature (PR #22315) is present in the codebase but the config validator rejects it.

Evidence

1. The code exists in the npm package:

~/.nvm/.../openclaw/dist/config-B9RhcgPL.js:
  modelByChannel: ChannelModelByChannelSchema,

2. The Zod schema is correctly defined:

const ChannelModelByChannelSchema = z.record(z.string(), z.record(z.string(), z.string())).optional();
const ChannelsSchema = z.object({
  defaults: ...,
  modelByChannel: ChannelModelByChannelSchema,
  whatsapp: WhatsAppConfigSchema.optional(),
  ...
}).passthrough().optional();

3. But the CLI validator rejects it:

$ openclaw config get channels.modelByChannel
Invalid config at ~/.openclaw/openclaw.json:
- channels.modelByChannel: unknown channel id: modelByChannel

4. The config used:

{
  "channels": {
    "modelByChannel": {
      "telegram": {
        "-1003443214663:topic:1466": "google-antigravity/gemini-3.1-pro-low"
      }
    }
  }
}

Expected Behavior

The config should be accepted since:

  1. The feature is mentioned in CHANGELOG.md for 2026.2.21
  2. The code exists in the bundled JS
  3. The Zod schema is properly defined

Actual Behavior

Config validation fails with unknown channel id: modelByChannel, suggesting the validator is treating modelByChannel as a channel provider (like "telegram", "whatsapp") instead of a config key.

Environment

  • OpenClaw version: 2026.2.21-2
  • Node version: v22.22.0
  • OS: Manjaro Linux

Workaround

None found yet. The feature is unusable despite being in the release.

Related

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