-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Closed
Copy link
Description
Bug
channels.modelByChannel is documented in the configuration reference and defined in the Zod schema (ChannelModelByChannelSchema in ChannelsSchema), but gets rejected at startup and via openclaw config set with:
channels.modelByChannel: unknown channel id: modelByChannel
Steps to Reproduce
- Add to
openclaw.json:
{
"channels": {
"modelByChannel": {
"discord": {
"123456789012345678": "anthropic/claude-sonnet-4-6"
}
}
}
}- Run
openclaw gateway restartoropenclaw config set channels.modelByChannel ... - Gateway fails to start / config set returns validation error
Analysis
The Zod schema in the compiled source (config-DJkRS0fq.js) correctly defines:
const ChannelsSchema = z.object({
defaults: ...,
modelByChannel: ChannelModelByChannelSchema, // ✅ defined
whatsapp: ...,
discord: ...,
// ...
}).passthrough().optional();And the runtime code in subagent-registry-Bdm_X-N1.js reads it:
const modelByChannel = params.cfg.channels?.modelByChannel;The prompt-select-styled module also explicitly skips it:
if (channelId === "defaults" || channelId === "modelByChannel") continue;But there appears to be a separate validation pass (likely in the config set CLI or startup channel iteration) that treats every key under channels as a channel ID and rejects modelByChannel as unknown.
Environment
- OpenClaw: 2026.2.21-2
- OS: macOS 15.7.4 (arm64)
- Node: v25.5.0
Expected Behavior
channels.modelByChannel should be accepted by both the CLI config commands and gateway startup, matching the docs and Zod schema.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels