Repository navigation
feat(web-shell): persist reasoning effort #10011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
216b8c4
feat(web-shell): persist reasoning effort
callmeYe 74db5c0
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 60408ac
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 089e41a
fix(web-shell): scope reasoning preview refresh
callmeYe 22fe234
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe b3a71e8
fix(web-shell): keep persisted reasoning state consistent
callmeYe 5d75955
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 9c014e7
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe f702564
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 0b2f496
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 9c29e23
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 5668591
fix(core): register report findings permission aliases
callmeYe 00960dc
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 272603c
test(cli): remove duplicate session swap fixture fields
callmeYe b6c6745
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe b145e66
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe ab8db9c
fix(cli): address reasoning persistence review
callmeYe 9e49917
fix(cli): guard persisted reasoning defaults
callmeYe c388b9d
fix(cli): align mandatory reasoning defaults
callmeYe 5fac2ce
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 89fb490
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 20a094d
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 709f984
fix(web-shell): keep persisted reasoning previews in sync
callmeYe 4d85d4f
fix(web-shell): keep standalone effort session-scoped
callmeYe 40b88a5
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 534459c
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe a4174ca
fix(web-shell): Hide ACP default effort instruction
callmeYe a2fb61e
test(web-shell): align reasoning smoke with hidden default
callmeYe 59126b0
fix: handle incompatible reasoning persistence
callmeYe a313859
fix: preserve dormant reasoning preference
callmeYe 034a141
fix(core): honor request reasoning opt-outs
callmeYe 39108d3
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 680f58f
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 790b36e
fix(web-shell): clear effort for toggle-only models
callmeYe a159cdc
fix(cli): hide reasoning controls for unregistered Qwen models
callmeYe 77bd395
fix(cli): clear incompatible reasoning on model switch
callmeYe 3dc4e4d
test(cli): update worktree mock for model capability check
callmeYe 7092e8e
Merge remote-tracking branch 'origin/main' into codex/fix-webshell-re…
callmeYe 74ab5e9
fix(cli): preserve compatible reasoning preferences
callmeYe 8d44a23
fix(web-shell): localize reasoning effort labels
callmeYe a45f1c5
fix(web-shell): preserve English effort labels
callmeYe 97d7db3
fix(cli): harden reasoning cleanup after model switch
callmeYe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # WebShell reasoning effort persistence | ||
|
|
||
| ## Problem | ||
|
|
||
| WebShell currently applies a reasoning effort selection only to the active ACP session. A new session therefore falls back to the previously configured model default. The settings schema also treats effort as one global five-value scale, even though providers can expose model-specific values such as `ultra` or `minimal`. | ||
|
|
||
| ## Semantics | ||
|
|
||
| `model.reasoningEffort` is an open string setting: | ||
|
|
||
| - An absent value leaves reasoning at the model or provider default. | ||
| - `none` disables reasoning by setting the runtime configuration to `reasoning: false`. | ||
| - Every other non-empty value is preserved verbatim as `reasoning.effort`. | ||
|
|
||
| There is no global normalization, ordering, allowlist, or fallback for persisted values. The existing five built-in effort tiers remain available to `/effort` and provider adapters that explicitly implement that scale. Provider adapters may translate built-in tiers for their own wire protocol, but must pass an unknown value through or reject it explicitly rather than silently changing it. | ||
|
|
||
| ACP uses `default` only as an interaction instruction to remove `model.reasoningEffort`; that ACP path never writes the sentinel. The open setting does not reserve `default` globally, so a value authored directly in settings remains an opaque provider value. After clearing the selected scope, the live session adopts the resulting merged value, including an inherited opaque string from a lower-precedence scope. | ||
|
|
||
| Persisting a model switch to a toggle-only Qwen model clears `model.reasoningEffort` from every active writable settings scope and clears the live override after the switch succeeds. Switching to a non-Qwen model performs the same cleanup only for an opaque provider-specific effort; built-in tiers remain portable. Session-only and managed-session switches clear only an incompatible live override without mutating the persisted default. Read-only managed settings are also left unchanged while their incompatible live override is removed. Switches to tiered qwen3.8-max models preserve the effort value. | ||
|
|
||
| ## Persistence boundary | ||
|
|
||
| The WebShell daemon route marks its ACP `reasoning_effort` update as persistent. The ACP agent applies the selection to the live session first, then writes through the `Session` instance's own loaded settings using the same scope selection as model persistence. Direct ACP calls without the private marker remain session-only. | ||
|
|
||
| After a successful persisted update, the bridge broadcasts `settings_changed` for `model.reasoningEffort` with the actual user or workspace scope that was written. User-scope changes fan out across every live workspace bridge in the daemon; workspace-scope changes stay on their owning bridge. This refreshes retained workspace provider state and the no-session welcome preview without creating an empty session. | ||
|
|
||
| If the settings write fails, the live session remains updated and the request reports that the current session changed but the default was not saved. No settings-change event is broadcast. | ||
|
|
||
| ## Runtime lifecycle | ||
|
|
||
| The runtime keeps an explicit reasoning override across authentication refreshes and both hot and full model rebuilds. The override distinguishes disabled reasoning, an opaque effort string, and the provider default. This prevents `none` from being lost merely because it has no `effort` field. | ||
|
|
||
| When an explicit preference is active for a tiered qwen3.8 model on DashScope, the runtime removes higher-priority `extra_body` and `samplingParams` thinking knobs from its live configuration with copy-on-write semantics. This keeps the persisted preference effective after new-session construction and authentication refresh without rewriting the model's stored generation configuration. With no explicit preference, those static model defaults remain unchanged. | ||
|
|
||
| Model reasoning capabilities advertise options as independent `value` and `name` pairs. WebShell stores and submits `value` while rendering `name`, so model-specific values do not depend on global translation keys. | ||
|
|
||
| ## Validation | ||
|
|
||
| Unit and integration coverage verifies opaque string round trips, `none`, clearing to provider defaults, lifecycle rebuilds, capability labels, the private persistence marker, write failures, welcome previews, provider wire behavior, and persisted model switches into toggle-only Qwen models. Real-daemon E2E compares a clean baseline and this change with isolated configuration directories for both Medium and Thinking Off across a daemon restart and a newly created session, then verifies that switching to a toggle-only Qwen model removes the persisted effort before the next request. | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.