diff --git a/src/config/config.plugin-validation.test.ts b/src/config/config.plugin-validation.test.ts index c7389a59f..b9fb08e4d 100644 --- a/src/config/config.plugin-validation.test.ts +++ b/src/config/config.plugin-validation.test.ts @@ -147,6 +147,21 @@ describe("config plugin validation", () => { expect(res.ok).toBe(true); }); + it("accepts channels.modelByChannel", async () => { + const home = await createCaseHome(); + const res = validateInHome(home, { + agents: { list: [{ id: "pi" }] }, + channels: { + modelByChannel: { + openai: { + whatsapp: "openai/gpt-5.2", + }, + }, + }, + }); + expect(res.ok).toBe(true); + }); + it("accepts plugin heartbeat targets", async () => { const home = await createCaseHome(); const pluginDir = path.join(home, "bluebubbles-plugin"); diff --git a/src/config/plugin-auto-enable.test.ts b/src/config/plugin-auto-enable.test.ts index 92227d142..f8312901f 100644 --- a/src/config/plugin-auto-enable.test.ts +++ b/src/config/plugin-auto-enable.test.ts @@ -16,6 +16,25 @@ describe("applyPluginAutoEnable", () => { expect(result.changes.join("\n")).toContain("Slack configured, enabled automatically."); }); + it("ignores channels.modelByChannel for plugin auto-enable", () => { + const result = applyPluginAutoEnable({ + config: { + channels: { + modelByChannel: { + openai: { + whatsapp: "openai/gpt-5.2", + }, + }, + }, + }, + env: {}, + }); + + expect(result.config.plugins?.entries?.modelByChannel).toBeUndefined(); + expect(result.config.plugins?.allow).toBeUndefined(); + expect(result.changes).toEqual([]); + }); + it("respects explicit disable", () => { const result = applyPluginAutoEnable({ config: {