Skip to content

fix: keep the live thinking effort when switching models - #71

Merged
elkaix merged 5 commits into
mainfrom
fix/model-picker-effort-default
Aug 14, 2026
Merged

fix: keep the live thinking effort when switching models#71
elkaix merged 5 commits into
mainfrom
fix/model-picker-effort-default

Conversation

@elkaix

@elkaix elkaix commented Aug 14, 2026

Copy link
Copy Markdown
Member

Related Issue

No issue — the problem is explained below.

Problem

Two more paths lose the user's saved thinking effort across restarts (follow-up to #67):

  1. The model picker drafts any non-current model at its first non-off effort level (low for models without effort metadata). Confirming the picker persists that draft as the startup default, silently overwriting the effort the user had saved. A real config was found holding effort = "low" this way.
  2. Saving an effort writes only thinking.effort; the config deep merge preserves a stale thinking.mode = "off", which forces thinking off on the next startup even when an effort is saved.

What changed

  • The picker's effort draft for a non-current model now keeps the live effort, coerced to what that model supports, instead of resetting to its first level.
  • Persisting an effort also writes the matching thinking.mode (on/off), so a stale mode = "off" cannot poison restarts.
  • Updated picker tests to the new contract and added a regression test for the switch-keeps-effort behavior.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@elkaix, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bf0d5c5-0032-4900-b194-0ea7d73069dc

📥 Commits

Reviewing files that changed from the base of the PR and between b69205f and 43a2654.

📒 Files selected for processing (7)
  • .changeset/model-picker-keeps-effort.md
  • apps/pythinker-code/src/tui/components/dialogs/model-selector.ts
  • apps/pythinker-code/src/tui/utils/persist-effort.ts
  • apps/pythinker-code/test/tui/components/dialogs/model-selector.test.ts
  • apps/pythinker-code/test/tui/components/dialogs/tabbed-model-selector.test.ts
  • apps/pythinker-code/test/tui/controllers/editor-keyboard.test.ts
  • apps/pythinker-code/test/tui/pythinker-tui-message-flow.test.ts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 14, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pythoughts/pythinker-code@43a2654
npx https://pkg.pr.new/@pythoughts/pythinker-code@43a2654

commit: 43a2654

@elkaix
elkaix merged commit 9d46551 into main Aug 14, 2026
11 checks passed
@elkaix
elkaix deleted the fix/model-picker-effort-default branch August 14, 2026 02:49
elkaix pushed a commit that referenced this pull request Aug 14, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pymodel/pythinker-code@0.17.0

### Minor Changes

- [#70](#70)
[`8506ded`](8506ded)
- Publish the CLI under the @PyModel npm scope; install with `npm
install -g @pymodel/pythinker-code`. The old @pythoughts scope is
deprecated and no longer receives releases.

### Patch Changes

- [#71](#71)
[`9d46551`](9d46551)
- Keep the current thinking effort when switching models in the model
picker instead of silently saving the new model's lowest level as the
default, and repair a stale thinking mode in the config when saving an
effort.

- [#67](#67)
[`5cb218f`](5cb218f)
- Keep the thinking effort chosen with Ctrl-T/Shift-Tab as the default
across restarts.

- [#68](#68)
[`b69205f`](b69205f)
- Show only the animated thinking indicator while the model thinks; the
streamed thinking text no longer appears in the transcript unless
expanded with Ctrl+O.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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