Skip to content

feat(ui): align per-agent model settings with global Models - #204772

Merged
Patrick-Erichsen merged 17 commits into
mainfrom
openclaw/faint-shrimp-f1ce24
Nov 25, 2026
Merged

Patrick-Erichsen merged 17 commits into
mainfrom
openclaw/faint-shrimp-f1ce24

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What problem this solves

Operators could configure a model for subagents and agent-started sessions, but neither settings panel exposed it. The individual agent also had a different model form: it lacked Speed and used different controls and grouping for other settings.

User impact

Settings → Models and Settings → Agents → Overview → Model selection now use one component: Model, Effort, Speed, then More settings for the fallback model, subagent model, utility model, utility fallback, and decision model. Changes on Models set shared defaults. Changes on Agent Overview affect only the selected agent, including when that agent is the default agent.

  • A per-agent control can inherit the shared setting or pin an override. Explicit Off, disabled utility, and an empty fallback chain are not the same as inheriting. Both per-agent fallback rows retain the full-chain editor.
  • The subagent controls edit only the primary and preserve the saved fallback list and sibling settings. When no subagent-model override is set, same-agent children follow the creating session's model; cross-agent children use the target agent's own model. No runtime resolver or config schema changed.

Evidence

Global and per-agent, on the same build (product revision 520978ebadb; expanded, real Control UI with mocked Gateway data):

Global controls and per-agent controls side by side

Clean before and after

Setting Before After
Global Models Original global defaults without a subagent row Shared global defaults panel
Agent Overview Earlier PR revision with a different per-agent panel Per-agent view uses global layout with inherited values

Annotated before and after

Setting Before After
Global Models Previous global rows Global subagent row in More settings
Agent Overview Earlier per-agent-only layout Per-agent subagent row in the shared More settings group

Global baseline: main 59509844835. Per-agent comparison baseline: the earlier PR head c1d0ee1ac6b3, which had the subagent row but not the shared layout. Screenshots were captured at 1280×1000 with the same synthetic config.

Verification

  • The new per-agent browser regression failed on the previous layout (no More settings). On the new layout, desktop and 390px browser tests verified disclosure, all six pickers' alignment, no write on expansion, and that changing the per-agent subagent model left global defaults unchanged.
  • A separate real Gateway test verified persisted global and per-agent settings after reload. Promoting a saved fallback to primary, switching back and clearing the primary kept the original fallback list and maxConcurrent. Clearing the per-agent override removed the empty block. Raw disk readbacks and screenshot artifacts. No model-provider request or production config change was involved.
  • The dependent browser suites passed: 22 mocked tests and two isolated real-Gateway tests, including editing the default agent’s fallback chain without changing the global default. The UI production build passed with CSS and chat startup budget warnings.

Patrick-Erichsen and others added 2 commits November 24, 2026 08:40
Add a Subagent model row to Models > More settings (agents.defaults.subagents.model) and to each agent's Overview (agents.entries.<id>.subagents.model). Both rows keep configured fallbacks and sibling subagent settings, and clearing returns to the inherited model.

Move UtilityOverrides into a sibling module so default-models-view.tsx stays within its line cap.
OpenClaw-Publication: c7f45e21-394b-8b3c-b795-5a46cbbee80c
@clawsweeper

clawsweeper Bot commented Nov 24, 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: L labels Nov 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR shares the global and per-agent model form, exposes existing subagent settings, and adds per-agent speed and utility-fallback controls.

Example: Set main's subagent model to fixture/runner while retaining the shared fallback fixture/backup.

  • Before: The subagent setting required editing configuration outside the curated model panels.
  • After: Agent Overview saves the override, reloads it, and can clear it without changing shared defaults or the saved fallback chain.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent settings work with inspectable visual and persistence evidence and no identified blocking defect; existing config shapes require no migration.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): Inspected screenshots demonstrate the shared Control UI layout, and published isolated real-Gateway readbacks demonstrate global and per-agent subagent saves, reloads, clearing, and preservation of fallbacks and maxConcurrent; the demonstrated control and writer code remains unchanged at the reviewed head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators need raw configuration for existing subagent settings and encounter inconsistent global and per-agent model controls.
Reason: The host records owner-approved direction, and the implementation exposes existing settings through a shared form without adding configuration keys or changing runtime routing.

Merge readiness

✅ Ready for maintainer review

This PR provides useful model-setting controls that current main lacks, with no blocking correctness or security findings. Exact-head CI is still running.

Reviewed head: d1cdd1a66c599d3c41f3f753d7f5f72ff0de7004

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI projects Gateway model catalogs and saved configuration into settings controls, then sends edits through the existing global mutation and per-agent config owners.

flowchart TD
  A[Gateway catalog and configuration] --> B[Global Models panel]
  A --> C[Agent Overview panel]
  B --> D[Shared model settings rows]
  C --> D
  D --> E[Existing configuration mutation owners]
  E --> F[Gateway configuration persistence]
Loading

Technical review

Best possible solution:

Retain the shared presentation component and existing configuration owners while preserving explicit overrides, inheritance, and complete fallback chains.

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

This is a feature request implemented by the PR; main's curated panels omit subagent-model editing and per-agent speed controls.

Is this the best way to solve the issue?

The shared form removes duplicate rendering while retaining the existing write owners and runtime contracts, making it a coherent implementation of the stated scope.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 304ea4c19eb8.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Daniel: Raw commit 2498c34 adds ui/src/pages/agents/agent-config-actions.ts:60 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2498c348bc28; files: ui/src/pages/agents/agent-config-actions.ts)
  • Peter Steinberger: Raw commit 51e003d adds ui/src/pages/agents/agent-config-actions.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 51e003d37df2; files: ui/src/pages/agents/agent-config-actions.ts)
  • Vincent Koc: Raw commit 2e2faf0 adds ui/src/pages/model-providers/default-models-view.tsx:248 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2e2faf0339b3; files: ui/src/pages/model-providers/default-models-view.tsx)

PR surface

Source +221, Tests +367, Docs +6. Total +594 across 37 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 16 1020 799 +221
Tests 19 686 319 +367
Docs 2 9 3 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 37 1715 1121 +594

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 rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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 (2 earlier review cycles)
  • reviewed 2026-11-24T16:57:48.143Z sha c9d6ac9 :: blocked before merge. :: [P2] Preserve the fallback array when changing the subagent primary | [P2] Describe target-agent selection and inheritance accurately
  • reviewed 2026-11-24T21:52:48.427Z sha c1d0ee1 :: needs maintainer review before merge. :: none

Reviewed November 24, 2026, 9:06 PM ET / November 25, 2026, 02:06 UTC (Revision 3).

Changing the default subagent model no longer drops a saved fallback that matches the new choice, so the array is never rewritten and needs no replace path.

The help text, unset label and settings docs now say that the setting applies to children that run as the agent, and that an unset default follows the parent session for same-agent children and the target agent's model otherwise.

@THE-NAVVV THE-NAVVV left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

​

Patrick-Erichsen and others added 2 commits November 24, 2026 13:45
OpenClaw-Publication: e7c9eb55-8d4f-856e-a02e-4d5aa0f1a73a
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Verified the review fixes on c1d0ee1ac6b3 in an isolated real Gateway using synthetic model names; no provider request or production config change was needed. The global and per-agent selections both survived a page reload. Promoting the saved fallback to primary, switching back, and clearing the global primary left the fallback array and maxConcurrent unchanged on disk. Clearing the per-agent override removed its empty block and showed Inherit default. These updated visual comparisons use the mocked-Gateway browser fixture; they are separate from the persistence test.

Models Agent Overview
Clean Global model row Per-agent model row
Annotated Global model row highlighted Per-agent model row highlighted

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 24, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Real-Gateway execution artifact for the reviewed tree (c1d0ee1ac6b3). Below are the retained disk readbacks and the browser test runner output, not a reconstruction. The test asserted each selected value again after a full page reload. The model names are fixtures; no provider was contacted.

1. Loaded existing config
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/runner","fallbacks":["fixture/backup"]}}
  entries.main = {}
2. Models: chose Fixture Backup (a saved fallback)
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/backup","fallbacks":["fixture/backup"]}}
  entries.main = {}
3. Models: switched back to Fixture Runner
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/runner","fallbacks":["fixture/backup"]}}
  entries.main = {}
4. Models: cleared to Not set
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {}
5. Agent Overview: chose Fixture Runner for main
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {"subagents":{"model":"fixture/runner"}}
6. Agent Overview: cleared to Inherit default
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {}

 �[32m✓�[39m �[30m�[46m ui-e2e-bundled �[49m�[39m ui/src/e2e/zz-subagent-model.real-gateway.e2e.test.ts�[2m:86�[22m�[2m > �[22mSubagent model rows with a real Gateway�[2m > �[22msaves, reloads and clears both subagent model rows�[33m 10646�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m saves, reloads and clears both subagent model rows�[33m 10646�[2mms�[22m�[39m

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Revised model panels, local candidate 520978ebadb. This replaces the earlier per-agent layout shown in the first screenshots. Both panels now share the same model rows; the agent retains its inheritance choices and full fallback-chain editor. Product captures are the same Control UI build on a mocked Gateway, 1280 × 1000.

Global model defaults next to the corrected per-agent section

Global Per agent
Clean Global model controls Per-agent model controls
Annotated Global model settings highlighted Per-agent model settings highlighted

An isolated real Gateway (no provider call) separately passed the browser save, reload and clear test with the shared controls. These are the recorded disk reads:

1. Loaded existing config
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/runner","fallbacks":["fixture/backup"]}}
  entries.main = {}
2. Models: chose Fixture Backup (a saved fallback)
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/backup","fallbacks":["fixture/backup"]}}
  entries.main = {}
3. Models: switched back to Fixture Runner
  defaults.subagents = {"maxConcurrent":4,"model":{"primary":"fixture/runner","fallbacks":["fixture/backup"]}}
  entries.main = {}
4. Models: cleared to Not set
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {}
5. Agent Overview: chose Fixture Runner for main
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {"subagents":{"model":"fixture/runner"}}
6. Agent Overview: cleared to Inherit default
  defaults.subagents = {"maxConcurrent":4,"model":{"fallbacks":["fixture/backup"]}}
  entries.main = {}

@Patrick-Erichsen Patrick-Erichsen changed the title feat: choose the subagent model in Models and agent settings feat(ui): align per-agent model settings with global Models Nov 25, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Paired CI repair measurements for d1cdd1a66c59. No budget changed.

Check Before repair After repair
Compressed CSS CI rejected growth above base 346,278 B on base → 346,150 B on candidate (128 B smaller); paired performance check passed
Net test lines +508 (limit 400) +366, no allocation credit; all 15 model-config cases retained and passing
Global and per-agent models Approved PR screenshots Zero changed pixels on either panel; six browser tests and ten chunk-loading tests passed

The full local pnpm check:changed passed. Both builds remain above the absolute CSS ceiling; this change reduces the total rather than raising that ceiling.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 25, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit f5dbb2a into main Nov 25, 2026
101 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/faint-shrimp-f1ce24 branch November 25, 2026 02:19
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants