Repository navigation
fix(chat): restore default reasoning after off - #1255
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 28, 2026, 3:42 AM ET / 07:42 UTC. ClawSweeper reviewWhat this changesThe PR adds a Default reasoning choice in native chat that clears a session’s explicit reasoning override and serializes the update before the next message is sent. Merge readinessKeep open. This collaborator-authored, actively landing PR provides a focused fix for the linked native chat recovery path; manual source review found no blocking defect, and CI should finish its normal gate. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe native chat composer shows the gateway session’s model and reasoning state, then routes picker changes through the chat provider to a gateway session patch. The provider also controls whether an outgoing message waits for an in-flight session-option update. flowchart LR
A[Gateway session state] --> B[Native chat composer]
B --> C[Reasoning picker]
C --> D[Chat provider]
D --> E[Session patch request]
D --> F[Outgoing chat message]
E --> F
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused explicit-null clear path after normal CI completes, preserving Default as distinct from every gateway-accepted concrete reasoning value. Do we have a high-confidence way to reproduce the issue? Yes, at source level. The base composer offered only concrete reasoning values, including off, while the linked report supplies the affected provider/model scenario; the PR adds the previously absent explicit-clear path. Is this the best way to solve the issue? Yes. Reusing the existing tri-state SessionPatch clear contract restores the gateway default without guessing a concrete reasoning level that the provider may reject. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1955282412bd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Fixes #980
Adds a clearly labeled Default reasoning entry to the native chat composer. Selecting it clears the session
thinkingLevelthrough the existingSessionPatch.Clearexplicit-null contract instead of substituting a concrete level.The clear operation is typed through the composer, controller, runtime port, provider, and gateway bridge boundaries. Model and thinking-level session option patches are serialized per session, and the next send waits for the pending patch so the first prompt after restoring Default cannot race the clear.
Concrete reasoning levels still pass through unchanged. Gateway errors and Copilot model metadata behavior are unchanged.
Validation
./build.ps1: passeddotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: passed, 3,819 passed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName!~BrowserProxyEndpointScopingTests": passed, 2,733 passeddotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj --no-restore: passed, 1,010 passedpython .agents/skills/autoreview/scripts/autoreview --mode local: clean, no accepted or actionable findingsThe unfiltered Tray run passed 2,276 tests, then the test host hung while
BrowserProxyEndpointScopingTests.Diagnostics_NoOverride_TunnelWithoutBrowserProxyForward_DoesNotProbeTunnelLocalPlusTwowas active. Running that unrelated class alone also hung on this host inPortDiagnosticsService.GetActiveTcpListeners. The remaining 2,733 Tray tests passed in an isolated data directory.Real behavior proof
ClearThinkingLevel_FromOff_DelegatesExplicitClearNotConcreteLevelproves anoffsession routes Default to the dedicated clear operation and does not send a concrete level.SessionPatch_ToPayload_ClearSerializesToJsonNullproves the wire payload contains"thinkingLevel":null.SendMessageAsync_WaitsForInFlightThinkingLevelClearBeforeGatewaySendproves the next message waits until the Default clear completes.highstill reaches the Gateway bridge unchanged.UI proof: Not verified / blocked. The current branch app launched successfully with
./run-app-local.ps1 -NoBuild -AllowNonMain, and the chat deep link opened the current-head native chat surface. The composer could not render because the existing Gateway connection failed withSSH tunnel failed: TCP listener ownership could not be verified.No Gateway settings or model metadata were changed to work around that truthful runtime error.