fix: Pi harness rejects the supported max thinking level (#19912)
## Background
`@ai-sdk/harness-pi` rejected `createPi({ thinkingLevel: 'max' })`
during TypeScript compilation even though the installed Pi dependency
supports and receives that value.
## Root Cause
The copied `PiThinkingLevel` union omitted `'max'`, while installed Pi
0.80.10 declarations include it and the adapter forwards `thinkingLevel`
unchanged to `createAgentSession`.
## Summary
Added `'max'` to `PiThinkingLevel`, documented all supported levels,
added a public API type regression test and patch changeset, and
preserved unrelated base replay metadata.
## Testing
The type regression confirms `createPi({ thinkingLevel: 'max' })`
compiles; full workspace type checking passed, and all 174 harness-pi
Node tests passed.
## End-to-end Validation
- `pnpm -C examples/ai-functions exec tsx
src/reproduction/harness-pi-max-thinking-level.ts` exited 0, reported
that `max` is accepted, and did not emit the bug signal.
## Related Issues
Fixes #19909
Closes #19911
---------
Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Co-authored-by: StErMi <146166+StErMi@users.noreply.github.com>
Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com>
Co-authored-by: Felix Arntz <3531426+felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felix.arntz@vercel.com> A
ai-sdk-factory[bot] committed
f7fa99395115234354324446b75e93c943bd78eb
Parent: 24fcc92
Committed by GitHub <noreply@github.com>
on 8/28/2026, 3:40:19 PM