feat(web): support multi-level thinking effort selection#1344
Conversation
🦋 Changeset detectedLatest commit: e65726f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4efe1ea5e6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Surface each model's declared reasoning efforts (support_efforts / default_effort) in the web model picker as a segmented control, replacing the on/off toggle. ThinkingLevel is now an open string, the model catalog carries the effort metadata to the web app, and the mobile settings sheet and /thinking command cycle through the available levels.
4efe1ea to
1780a0b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1780a0b63f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
coerceThinkingForModel returned 'on' for any non-'off' level when the active model was still undefined (catalog not loaded yet), which rewrote a persisted/default effort like 'high' to 'on' and silently dropped the model's declared effort on later prompts. Keep the requested level as-is until loadModels() re-runs coercion with the real model. Addresses Codex P1 review on modelThinking.ts.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11a387423a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
When selecting another session, the persisted thinking level can be a boolean 'on'/'off' carried over from a previous model. Deriving the pill suffix and active segment from that raw value could show "thinking: off" on an always-on model or hide the concrete effort behind a bare "thinking" tag. Coerce the level against the current model before deriving display state. Addresses Codex P2 review on Composer.vue.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e65726f435
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const coercedThinkingLevel = computed(() => | ||
| coerceThinkingForModel(currentModel.value, props.thinking ?? 'off'), | ||
| ); |
There was a problem hiding this comment.
Apply coerced thinking to submissions, not just display
This computed only normalizes stale thinking values for the composer UI. The send paths (submitPromptInternal / steerPrompt) still submit rawState.thinking, so after selecting an effort like max on one model and then opening a session whose active model only supports low/high, the pill highlights the coerced default here while the next prompt is still sent with thinking: 'max'. Providers then ignore or clamp that unsupported effort, so the first turn can run with a different level from what the UI shows; update the client state/session profile on active-model changes or submit the coerced value instead of only rendering it.
Useful? React with 👍 / 👎.
Related Issue
No related issue. This is the web-side follow-up to the thinking-effort work that already shipped in the TUI (
plan/thinking-effort-switching.md,plan/thinking-model-overhaul.md).Problem
The web composer collapsed thinking into a binary on/off toggle. Models that declare multiple reasoning efforts (
support_efforts/default_effort, e.g.low/high/max) had no way to expose those levels in the web UI — the two fields were even dropped at the wire → app mapping layer, so the front end never saw them.What changed
support_efforts/default_effortfrom the model catalog through to the web app (WireModel→AppModelmapper).ThinkingLevelto an open string ('off' | 'on' | (string & {})) and addlib/modelThinking.tshelpers (segmentsFor,defaultThinkingLevelFor,commitLevel,coerceThinkingForModel) that mirror the TUI semantics.[Off] [Low] [High] [Max]), and show the concrete level in the model pill suffix./thinkingslash command step through the active model's levels.The segmented-control UX was chosen to stay faithful to the TUI, so the two clients behave identically for every model capability (boolean / effort / always-on / unsupported).
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.