Fix Pi reasoning effort options to respect model capabilities - #431
Merged
Merged
Conversation
Tryanks
force-pushed
the
fix/pi-supported-thinking-levels
branch
from
September 14, 2026 17:12
f565965 to
8860f13
Compare
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.
Fixes #395.
Pi previously offered a fixed set of reasoning efforts, including levels the selected model does not support. Build the options from Pi's
thinkingLevelMap: hide levels mapped tonull, preserve ordinary defaults for omitted keys, and require explicit support forxhighandmax.The existing Pi model adapter remains the owner of this behavior. The shared pickers consume the filtered model options, including when they are supplied by a remote host. There are no model-name special cases, new dependencies, or protocol changes. The composer design contract is updated.
Regression tests cover absent and partial mappings, disabled levels, extended levels, unsupported defaults, and non-reasoning models. The filtering regression fails with the original
map_modelfunction and passes with the fix. A separate non-reasoning test replaces repeated assertions for the same contract.Validation on Windows with Rust 1.98.1:
cargo fmt --all --check: passed.cargo build --workspace --locked: passed.cargo clippy --workspace --all-targets --locked -- -D warnings: passed.cargo machete0.9.2: passed.cargo test --workspace --locked: stopped at two runtime failures,resident_idle_reaper_shuts_down_untouched_providerandorchestrate_worktree_dispatch_resolves_child_cwd_to_worktree(temporary worktree deletion returned Permission denied). The full suite is not green.Checks were run on the patch over
cba07d3. macOS, Linux, mobile/Web target checks, and two-device acceptance were not run.