From ed29c59f3174f7fbcca1ed9d900c37f15c117ab2 Mon Sep 17 00:00:00 2001 From: Patrick Wozniak Date: Thu, 20 Aug 2026 00:13:56 +0200 Subject: [PATCH] fix(models): use adaptive thinking for Claude --- index.ts | 1 + tests/test-pi-local.mjs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/index.ts b/index.ts index 1f4aeb2..72ae558 100644 --- a/index.ts +++ b/index.ts @@ -85,6 +85,7 @@ function createProviderConfig( supportsLongCacheRetention: false, supportsCacheControlOnTools: false, supportsToolReferences: false, + ...(model.reasoning ? { forceAdaptiveThinking: true } : {}), }, })), } diff --git a/tests/test-pi-local.mjs b/tests/test-pi-local.mjs index 760a100..2d0a999 100644 --- a/tests/test-pi-local.mjs +++ b/tests/test-pi-local.mjs @@ -731,6 +731,8 @@ try { "commandcode", "--model", CLAUDE_TEST_MODEL, + "--thinking", + "high", ], 30_000, ) @@ -738,6 +740,8 @@ try { assert.match(claudePrint.stdout, /mock-pi-ok/) assert.equal(requestCount, 1) assert.equal(lastRequestBody?.model, CLAUDE_TEST_MODEL) + assert.equal(lastRequestBody?.thinking?.type, "adaptive") + assert.deepEqual(lastRequestBody?.output_config, { effort: "high" }) assert.equal(lastRequestHeaders["x-api-key"], "mock-key") assert.equal(lastRequestHeaders["x-cmd-zdr"], "1")