fix(harness): disable pi thinking config (unblocks the pi run) - #43
Merged
Conversation
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').
2 tasks
itelo
added a commit
that referenced
this pull request
Aug 21, 2026
…ity) #43 disabled pi's thinking (reasoning:false) to dodge the 400 from pi-ai's deprecated `thinking:{type:'enabled',budget_tokens}`. That unblocked pi but left it running without extended thinking while the anthropic control uses adaptive — an unfair A/B on that axis. pi-ai supports the modern format via a model `compat` flag: set `compat:{forceAdaptiveThinking:true}` so it sends `thinking:{type:'adaptive'}` + output_config.effort (what Opus 4.8 / Sonnet 5 require), turn reasoning back on, and pass thinkingLevel:'medium' to match the control's medium effort. Also set supportsTemperature:false (Opus 4.7+ rejects a non-default temperature) — both mirror how pi-ai's own built-in anthropic-messages models are configured. Needs a real `SEAM_WIZARD_HARNESS=pi npm run eval` to confirm (adaptive isn't exercised in CI).
itelo
added a commit
that referenced
this pull request
Aug 21, 2026
…ity) (#44) #43 disabled pi's thinking (reasoning:false) to dodge the 400 from pi-ai's deprecated `thinking:{type:'enabled',budget_tokens}`. That unblocked pi but left it running without extended thinking while the anthropic control uses adaptive — an unfair A/B on that axis. pi-ai supports the modern format via a model `compat` flag: set `compat:{forceAdaptiveThinking:true}` so it sends `thinking:{type:'adaptive'}` + output_config.effort (what Opus 4.8 / Sonnet 5 require), turn reasoning back on, and pass thinkingLevel:'medium' to match the control's medium effort. Also set supportsTemperature:false (Opus 4.7+ rejects a non-default temperature) — both mirror how pi-ai's own built-in anthropic-messages models are configured. Needs a real `SEAM_WIZARD_HARNESS=pi npm run eval` to confirm (adaptive isn't exercised in CI).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The last blocker to a working pi harness.
pi-ai0.79.x emits the deprecatedthinking:{type:'enabled',budget_tokens}for reasoning models, which Opus 4.8 / Sonnet 5 reject with a 400 (they only acceptthinking:{type:'adaptive'}). With the provider model'sreasoning:true, every pi request errored server-side (stopReason: error), so pi made 0 tool calls and produced an empty diff — the harness always reported "the step did not complete."Set the provider model
reasoning:falseso no thinking param is sent.Verified end-to-end
With #41 (typebox) + #42 (peer deps) + this,
SEAM_WIZARD_HARNESS=pi npm run evalproduces a real integration:Caveat (follow-up)
pi now runs without extended thinking, while the anthropic control uses the SDK's adaptive thinking — so the A/B isn't perfectly fair on that axis. True parity needs a
pi-aithat supportsthinking:{type:'adaptive'}(or mapping to it). Noted in the code comment.Not in this PR (observed, separate)
customer_portalfinishedokbut with an empty diff (gates 2/3, no score) after ~13 min — pi explored read-only without converging to writes. Likely wants a turn cap (the anthropic control hasmaxTurns: 100; the pi harness has none). I'll do that as a follow-up.Security & Compliance