Skip to content

improve: choose an automation's model and reasoning with the chat composer's pickers - #201218

Merged
vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/automations-model-reasoning-pickers
Nov 18, 2026
Merged

vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/automations-model-reasoning-pickers

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

When you create or edit an automation, the model and reasoning controls under the prompt looked and behaved unlike the chat composer's: the model menu listed raw refs such as openai/gpt-5.5, and reasoning was a free-text field where you had to know valid words like low.

User Impact

User impact: the automation editor now uses the same model picker (names, provider icons, provider rail, search) and the same reasoning Effort slider as the chat composer, so choosing a model and a level works the same way in both places.

  • The closed triggers follow the tray's text color with a monochrome provider icon, as in chat, and their chevrons match the schedule selects beside them.
  • Default stays the empty value: the agent's default model (marked "Default") in the model menu, and the model's own default level in reasoning.
  • Reasoning offers only the levels the selected model supports. If you switch to a model that doesn't offer the chosen level, reasoning falls back to Default, as a new session draft does.
  • Saved models or levels the catalog doesn't list still show and are saved unchanged.
  • Removed: the custom model entry and the free-text reasoning field. A model outside the agent's catalog can no longer be typed in. A level saved with such a model is kept on save, but it has no picker, because the catalog can't say which levels that model takes.
  • Speed, context window, runtime and access program aren't offered, because automations can't store them.
  • When the editor is read-only or saving, both pickers are disabled.

Why This Change Was Made

The chat model controls already work with a draft target that has no session; the New Session page uses them that way. The automation editor now feeds the same component from the automation form, reusing the New Session draft helpers for the Default model and for reasoning levels that change with the model. The shared chat components gained two optional props that chat doesn't set: trigger ids, so the "can't add yet" list can focus the pickers, and menu placement, so the menus open below the tray instead of being clipped above it. The tray gives the pickers its own ink: the provider mark follows the label and the chevrons use the schedule selects' size, stroke and tone, because chat neutralizes its provider mark only inside its own composer (New Session keeps brand color on purpose). The superseded reasoning field, its suggestion list, the custom model entry, the configured-model suggestion helper, and their strings and styles are removed.

This PR merges cleanly with the schedule tray PR #201214. It conflicts with the agent picker PR #201213 in view-editor.tsx, view-props.ts, view-suggestions.tsx and view.test-support.ts because both remove suggestion lists, so whichever lands second needs a small rebase (checked with git merge-tree).

Model choices come from the automation's effective agent. If its owner is not resolved yet, the controls keep a generic Default and preserve saved overrides while delivery options remain available.

Evidence

Real Control UI production build with a mocked Gateway: 25 automations (long names, a failed run, paused rows) and a 10-model catalog across three providers, each model with its own reasoning levels. Before is 9d6f4a94adf5 (main); after is this branch. Desktop 1280×900, cropped to the editor; phone 390×900.

Clean comparison

Before, tray closed: the model shows "Default" and reasoning is grey "low" text.

Before: Default model and a free-text low reasoning field

After, tray closed: the chat composer's GPT-5.5 and Low pickers.

After: GPT-5.5 and Low pickers in the tray

Before, model menu: raw model refs.

Before: model menu listing raw refs

After, model menu: the chat composer's menu with names, the provider rail and search.

After: chat model menu with model names and providers

Before, reasoning: a focused text field (Chromium screenshots don't render the native suggestion popup).

Before: reasoning is a text field

After, reasoning: the Effort slider with GPT-5.5's levels.

After: Effort slider for GPT-5.5

Annotated comparison

Before: raw model ref and free-text reasoning highlighted

After: the session composer's pickers highlighted

Before: raw model refs highlighted

After: chat model menu highlighted

Before: the free-text reasoning field highlighted

After: the model's reasoning levels highlighted

Chat composer for comparison

This PR doesn't change the chat composer; before and after are pixel-identical in the composer region.

Chat composer pickers closed

Chat composer model menu

Chat composer Effort menu

Dark theme and phone

Before, dark: model menu of raw refs

After, dark: chat model menu

Before (phone) After (phone)
Before, phone: Default and a low text field After, phone: GPT-5.5 and Low pickers

On a phone, the menus open as the chat composer's mobile sheet.

Checks run

  • End-to-end: choose a model, set Extra high, switch to Claude Opus (reasoning falls back to Default), set Off, and save. The automation is created with model: anthropic/claude-opus-4.5, thinking: off.
  • Unit tests: a saved model and level outside the catalog survive a save; an unusual level shows next to the model's own levels; the pickers are disabled when you can't edit the automation; the catalog loading lifecycle.
  • Tray trigger styles measured in the browser: chevrons match the schedule selects in color, size and stroke in light and dark, and the provider icon matches the label color at rest and on hover.
  • Chat model, effort and overlay tests; tsgo:ui, oxlint, stylelint, oxfmt, i18n verify and the Control UI controller guard.
Size and gaps

Production code: +208/−133 lines, which includes the new 120-line adapter. Tests: +195/−171. Removed: the configured-model suggestion helper and its test, the thinking suggestion list, and the custom-model and reasoning-field strings and styles. Not run locally: full lint, the full UI e2e suite and WebKit; CI covers them. Not captured: the chat composer at phone width, whose pickers live in a separate mobile surface.

Current revision: models follow the automation agent

The sidebar remains on Clawd while the automation targets Writer. The controls show Writer's default model and reasoning, then open the same menu below the schedule tray. Synthetic Gateway in Chromium at 1280 × 900, exact published head 3c921b9dcae.

Writer selected for this automation with GPT-5.5 and Medium in its schedule tray

Model menu opens below the tray and marks GPT-5.5 as the automation agent default

The combined preview passed 221 focused tests and 12 Chromium scenarios. Separate real-Gateway checks passed for model search during a catalog refresh, preserving edits across catalog failure and recovery, and saving and running an automation for its owner. The paired combined build kept Chat's request count and cut its compressed JavaScript by 216 bytes; only raw CSS was above the paired limit.

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

roboclaw-bot and others added 3 commits November 18, 2026 13:05
…ckers

The automation editor's tray now renders the session composer's model and
reasoning controls, fed by the automation form instead of a session. Model
choices show catalog names and provider icons; reasoning offers the levels
the selected model supports and falls back to Default when a new model
drops the chosen level. Default stays the empty payload value, and saved
models or levels the catalog does not list are kept on save.

Removes the free-text reasoning field and its suggestion list, the custom
model entry, and the configured-model suggestion helper they used.

Co-authored-by: vyctorbrzezowski <[email protected]>
The tray's model trigger kept the provider's brand color and Chat's smaller
chevrons. Chat neutralizes its provider mark only inside its own composer
(New Session keeps brand color on purpose), so the tray now gives the mark
its label's color and sizes, strokes and tones the chevrons like the
schedule selects beside them.

Co-authored-by: vyctorbrzezowski <[email protected]>
…poser's pickers

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: b4b5d708-d315-491d-b56a-790b45cc9fe6
@clawsweeper

clawsweeper Bot commented Nov 18, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces automation model and reasoning inputs with the chat composer's shared pickers.

Example: Create an automation using anthropic/claude-opus-4.5 with reasoning off.

  • Before: Choose a raw model reference and type the reasoning level.
  • After: Choose Claude Opus 4.5 by name and select Off in the Effort picker.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful direction with inspected visual proof, but the Settings regression and diff-caused validation failures block readiness.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected production-browser before/after screenshots show the automation tray using the shared named-model picker with search and provider navigation against a mocked Gateway; the body also links Effort screenshots and reports model-switch, reasoning-reset, and save verification, although additional image retrieval was unavailable during review.
Patch quality 🦪 silver shellfish (2/6) 4 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Automation authors must recognize raw model references and know valid reasoning words instead of using the familiar chat controls.
Reason: The maintainer-directed change provides recognizable model names and supported reasoning choices through existing components, with its narrower custom-entry behavior explicitly recorded.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open for focused repair: this useful, maintainer-directed improvement introduces a Settings label regression and fails concrete repository gates.

Priority: P3
Reviewed head: ef03b3aae6a97d7a19fc076840981d91b73e495e

Before merge

  • Restore the custom-model label still consumed by Memory Core (P2) - Deleting cron.form.customModel also changes the Dreaming model picker in Settings: extensions/memory-core/control-ui.settings-presentation.json:69 still uses it as customLabelKey, so English users see cron.form.customModel instead of “Custom model…”. The exact-head curated-settings.test.tsx failure confirms this. Retain the key until its remaining consumer is migrated.
  • Keep the model-source type out of the component dependency cycle (P2) - This import adds the cycle view-props.ts → view-model-controls.tsx → view-types.ts → view-props.ts. The repository's Madge checker intentionally includes type-only imports, so this fails the architecture gate despite runtime import erasure. Define the model-source shape in the existing props owner and let the component consume Pick&lt;CronProps, ... | "models"> instead of importing its type back into the props builder.
  • Account for the new intentional lint suppression (P2) - The new solid/reactivity disable is absent from the explicit production-suppression inventory, causing test/scripts/lint-suppressions.test.ts to fail on this head. Express the lifetime-stable placement snapshot using the supported Solid pattern, or record this narrowly justified exception in the existing inventory; retain the guard.
  • Keep the added picker assets within the paired build budgets (P2) - The paired control-ui-performance job measures total CSS raw growth from 1,749,495 to 1,749,716 bytes, exceeding the 64-byte allowance for a surface already above its ceiling; Chat boot and largest-JS growth also fail. These are comparative failures, beyond the inherited absolute overage accepted for the earlier redesign. Reduce the added stylesheet/shared-picker bytes within the existing boundaries rather than treating this check as inherited or raising its ceilings.

Findings

  • [P2] Restore the custom-model label still consumed by Memory Core — ui/src/i18n/locales/en-cron.ts:313-314
  • [P2] Keep the model-source type out of the component dependency cycle — ui/src/pages/cron/view-props.ts:14
  • [P2] Account for the new intentional lint suppression — ui/src/pages/chat/components/chat-model-picker.tsx:125-126
Agent review details

How this fits together

The Control UI automation editor projects the model catalog into shared chat controls, writes selections into its existing form, and submits the unchanged cron payload contract.

flowchart LR
  A[Agent model catalog] --> B[Automation form adapter]
  B --> C[Shared model and effort pickers]
  C --> D[Automation form]
  D --> E[Existing cron payload builder]
  E --> F[Gateway cron methods]
Loading

Technical review

Best possible solution:

Keep the shared-picker adapter and unchanged cron payload owner, while restoring the shared label, breaking the type cycle, and resolving the suppression and asset-budget failures.

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

This is a UI improvement request; current-main source and before screenshots establish the existing raw-reference and free-text controls, while exact-head CI independently demonstrates the reported review defects.

Is this the best way to solve the issue?

Reusing the chat controls and New Session draft helpers is the appropriate ownership boundary, with focused repairs needed before the implementation is ready.

Full review comments:

  • [P2] Restore the custom-model label still consumed by Memory Core — ui/src/i18n/locales/en-cron.ts:313-314
    Deleting cron.form.customModel also changes the Dreaming model picker in Settings: extensions/memory-core/control-ui.settings-presentation.json:69 still uses it as customLabelKey, so English users see cron.form.customModel instead of “Custom model…”. The exact-head curated-settings.test.tsx failure confirms this. Retain the key until its remaining consumer is migrated.
    Confidence: 1
  • [P2] Keep the model-source type out of the component dependency cycle — ui/src/pages/cron/view-props.ts:14
    This import adds the cycle view-props.ts → view-model-controls.tsx → view-types.ts → view-props.ts. The repository's Madge checker intentionally includes type-only imports, so this fails the architecture gate despite runtime import erasure. Define the model-source shape in the existing props owner and let the component consume Pick&lt;CronProps, ... | "models"> instead of importing its type back into the props builder.
    Confidence: 0.99
  • [P2] Account for the new intentional lint suppression — ui/src/pages/chat/components/chat-model-picker.tsx:125-126
    The new solid/reactivity disable is absent from the explicit production-suppression inventory, causing test/scripts/lint-suppressions.test.ts to fail on this head. Express the lifetime-stable placement snapshot using the supported Solid pattern, or record this narrowly justified exception in the existing inventory; retain the guard.
    Confidence: 1
  • [P2] Keep the added picker assets within the paired build budgets — ui/src/styles/cron.css:391-397
    The paired control-ui-performance job measures total CSS raw growth from 1,749,495 to 1,749,716 bytes, exceeding the 64-byte allowance for a surface already above its ceiling; Chat boot and largest-JS growth also fail. These are comparative failures, beyond the inherited absolute overage accepted for the earlier redesign. Reduce the added stylesheet/shared-picker bytes within the existing boundaries rather than treating this check as inherited or raising its ceilings.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4f08bdfc2118.

Provenance checked

  • Automation model inputs and configured suggestions changes intended behavior with a stated reason (fix(ui): keep automation model provider choices distinct #164574: Preserve provider-qualified selection, configured suggestions, aliases, custom inputs, and saved overrides; the current proposal intentionally replaces custom entry while retaining stored values.)
  • Automation prompt tray keeps the original intent (dce9dd1: Place model and reasoning controls beside the schedule beneath the prompt.)
  • Shared model-picker lifecycle keeps the original intent (1099118: Mount choices on first open and retain them afterward to avoid closed-picker catalog work.)
  • Catalog loading presentation keeps the original intent (2e2faf0: Keep model catalog reads in the background without loading indicators on the trigger.)
  • Cron chunk grouping keeps the original intent (4b709b8: Group Cron modules that load together while keeping route-exclusive work outside startup and Chat boot.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/pages/config/curated-settings.test.tsx src/pages/cron/cron-page.lifecycle.test.ts src/pages/cron/cron-page.ownership.test.ts
  • pnpm test test/scripts/lint-suppressions.test.ts --maxWorkers=1
  • pnpm check:madge-import-cycles
  • pnpm tsgo:ui
  • pnpm ui:i18n:verify

What I checked:

PR surface

Source +75, Tests +24. Total +99 across 26 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 16 208 133 +75
Tests 10 195 171 +24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 26 403 304 +99

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.

Review metrics

Metric Value Why it matters
Production versus test changes Production +208/−133; tests and support +195/−171 The production growth supplies the form adapter while removing the superseded suggestion path; test changes cover selection, retained values, and existing lifecycle contracts.

Labels

Label changes:

  • add P3: The requested capability improves automation-editor consistency and discoverability without addressing an urgent runtime outage.
  • add merge-risk: 🚨 compatibility: The PR deliberately removes the ability to enter an uncataloged model or arbitrary reasoning value; the maintainer-authored body accepts this tradeoff and preserves existing saved values.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: The requested capability improves automation-editor consistency and discoverability without addressing an urgent runtime outage.
  • merge-risk: 🚨 compatibility: The PR deliberately removes the ability to enter an uncataloged model or arbitrary reasoning value; the maintainer-authored body accepts this tradeoff and preserves existing saved values.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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.

Reviewed November 18, 2026, 8:44 AM ET / 13:44 UTC.

Use the existing catalog owner and keep delivery options available before an
agent is chosen. Preserve the shared chat overlay and avoid new startup work.

Co-authored-by: vyctorbrzezowski <[email protected]>
Pick up the already-landed correction to stale New Session branch
suggestion assertions without changing the reviewed model picker diff.

Co-authored-by: vyctorbrzezowski <[email protected]>
@vyctorbrzezowski
vyctorbrzezowski merged commit d334733 into main Nov 18, 2026
156 of 166 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/automations-model-reasoning-pickers branch November 18, 2026 14:51
steipete added a commit that referenced this pull request Nov 18, 2026
Remove the agent barrel re-export left unused by #201218. Sessions continue
using the watcher directly. Keep the OpenAI client-version floor private;
tests read the canonical bundled Codex package pin instead of a test-only
production export, while the existing contract still verifies equality.

Follow up #201130 by @obviyus and #201218 by @roboclaw-bot, with
@vyctorbrzezowski. Runtime model discovery and agent selection are unchanged.

Validation: all three Knip export scans report zero entries; 57 OpenAI and
version-contract tests, 36 UI unit/browser tests, the agent-switch roster
E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores
or baseline exceptions. Production LOC: -1.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…poser's pickers (openclaw#201218)

Reuse the chat composer's model and reasoning pickers in the automation editor, while preserving saved overrides.

Maintainer-approved asset exception: generated raw CSS size only. Two separate New Session mobile geometry failures reproduced identically on the exact CI base and candidate (composer height 214 to 176 px after agent readiness, and keyboard viewport bottom 876.140625 > 874). The intermittent Chat transcript shard passed its targeted rerun. All other checks and security review were verified on the reviewed head.
CI: https://github.com/openclaw/openclaw/actions/runs/44323299861

Co-authored-by: vyctorbrzezowski <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
Remove the agent barrel re-export left unused by openclaw#201218. Sessions continue
using the watcher directly. Keep the OpenAI client-version floor private;
tests read the canonical bundled Codex package pin instead of a test-only
production export, while the existing contract still verifies equality.

Follow up openclaw#201130 by @obviyus and openclaw#201218 by @roboclaw-bot, with
@vyctorbrzezowski. Runtime model discovery and agent selection are unchanged.

Validation: all three Knip export scans report zero entries; 57 OpenAI and
version-contract tests, 36 UI unit/browser tests, the agent-switch roster
E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores
or baseline exceptions. Production LOC: -1.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 19, 2026
Remove the agent barrel re-export left unused by #201218. Sessions continue
using the watcher directly. Keep the OpenAI client-version floor private;
tests read the canonical bundled Codex package pin instead of a test-only
production export, while the existing contract still verifies equality.

Follow up #201130 by @obviyus and #201218 by @roboclaw-bot, with
@vyctorbrzezowski. Runtime model discovery and agent selection are unchanged.

Validation: all three Knip export scans report zero entries; 57 OpenAI and
version-contract tests, 36 UI unit/browser tests, the agent-switch roster
E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores
or baseline exceptions. Production LOC: -1.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
(cherry picked from commit c9f03ee)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit c70c0ea043f8dd7913a3f8120854f4bff27506f0)
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants