test(agents): align thinking default policy coverage

This commit is contained in:
Vincent Koc
2026-05-03 17:51:39 -07:00
parent b0f947f61c
commit c151573f4c

View File

@@ -1663,10 +1663,14 @@ describe("model-selection", () => {
expect(resolveAnthropicOpus47Thinking(cfg)).toBe("off");
});
it("falls back to medium when no provider thinking hook is active", () => {
it("uses bundled provider thinking defaults when no explicit config overrides them", () => {
const cfg = {} as OpenClawConfig;
expect(resolveAnthropicOpusThinking(cfg)).toBe("medium");
expect(resolveAnthropicOpusThinking(cfg)).toBe("adaptive");
});
it("falls back to medium when no provider thinking policy is active", () => {
const cfg = {} as OpenClawConfig;
expect(
resolveThinkingDefault({
@@ -1683,6 +1687,22 @@ describe("model-selection", () => {
],
}),
).toBe("medium");
expect(
resolveThinkingDefault({
cfg,
provider: "custom-provider",
model: "custom-reasoning-model",
catalog: [
{
provider: "custom-provider",
id: "custom-reasoning-model",
name: "Custom Reasoning Model",
reasoning: true,
},
],
}),
).toBe("medium");
});
});
});