Channels: add thread-aware model overrides

This commit is contained in:
Shadow
2026-02-20 19:26:25 -06:00
committed by GitHub
parent ee8dd40509
commit f555835b09
53 changed files with 1379 additions and 1398 deletions

View File

@@ -90,6 +90,36 @@ describe("buildStatusMessage", () => {
expect(normalized).toContain("Queue: collect");
});
it("notes channel model overrides in status output", () => {
const text = buildStatusMessage({
config: {
channels: {
modelByChannel: {
discord: {
"123": "openai/gpt-4.1",
},
},
},
} as unknown as OpenClawConfig,
agent: {
model: "openai/gpt-4.1",
},
sessionEntry: {
sessionId: "abc",
updatedAt: 0,
channel: "discord",
groupId: "123",
},
sessionKey: "agent:main:discord:channel:123",
sessionScope: "per-sender",
queue: { mode: "collect", depth: 0 },
});
const normalized = normalizeTestText(text);
expect(normalized).toContain("Model: openai/gpt-4.1");
expect(normalized).toContain("channel override");
});
it("uses per-agent sandbox config when config and session key are provided", () => {
const text = buildStatusMessage({
config: {