Skip to content

[Bug] channels.modelByChannel config validation fails despite being documented #23207

@skernelx

Description

@skernelx

Description

The channels.modelByChannel feature is documented in the configuration reference but fails schema validation when added to the config file.

Steps to Reproduce

  1. Add the following to ~/.openclaw/openclaw.json:
{
  "channels": {
    "modelByChannel": {
      "telegram": {
        "-1003588664547": "custom-anthropic/claude-opus-4-6",
        "-1003588664547:topic:2": "xopglm/xopglm5"
      }
    }
  }
}
  1. Run any openclaw command

  2. Get error:

Invalid config at /Users/wf/.openclaw/openclaw.json:
- channels.modelByChannel: unknown channel id: modelByChannel

Expected Behavior

The config should be accepted and per-topic model overrides should work as documented in:

  • /docs/gateway/configuration-reference.md (Channel model overrides section)
  • /docs/channels/telegram.md (Forum topics section)

Actual Behavior

Schema validation rejects modelByChannel as an unknown channel id.

Environment

  • OpenClaw version: 2026.2.21-2
  • OS: macOS (Darwin 25.3.0 arm64)
  • Node: v25.5.0

Additional Context

The feature appears to be implemented in the codebase (found references in subagent-registry-*.js), but the JSON schema does not include modelByChannel as a valid property under channels.

This is a useful feature for users who want different models for different Telegram topics (e.g., using a Chinese model for stock analysis topics, a faster model for crypto trading topics, etc.).

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