fix(thinking): default Claude 4.6 to adaptive

This commit is contained in:
Peter Steinberger
2026-03-02 04:27:26 +00:00
parent 4691aab019
commit 37d036714e
4 changed files with 103 additions and 1 deletions

View File

@@ -734,6 +734,29 @@ describe("agentCommand", () => {
});
});
it("defaults thinking to adaptive for Anthropic Claude 4.6 models", async () => {
await withTempHome(async (home) => {
const store = path.join(home, "sessions.json");
mockConfig(home, store, {
model: { primary: "anthropic/claude-opus-4-6" },
models: { "anthropic/claude-opus-4-6": {} },
});
vi.mocked(loadModelCatalog).mockResolvedValueOnce([
{
id: "claude-opus-4-6",
name: "Opus 4.6",
provider: "anthropic",
reasoning: true,
},
]);
await agentCommand({ message: "hi", to: "+1555" }, runtime);
const callArgs = vi.mocked(runEmbeddedPiAgent).mock.calls.at(-1)?.[0];
expect(callArgs?.thinkLevel).toBe("adaptive");
});
});
it("prefers per-model thinking over global thinkingDefault", async () => {
await withTempHome(async (home) => {
const store = path.join(home, "sessions.json");