mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:30:44 +00:00
test(agents): align thinking default policy coverage
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user