openclaw - ✅(Solved) Fix UI thinking dropdown shows "Default (off)" regardless of configured thinkingDefault [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70967Fetched 2026-04-24 10:37:20
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×2

Root Cause

Root cause: The frontend KD() function in index-DIfSzHeM.js computes the default label using the session object's thinkingDefault field, which is populated by resolveThinkingDefaultForModel() from session-utils. This function only considers the model catalog's reasoning flag — it does not read agents.defaults.thinkingDefault from the config.

Fix Action

Fixed

PR fix notes

PR #70981: fix(gateway): use config-resolved thinking default in session rows

Description (problem / solution / changelog)

Summary

  • use the config-aware thinking default resolver when building gateway session rows
  • expose the resolved agents.defaults.thinkingDefault value to Control UI session state
  • add a regression test covering a configured default that differs from the model fallback

Testing

  • pnpm exec vitest run src/gateway/session-utils.test.ts -t "loadGatewaySessionRow exposes configured thinkingDefault to the UI session row"

Closes #70967.

Changed files

  • src/gateway/session-utils.test.ts (modified, +43/-0)
  • src/gateway/session-utils.ts (modified, +4/-2)

PR #71033: fix(ui): thinking dropdown shows correct thinkingDefault from config

Description (problem / solution / changelog)

Summary

Fixes #70967

The Control UI thinking level dropdown always showed Default (off) even when agents.defaults.thinkingDefault or agents.list[].thinkingDefault was configured to a non-off value.

Root Cause

buildGatewaySessionRow() in session-utils.ts used resolveThinkingDefaultForModel() which only considers model catalog/profile defaults. It did not read:

  1. Per-agent thinkingDefault (agents.list[].thinkingDefault)
  2. Per-model params.thinking (agents.defaults.models[].params.thinking)
  3. Global agents.defaults.thinkingDefault

Fix

Replace resolveThinkingDefaultForModel() with a new resolveSessionThinkingDefault() that checks all config sources in priority order:

  1. Per-agent thinkingDefault
  2. resolveThinkingDefault() (per-model params, global default, model catalog)

The UI dropdown now correctly shows e.g. Default (high) when configured.

Changed files

  • src/gateway/session-utils.ts (modified, +34/-2)

Code Example

defaultLabel: `Default (${
  t?.thinkingDefault
  ?? (i && a ? ra({provider:i, model:a, catalog:e.chatModelCatalog??[]}) : `off`)
})`

---

const configured = params.cfg.agents?.defaults?.thinkingDefault;
if (configured) return configured;
RAW_BUFFERClick to expand / collapse

Bug: The Control UI thinking level dropdown always shows Default (off) as the label for the default option, even when agents.defaults.thinkingDefault is set to a non-off value (e.g. high).

Expected: The dropdown should show Default (high) when thinkingDefault is configured as high.

Root cause: The frontend KD() function in index-DIfSzHeM.js computes the default label using the session object's thinkingDefault field, which is populated by resolveThinkingDefaultForModel() from session-utils. This function only considers the model catalog's reasoning flag — it does not read agents.defaults.thinkingDefault from the config.

Meanwhile, the backend's resolveThinkingDefault() in model-selection does read params.cfg.agents?.defaults?.thinkingDefault, so the actual runtime behavior is correct (Think: high), but the UI label does not reflect it.

Relevant code:

Frontend (control-ui/assets/index-*.js):

defaultLabel: `Default (${
  t?.thinkingDefault
  ?? (i && a ? ra({provider:i, model:a, catalog:e.chatModelCatalog??[]}) : `off`)
})`

Backend (model-selection-*.js) — has the config read that frontend lacks:

const configured = params.cfg.agents?.defaults?.thinkingDefault;
if (configured) return configured;

Fix suggestion: The session object returned to the frontend should include the resolved thinkingDefault that accounts for the user's config, not just the model-level default.

extent analysis

TL;DR

Update the resolveThinkingDefaultForModel() function to read agents.defaults.thinkingDefault from the config and return the resolved value to the frontend.

Guidance

  • Review the resolveThinkingDefaultForModel() function in session-utils to understand how it currently determines the default thinking level.
  • Modify the function to read agents.defaults.thinkingDefault from the config and use it to determine the default label.
  • Update the defaultLabel computation in the frontend to use the resolved thinkingDefault value from the session object.
  • Verify that the updated function correctly returns the configured default thinking level.

Example

// Example update to resolveThinkingDefaultForModel()
function resolveThinkingDefaultForModel() {
  const configuredDefault = params.cfg.agents?.defaults?.thinkingDefault;
  if (configuredDefault) return configuredDefault;
  // existing logic to determine default from model catalog
}

Notes

This fix assumes that the params.cfg object is accessible in the resolveThinkingDefaultForModel() function. If not, additional changes may be needed to pass the config to the function.

Recommendation

Apply workaround: Update the resolveThinkingDefaultForModel() function to read the configured default thinking level from the user's config, ensuring the frontend displays the correct default label.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix UI thinking dropdown shows "Default (off)" regardless of configured thinkingDefault [2 pull requests, 1 participants]