Skip to content

feat(settings): add configurable default effort level#2116

Merged
charlesvien merged 3 commits into
PostHog:mainfrom
reverb256:fix/1846-default-effort-level
May 21, 2026
Merged

feat(settings): add configurable default effort level#2116
charlesvien merged 3 commits into
PostHog:mainfrom
reverb256:fix/1846-default-effort-level

Conversation

@reverb256
Copy link
Copy Markdown
Contributor

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 defaultInitialTaskMode pattern — a setting that controls whether new tasks use a fixed value or "Last used":

  • defaultReasoningEffort setting in settingsStore with type DefaultReasoningEffort = "low" | "medium" | "high" | "xhigh" | "max" | "last_used"
  • Default value: "last_used" (preserves existing behavior for all users)
  • Applied in usePreviewConfig when resolving the initial effort for new sessions
  • Applied in the model-change handler fallback when the effort option needs re-resolving
  • UI: New "Default effort level" select in Settings > General > Input section

Files changed

File Change
settingsStore.ts Add DefaultReasoningEffort type, defaultReasoningEffort state + setter, persisted
usePreviewConfig.ts Use defaultReasoningEffort to resolve initial effort (mirrors defaultInitialTaskMode logic)
GeneralSettings.tsx Add "Default effort level" setting row with analytics tracking

How to test

  1. Open Settings > General > Input
  2. Change "Default effort level" from "Last used" to e.g. "Max"
  3. Start a new task — effort selector should default to "Max"
  4. Change it to "Last used" — effort selector should remember the last value you used
  5. Switch models — effort fallback should respect the configured default

Screenshots

Setting appears right below "Initial task mode" in the Input section:

Input
├── Initial task mode      [Plan ▾]
├── Default effort level   [Last used ▾]   ← NEW
├── Send messages with     [Enter ▾]
└── ...

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Reviews (1): Last reviewed commit: "feat(settings): add configurable default..." | Re-trigger Greptile

@jonathanlab jonathanlab force-pushed the fix/1846-default-effort-level branch from 67656aa to bc740e0 Compare May 19, 2026 15:41
Copy link
Copy Markdown
Contributor

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made some adjustments to clamp this to the configured level for to available reasoning levels, but LGTM!

@charlesvien charlesvien force-pushed the fix/1846-default-effort-level branch from 2bcd190 to 6c0b415 Compare May 21, 2026 02:09
reverb256 and others added 3 commits May 20, 2026 19:09
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
@charlesvien charlesvien force-pushed the fix/1846-default-effort-level branch from 6c0b415 to af2c1b3 Compare May 21, 2026 02:09
@charlesvien charlesvien merged commit a3317a2 into PostHog:main May 21, 2026
15 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.

Support configuring a default effort level

3 participants