fix(control-ui): show effective thinking default in session settings#63418
fix(control-ui): show effective thinking default in session settings#63418jpreagan wants to merge 7 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes the Control UI thinking dropdown showing a stale model-heuristic label (e.g. Confidence Score: 5/5Safe to merge — narrow, backward-compatible fix with targeted tests and no logic changes outside the displayed label. All findings are P2 or lower. The gateway computation, UI fallback, type updates, and new tests are all consistent and correct. Older gateways that omit the field naturally fall back to the existing heuristic. No files require special attention.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 577784046c
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f35ce2c62
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
bd14b7e to
e58c321
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce2f24aafd
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Describe the problem and fix in 2–5 bullets:
Default (low)orDefault (off)even when runtime resolution was using a configured global or per-agent default such ashigh.effectiveThinkingDefaulton each session row,sessions.listpasses the gateway model catalog through when deriving that field, and session-row resolution now preserves per-agentthinkingDefaultprecedence before falling back to model/global defaults.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.Default (...)from a frontend model heuristic instead of consuming the active session's effective configured default from backend session/config state.thinkingDefault.thinkingLevel), not the separately resolved effective default.Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write
N/A.src/gateway/session-utils.test.ts,src/gateway/server.sessions.gateway-server-sessions-a.test.ts,ui/src/ui/views/chat.test.tsthinkingDefaultoverrides should all produce the sameDefault (...)label the runtime uses for the active session.User-visible / Behavior Changes
The Control UI thinking dropdown now shows the actual effective default for the active session, including global configured defaults, catalog-backed reasoning defaults, and per-agent
thinkingDefaultoverrides, instead of stale heuristic values such asloworoff.Diagram (if applicable)
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
pnpm buildandpnpm openclaw gateway run --bind loopback --port 18789 --forceopenai-codex/gpt-5.4agents.defaults.thinkingDefault: highSteps
agents.defaults.thinkingDefaultor an agent-specificagents.list[].thinkingDefault.chat.history/ session payload from the running gateway.Expected
Actual
Default (low)orDefault (off)even while runtime resolution used a configured higher default.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test src/gateway/session-utils.test.ts src/gateway/server.sessions.gateway-server-sessions-a.test.ts ui/src/ui/views/chat.test.ts; rebuilt withpnpm build; restarted the local branch-run gateway; verified via direct RPC thatsessions.listreturnedeffectiveThinkingDefault: "high"andchat.historyreturnedthinkingLevel: "high"; manually verified the Control UI renderedDefault (high)after refresh.effectiveThinkingDefaultstays unset when the backend cannot resolve it safely; confirmed per-agentthinkingDefaulttakes precedence in session-row defaults.pnpm test, non-Control-UI surfaces, or provider-specific behavior beyond the reproduced live local session.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes)No)No)Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.effectiveThinkingDefaultwould otherwise lose the label.