fix: include modelByChannel in config validator allowedChannels

The hand-written config validator rejects `channels.modelByChannel` as
"unknown channel id: modelByChannel" even though the Zod schema, TypeScript
types, runtime code, and CLI docs all treat it as valid. The `defaults`
meta-key was already whitelisted but `modelByChannel` was missed when
the feature was added in 2026.2.21.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
pickaxe
2026-02-22 01:10:40 -08:00
committed by Peter Steinberger
parent 9325418098
commit 0d93c9f759

View File

@@ -232,7 +232,7 @@ function validateConfigObjectWithPluginsBase(
return registryInfo;
};
const allowedChannels = new Set<string>(["defaults", ...CHANNEL_IDS]);
const allowedChannels = new Set<string>(["defaults", "modelByChannel", ...CHANNEL_IDS]);
if (config.channels && isRecord(config.channels)) {
for (const key of Object.keys(config.channels)) {