fix: align scoped prompt and menu resolution

This commit is contained in:
Dallin Romney
2026-08-25 18:49:55 -07:00
parent 19ea3839b5
commit fcc9cad06d
4 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -551,8 +551,8 @@ describe("openrouter provider hooks", () => {
},
} as never);
expect(contribution?.dynamicSuffix).toContain("Analysis models: agent/model.");
expect(contribution?.dynamicSuffix).not.toContain("default/model");
expect(contribution?.dynamicSuffix).toContain("Analysis models: default/model.");
expect(contribution?.dynamicSuffix).not.toContain("agent/model");
});
it("matches transport alias precedence for Fusion extra body", async () => {
-1
View File
@@ -158,7 +158,6 @@ function resolveFusionExtraBody(
readRecord(ctx.config?.agents?.defaults?.params),
findConfiguredOpenRouterModelParams(ctx.config?.agents?.defaults?.models, ctx.modelId),
readRecord(agentConfig?.params),
findConfiguredOpenRouterModelParams(agentConfig?.models, ctx.modelId),
];
let effective: Record<string, unknown> | undefined;
for (const source of sources) {
+1 -1
View File
@@ -572,7 +572,7 @@ describe("commands registry", () => {
expect(menu.choices).toEqual([
{ label: "on", value: "on" },
{ label: "off", value: "off" },
{ label: "auto (15 sec)", value: "auto" },
{ label: "auto (20 sec)", value: "auto" },
{ label: "default", value: "default" },
{ label: "status", value: "status" },
]);
+1 -1
View File
@@ -306,7 +306,7 @@ describe("Anthropic server compaction host threshold", () => {
).toBe(expected);
});
it("uses the selected agent context window for the fallback threshold", () => {
it("uses the resolved Anthropic context window for the fallback threshold", () => {
const cfg: OpenClawConfig = {
agents: {
defaults: {