Skip to content

fix(harness): disable pi thinking config (unblocks the pi run) - #43

Merged
itelo merged 1 commit into
mainfrom
itelo/pi-thinking-config
Aug 21, 2026
Merged

fix(harness): disable pi thinking config (unblocks the pi run)#43
itelo merged 1 commit into
mainfrom
itelo/pi-thinking-config

Conversation

@itelo

@itelo itelo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The last blocker to a working pi harness. 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 (they only accept thinking:{type:'adaptive'}). With the provider model's reasoning: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:false so no thinking param is sent.

Verified end-to-end

With #41 (typebox) + #42 (peer deps) + this, SEAM_WIZARD_HARNESS=pi npm run eval produces a real integration:

mode ok gates score cost time
full_api 3/3 0.93 $0.74 512s

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-ai that supports thinking:{type:'adaptive'} (or mapping to it). Noted in the code comment.

Not in this PR (observed, separate)

customer_portal finished ok but 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 has maxTurns: 100; the pi harness has none). I'll do that as a follow-up.

Security & Compliance

  • No security impact

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').
@itelo
itelo requested a review from razor-x as a code owner August 21, 2026 16:06
@itelo
itelo merged commit 7d8ff92 into main Aug 21, 2026
11 checks passed
@itelo
itelo deleted the itelo/pi-thinking-config branch August 21, 2026 16:09
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant