feat(settings): add configurable default effort level#2116
Merged
charlesvien merged 3 commits intoMay 21, 2026
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "feat(settings): add configurable default..." | Re-trigger Greptile |
67656aa to
bc740e0
Compare
jonathanlab
approved these changes
May 19, 2026
Contributor
jonathanlab
left a comment
There was a problem hiding this comment.
made some adjustments to clamp this to the configured level for to available reasoning levels, but LGTM!
jonathanlab
approved these changes
May 19, 2026
2bcd190 to
6c0b415
Compare
Adds a "Default effort level" setting that lets users choose a fixed reasoning effort (low/medium/high/xhigh/max) or "Last used" for new tasks. Mirrors the existing defaultInitialTaskMode pattern. Changes: - Add DefaultReasoningEffort type and defaultReasoningEffort state to settingsStore (persisted, default "last_used") - Update usePreviewConfig to respect defaultReasoningEffort when selecting the initial effort value for new sessions - Apply the same default in the model-change handler fallback - Add "Default effort level" selector in GeneralSettings > Input - Track setting changes via analytics Closes PostHog#1846
If the user's defaultReasoningEffort isn't supported by the current model, fall to the nearest available level by rank (low < medium < high < xhigh < max) instead of silently no-opping. So 'max' on a model that caps at 'high' becomes 'high'; 'low' on a model that only supports 'medium+' becomes 'medium'. Generated-By: PostHog Code Task-Id: c5674c04-c95c-4bfe-bfcf-248a921b4aae
When a user switches to a model that doesn't support their last-used effort level, fall back to "high" rather than clamping. Matches the pre-feature behavior. Clamping is still applied for the new explicit default-effort setting on initial load, where there's no prior behavior to preserve. Generated-By: PostHog Code Task-Id: c5674c04-c95c-4bfe-bfcf-248a921b4aae
6c0b415 to
af2c1b3
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.
Summary
Resolves #1846
Adds a "Default effort level" setting so users can configure the default reasoning effort for new tasks instead of always defaulting to "high".
Problem
There was no way to configure a default effort level in PostHog Code. Users who preferred a specific effort level had to manually change it every time they started a new task. The effort level always defaulted to "high" with no persistence beyond "last used".
Solution
Mirrors the existing
defaultInitialTaskModepattern — a setting that controls whether new tasks use a fixed value or "Last used":defaultReasoningEffortsetting insettingsStorewith typeDefaultReasoningEffort = "low" | "medium" | "high" | "xhigh" | "max" | "last_used""last_used"(preserves existing behavior for all users)usePreviewConfigwhen resolving the initial effort for new sessionsFiles changed
settingsStore.tsDefaultReasoningEfforttype,defaultReasoningEffortstate + setter, persistedusePreviewConfig.tsdefaultReasoningEffortto resolve initial effort (mirrorsdefaultInitialTaskModelogic)GeneralSettings.tsxHow to test
Screenshots
Setting appears right below "Initial task mode" in the Input section: