Skip to content

feat(harness): give pi adaptive thinking for a fair A/B - #44

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

feat(harness): give pi adaptive thinking for a fair A/B#44
itelo merged 1 commit into
mainfrom
itelo/pi-thinking-parity

Conversation

@itelo

@itelo itelo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Thinking parity for the pi harness. #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:

  • compat: { forceAdaptiveThinking: true } → pi sends thinking:{type:'adaptive'} + output_config.effort (what Opus 4.8 / Sonnet 5 require, and what the Claude Agent SDK control sends).
  • reasoning: true (back on) + thinkingLevel: 'medium' → matches the control's effort: 'medium'.
  • supportsTemperature: false → Opus 4.7+ rejects a non-default temperature.

All three mirror how pi-ai's own built-in anthropic-messages models are configured.

⚠️ Verify before merge

Needs a real run — adaptive isn't exercised in CI:

SEAM_WIZARD_HARNESS=pi SEAM_API_KEY=… npm run eval

Expect pi to still run (tool calls, non-empty diff) — now with thinking. If the proxy/model rejects the adaptive shape, it'd regress to the 400, so this shouldn't merge until a run confirms it. (The anthropic control already sends adaptive through the same proxy successfully, so confidence is high.)

Testing

  • typecheck / eslint / prettier / test (145) pass

Security & Compliance

  • No security impact

@itelo
itelo requested a review from razor-x as a code owner August 21, 2026 16:38
…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
itelo force-pushed the itelo/pi-thinking-parity branch from 36a94ec to 79dba03 Compare August 21, 2026 17:04
@itelo
itelo merged commit fdc9626 into main Aug 21, 2026
11 checks passed
@itelo
itelo deleted the itelo/pi-thinking-parity branch August 21, 2026 17:06
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