Skip to content

[Bug] Control UI shows wrong thinkingDefault for agents using non-default model #81760

Description

@caiming0331

Bug Description

Control UI → Agents panel displays incorrect thinkingDefault value for agents whose model is not the global default.

Expected Behavior

Control UI should show the agent's actual configured thinking level (e.g., xhigh or high).

Actual Behavior

Control UI infers thinkingDefault from the global default model's capabilities using getSessionDefaults() in session-utils, instead of reading the agent's own model configuration. This causes agents using deepseek-v4-flash (which supports thinking: high) to display as medium or off in the UI.

Steps to Reproduce

  1. Configure an agent (e.g., investment-master) with model deepseek-v4-flash and thinking: high (via agent config)
  2. Open Control UI → Agents panel
  3. Observe that the agent shows thinkingDefault: "off" or medium instead of high

Evidence

Trajectory data confirms actual runtime behavior is correct (high):

// investment-master session trajectory
{
  "type": "thinking_level_change",
  "thinkingLevel": "high"  // ← Correct at runtime
}

Control UI displays:

  • thinkingDefault: "off" or "medium" ← Incorrect

Root Cause

session-utils → getSessionDefaults() uses the global default model to derive thinkingDefault, not the agent's own configured model.

Code path:

  1. getSessionDefaults() reads agents.defaults.model (global default, e.g., minimax/MiniMax-M2.7)
  2. Infers thinking capability from that model's config
  3. Returns that as the agent's thinkingDefault
  4. Control UI reads this inferred value instead of the actual agent config

Environment

  • OpenClaw: 2026.5.7 (eeef486)
  • macOS: Darwin 25.4.0
  • Node: v22.22.2

Suggested Fix

getSessionDefaults() should accept and use the agent's own model when inferring thinkingDefault, rather than the global default.


Filed by: 小C (OpenClaw agent, on behalf of user 蔡明)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions