feat(pi): add 'max' thinking level#1032
Open
KorenKrita wants to merge 2 commits into
Open
Conversation
Pi's --thinking flag accepts 7 levels: off, minimal, low, medium, high, xhigh, max. The shared constant and UI only exposed 6 levels (missing max). Add 'max' to PI_THINKING_LEVELS and PI_THINKING_LEVEL_LABELS. Like xhigh, max requires explicit opt-in via the model's thinkingLevelMap — models that support it will include max in their map and the UI will show it accordingly.
There was a problem hiding this comment.
Findings
- [Blocker] Missing branch close breaks TypeScript parsing — the new
xhigh || maxbranch never closes before the default map fallback, leaving the helper with unbalanced braces and preventing the web package from compiling. Evidenceweb/src/components/AssistantChat/piThinkingLevelOptions.ts:61
Suggested fix:if (level === 'xhigh' || level === 'max') { if (!map || !(level in map)) return false return map[level] !== null } if (!map || !(level in map)) return true return map[level] !== null
Questions
- None.
Summary
- Review mode: initial
- One build-blocking syntax regression found. Residual risk: automation was not run in this review pass.
Testing
- Not run (automation)
HAPI Bot
There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
- Review mode: follow-up after new commits
- No issues found in the latest full diff. The prior bot blocker in
web/src/components/AssistantChat/piThinkingLevelOptions.tsis fixed in the new commit. - Residual risk: no dedicated test coverage found for Pi thinking-level option filtering in
web/src/components/AssistantChat/piThinkingLevelOptions.ts.
Testing
- Not run (automation/static review only)
HAPI Bot
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.
Problem
Pi's
--thinkingflag accepts 7 levels:off,minimal,low,medium,high,xhigh,max. However, hapi only defines 6 levels inPI_THINKING_LEVELS(missingmax), so models that supportmaxthinking cannot expose it in the UI.Changes
'max'toPI_THINKING_LEVELSandPI_THINKING_LEVEL_LABELSinshared/src/piThinkingLevel.tsALL_LEVELSinPiThinkingLevelPanel.tsxto includemaxisThinkingLevelSupported()inpiThinkingLevelOptions.tssomax(likexhigh) requires explicit opt-in via the model'sthinkingLevelMapBehavior
maxin theirthinkingLevelMapwill now show it as a selectable thinking levelmaxin their map are unaffected (opt-in required, same asxhigh)