From 4f756265eb5a93e9ce3e17b68ac772daafa93853 Mon Sep 17 00:00:00 2001 From: itelo Date: Fri, 21 Aug 2026 13:06:11 -0300 Subject: [PATCH] fix(harness): disable pi thinking config (unblocks the pi run) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pi-ai 0.79.x emits the deprecated `thinking:{type:'enabled',budget_tokens}` for reasoning models, which Opus 4.8 / Sonnet 5 reject with a 400. With reasoning on, every pi request errored server-side (stopReason: error) → 0 tool calls → empty diff, so the pi harness always reported "the step did not complete". Set the provider model reasoning:false so no thinking param is sent. Verified end-to-end: pi now writes a real full_api integration (gates 3/3, judge score 0.93). pi runs without extended thinking; the anthropic control uses the SDK's adaptive form, so thinking parity is a follow-up (needs a pi-ai that supports type:'adaptive'). --- src/lib/steps/harness/pi.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/steps/harness/pi.ts b/src/lib/steps/harness/pi.ts index 22d9c5d..9c720c5 100644 --- a/src/lib/steps/harness/pi.ts +++ b/src/lib/steps/harness/pi.ts @@ -59,7 +59,14 @@ export const piHarness: Harness = { name: modelId, api: 'anthropic-messages', baseUrl: inference.base_url, - reasoning: true, + // Must be false: pi-ai emits the deprecated `thinking:{type:'enabled', + // budget_tokens}` for reasoning models, which Opus 4.8 / Sonnet 5 + // reject with a 400 (they only accept `thinking:{type:'adaptive'}`). + // With reasoning on, every request errored server-side → 0 tool calls, + // empty diff. Off means no extended thinking on the pi path, but the + // requests succeed. (The anthropic control uses the SDK's adaptive form; + // thinking parity needs a newer pi-ai.) + reasoning: false, input: ['text'], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1_000_000,