Skip to content

feat(ui): show and edit each agent's utility model on the Agents page - #197894

Merged
hannesrudolph merged 2 commits into
openclaw:mainfrom
daniel-lxs:openclaw-per-agent-utility-model
Nov 13, 2026
Merged

hannesrudolph merged 2 commits into
openclaw:mainfrom
daniel-lxs:openclaw-per-agent-utility-model

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Closes #197866

What Problem This Solves

An agent can have its own utility model (agents.entries.<id>.utilityModel), but the Control UI only shows it in Advanced raw config. Agents → Overview lists the primary model, fallbacks and decision model, but not the utility model. Models shows the shared utility default and says agent settings override it, without naming which agents do. A broken per-agent override stays invisible, and changing the shared default leaves those agents on their own setting with no hint.

Solution

Agents → Overview gets a Utility model row between Fallbacks and Decision model. It uses the same model picker as the primary model and offers:

  • Inherit default (…): names the shared default (a model, Automatic, or Disabled) and removes the agent's own primary.
  • Disabled for this agent: saves an empty primary, which turns utility routing off for this agent.
  • Any model from the catalog. A configured model that is unavailable stays shown and selected.

The agent's own utilityModel.fallbacks are kept, in order, for every choice. Choosing inherit on an agent that has its own fallbacks saves { fallbacks }, which inherits the shared primary and keeps the fallbacks. The row lists those fallbacks under its description. Editing them stays in raw config.

Forge after saving a new utility model and reloading: the picker shows gpt-5-mini and the row lists its own fallbacks

Models → Utility model lists every agent that has its own utility settings, with its model (or "Disabled" or "default model") and its fallbacks. Each name opens that agent's Overview.

Models page naming Forge, its utility model and fallbacks, with a link to Forge

An agent that picks a model and has no fallbacks of its own saves a bare model string. As documented in models, an explicit per-agent primary without fallbacks does not use the shared utility fallbacks. Raw config edits already behave this way.

Impact

  • Per-agent utility models can be seen and changed without raw config.
  • No config shape or Gateway change: the UI writes the existing utilityModel string or { primary, fallbacks } shape through the existing agent config save.
  • Docs: docs/web/control-ui/settings.md describes where to set it and what each choice saves.

Evidence

  • Live, against an isolated Gateway built from this branch just before a lint-only refactor of the Models link (keyless, synthetic config): Forge started with { primary: "anthropic/claude-sonnet-4-6", fallbacks: ["anthropic/claude-opus-4-8", "openai/gpt-5.4"] }. Picking gpt-5-mini on Agents → Overview saved { primary: "openai/gpt-5-mini", fallbacks: ["anthropic/claude-opus-4-8", "openai/gpt-5.4"] } to the config file. After a page reload the picker and the fallback line showed the saved values, and the Forge link on Models opened /settings/agents/forge. The red "couldn't refresh some models" notice in the screenshot comes from the test Gateway having no provider keys.
  • Tests: ui/src/pages/agents/model-config.test.ts (the fallback test fails without the fallback-keeping write), panels-overview.test.ts, model-providers/data.test.ts, view-defaults.test.ts, view.test.ts, model-providers-page.test.ts, model-providers-page.presentation.test.ts: 7 files, all passing.
  • tsgo (UI project), oxlint on the changed files, stylelint, ui:i18n:baseline (no baseline change) and ui:i18n:verify all pass.
  • Not covered live: the inherit and disable choices (unit tests only), and a Gateway with real provider credentials.

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Nov 12, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: ready, awaiting a maintainer decision.

What this changes

Adds per-agent utility-model editing on Agents Overview and linked override summaries on Models.

Example: Forge uses anthropic/claude-sonnet-4-6 with utility fallbacks anthropic/claude-opus-4-8 and openai/gpt-5.4.

  • Before: The override requires Advanced raw config to inspect or change.
  • After: Overview can select openai/gpt-5-mini while preserving both fallbacks, and Models links to Forge.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused implementation with real UI and upgrade evidence, no identified code defects, and an outstanding feature-direction decision.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots and the contributor's isolated-Gateway report cover utility editing, preserved fallback display, reload persistence, and linked navigation; the exact-head upgrade report covers retained string settings from stable 2026.11.3. Inherit and disable remain unit-tested, and inference is outside this UI change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: An agent can keep an invisible utility override after its shared default changes, requiring raw configuration to inspect and correct it.
Reason: The feature has concrete user value and preserves existing behavior, but its new settings presentation needs an owner decision.

Merge readiness

⏳ Ready, awaiting maintainer decision

Keep this PR open for an owner decision on the focused UI feature; the implementation is coherent, and the earlier CSS finding is addressed.

Priority: P2
Reviewed head: 050919fea504cf48877b11925b79e982609dc6db
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should per-agent utility editing and linked override summaries ship together in Control UI settings?
  • Recommendation: Approve the focused UI addition: Expose the existing setting through Overview and identify overrides on Models while retaining current routing and fallback semantics.
  • Why: The existing runtime supports the settings, but no human owner decision approves these new UI controls or their presentation.

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI reads agent configuration and the model catalog, stages utility selections through the existing config editor, and displays the persisted settings without changing Gateway routing.

flowchart LR
  A[Gateway configuration] --> B[Existing config owner]
  C[Agent model catalog] --> D[Agents Overview picker]
  B --> D
  D --> B
  B --> E[Models override summary]
  E --> D
Loading

Technical review

Best possible solution:

Approve the focused UI addition using the existing picker, config editor, and runtime inheritance contract.

Do we have a high-confidence way to reproduce the issue?

Current-main source lacks the utility control, and the inspected stable screenshot shows that omission; no target code was executed during this review.

Is this the best way to solve the issue?

The patch uses existing owners and preserves the documented config shapes; the added presentation and focused tests serve distinct editing, fallback-preservation, unavailable-selection, and navigation behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8a328bf86189.

Provenance checked

  • Agent configuration projection keeps the original intent (b84ca7e: Reuse canonical server-owned types without changing runtime behavior or persisted values.)
  • Agents Overview settings rows keeps the original intent (cf388f0: Present editable settings through shared row components while preserving model controls.)
  • Models settings and utility fallback shapes keeps the original intent (6861671: Support independent utility fallback chains while preserving strings, inheritance, and existing config ownership.)
  • Shared component styling keeps the original intent (8c74089: Keep shared component styles available while route-specific styles load lazily.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 44998b0 adds ui/src/pages/agents/panels-overview.tsx:409 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 44998b0afc07; files: ui/src/pages/agents/panels-overview.tsx)
  • Vyctor H. Brzezowski: Raw commit cf388f0 adds ui/src/pages/agents/panels-overview.tsx:430 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cf388f0c068e; files: ui/src/pages/agents/panels-overview.tsx)

PR surface

Source +185, Tests +107, Docs +2. Total +294 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 190 5 +185
Tests 6 107 0 +107
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 300 6 +294

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Label justifications:

  • P2: This improves visibility and editing of existing agent settings with limited scope and an existing Advanced-config recovery path.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-12T20:15:37.998Z sha e3e72b9 :: needs real behavior proof before merge. :: [P2] Keep the utility-link styling within the CSS budget

Reviewed November 12, 2026, 7:36 PM ET / November 13, 2026, 00:36 UTC (Revision 2).

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Nov 12, 2026
Render each agent name as a real link styled by the global link rule and the shared session-link hover underline, instead of a button with its own reset rules. Total raw CSS grows 35 B.
@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Nov 12, 2026
@daniel-lxs

Copy link
Copy Markdown
Member Author

Verified stable 2026.11.3 (847611d) → PR head 050919fea504cf48877b11925b79e982609dc6db in an isolated macOS VM, using a real Gateway and a synthetic agent named Forge.

On stable, agents.entries.forge.utilityModel was the bare string anthropic/claude-sonnet-4-6. Agents → Overview had no per-agent Utility model row.

Stable 2026.11.3: Forge's Overview has no per-agent Utility model row

I stopped the stable Gateway, installed the head build produced by the repo’s self-contained packaging script, and ran the documented Doctor upgrade step: openclaw doctor --fix --non-interactive, offline, before starting head. The same state and config were retained. Doctor exited successfully and preserved the string; head loaded it in Forge’s Utility model picker.

Head 050919f: the existing anthropic/claude-sonnet-4-6 string loads in the Utility model picker

Changing Forge’s primary model to openai/gpt-5.4-mini autosaved, showed Saved, and kept the original utility-model string unchanged on disk and after a page reload. Then selecting openai/gpt-5-mini as the utility model autosaved another bare string, showed Saved, and retained that value on disk and after a second reload.

After utility-model edit and reload: Forge shows gpt-5-mini

Models listed Forge: openai/gpt-5-mini. Clicking Forge opened /settings/agents/forge.

Models lists Forge's utility override and its link to the agent

This run did not exercise model inference, provider credentials, the inherit/disable choices, or utility settings with fallback lists. The test Gateway had no provider credentials; model-catalog refresh warnings remain visible in the screenshots.

@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
@roboclaw-bot roboclaw-bot added the clawtributors PR from a clawtributor label Nov 13, 2026
@hannesrudolph
hannesrudolph merged commit 2498c34 into openclaw:main Nov 13, 2026
107 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…openclaw#197894)

* feat(ui): show and edit each agent's utility model on the Agents page

Refs openclaw#197866

* fix(ui): keep the Models agent links within the CSS budget

Render each agent name as a real link styled by the global link rule and the shared session-link hover underline, instead of a button with its own reset rules. Total raw CSS grows 35 B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawtributors PR from a clawtributor docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show and edit per-agent utility models in Agents → Overview

3 participants