Skip to content

feat(menu): fetch thinking levels from Pi server, drop compat.reasoningEffortMap fallback - #251

Merged
dnouri merged 1 commit into
dnouri:masterfrom
ArthurHeymans:ReasoningFromPi
Jul 28, 2026
Merged

feat(menu): fetch thinking levels from Pi server, drop compat.reasoningEffortMap fallback#251
dnouri merged 1 commit into
dnouri:masterfrom
ArthurHeymans:ReasoningFromPi

Conversation

@ArthurHeymans

Copy link
Copy Markdown
Contributor

Replace the hardcoded pi-coding-agent--thinking-levels constant with
dynamic fetching via the RPC command get_available_thinking_levels.

  • pi-coding-agent--thinking-level-effective-value: translate a pi
    thinking level to its provider-specific value using thinkingLevelMap
  • pi-coding-agent--filter-thinking-level-aliases: deduplicate levels
    that map to the same provider value; omit unsupported (null) levels
  • pi-coding-agent--get-available-thinking-levels: RPC fetch + filtering
  • pi-coding-agent--refresh-thinking-level-state: refresh UI state after
    set_thinking_level so server-side clamping is reflected

Also:

  • Remove the dead compat.reasoningEffortMap fallback — that property
    was replaced by thinkingLevelMap in pi v0.72.0 and is never sent by
    pi >= 0.81.0 (the new minimum)
  • Update the alias-filtering test to use thinkingLevelMap and cover
    "max" aliasing
  • Bump minimum pi version from 0.79.1 → 0.81.0

…ngEffortMap fallback

Replace the hardcoded `pi-coding-agent--thinking-levels` constant with
dynamic fetching via the RPC command `get_available_thinking_levels`.

- `pi-coding-agent--thinking-level-effective-value`: translate a pi
  thinking level to its provider-specific value using `thinkingLevelMap`
- `pi-coding-agent--filter-thinking-level-aliases`: deduplicate levels
  that map to the same provider value; omit unsupported (`null`) levels
- `pi-coding-agent--get-available-thinking-levels`: RPC fetch + filtering
- `pi-coding-agent--refresh-thinking-level-state`: refresh UI state after
  `set_thinking_level` so server-side clamping is reflected

Also:
- Remove the dead `compat.reasoningEffortMap` fallback — that property
  was replaced by `thinkingLevelMap` in pi v0.72.0 and is never sent by
  pi >= 0.81.0 (the new minimum)
- Update the alias-filtering test to use `thinkingLevelMap` and cover
  `"max"` aliasing
- Bump minimum pi version from 0.79.1 → 0.81.0
@dnouri
dnouri merged commit df5ce0a into dnouri:master Jul 28, 2026
11 checks passed
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.

2 participants