Skip to content

feat(ui): show agent runtime distinction in model picker rows - #120617

Merged
steipete merged 2 commits into
mainfrom
steipete/model-picker-runtime-meta
Aug 8, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/model-picker-runtime-meta

Conversation

@steipete

@steipete steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

An operator can configure the same logical model under two different agent runtimes — e.g. openai/gpt-5.6 pinned to the OpenClaw runtime and openai/gpt-5.6-sol pinned to the native Codex runtime. The model picker then shows two visually identical rows ("GPT-5.6 1M" / "GPT-5.6 Sol 1M") with nothing explaining why both exist, which reads as a configuration bug even when the setup is intentional.

Why This Change Was Made

The gateway already records the fact: models.list returns agentRuntime: {id, source} per entry (src/gateway/server-methods/models-list-result.ts), and the UI catalog type declares the field — the picker just dropped it. Per the "record facts where they happen; read them where they are needed" doctrine, the fix is to render the existing fact, not to infer anything client-side: rows whose catalog entry carries an explicit runtime now append it to the meta line ("1M · OpenClaw" / "1M · Codex"), after the existing context/chat-only meta so no current strings shift. Runtime ids map through a tiny label table (codex → Codex, openclaw → OpenClaw) with a capitalize fallback; entries without an explicit runtime (auto resolution) show nothing, unchanged.

The e2e mock-gateway helper's inline models type was replaced with the real ModelCatalogEntry type so fixtures can carry agentRuntime (net −8 lines).

User Impact

Duplicate-looking rows from multi-runtime configurations are now self-explanatory in the picker. No behavior changes — selection, search, shortcuts, and all existing meta stay as they are.

Evidence

Screenshot in first comment: the two rows rendering "1M · OpenClaw" vs "1M · Codex" via the mock-gateway harness.

  • chat-view.test.ts — 230 passed, incl. new regression asserting per-row runtime meta
  • chat-only-model.e2e.test.ts — passes (meta join order preserved; runtime appends last)
  • Autoreview (Codex gpt-5.6-sol, high): clean, no actionable findings
  • LOC: production +19, tests/helpers +36/−8

@steipete
steipete marked this pull request as ready for review August 8, 2026 15:33
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Runtime-labeled rows via the mock-gateway harness — the operator's real clawstudio configuration shape (bare gpt-5.6 on OpenClaw runtime, gpt-5.6-sol on Codex runtime):

runtime rows

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 8, 2026, 11:40 AM ET / 15:40 UTC.

ClawSweeper review

What this changes

The PR forwards each model’s existing agent-runtime ID into the Control UI picker and appends a human-readable runtime label to the row metadata.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the picker’s new runtime-label map omits known current runtime IDs, so Claude and Gemini CLI rows would display malformed labels. This maintainer-owned PR needs that narrow UI repair before merge.

Priority: P2
Reviewed head: 9ed41a11e002a6ffc9c4374ee4b8dc21dbd7dd59

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visible behavior proof is strong, but the otherwise narrow implementation misses known runtime labels.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.
Evidence reviewed 5 items Gateway contract: The current Gateway exposes the resolved runtime only when it is explicit and attaches it to each model-list entry; the UI is correctly consuming a recorded fact rather than inferring one.
Known runtime IDs: Current Gateway coverage includes agentRuntime id claude-cli, while the existing operator label surface names it Claude CLI and also defines Gemini CLI.
Patch gap: The new map recognizes only codex and openclaw; its generic capitalization fallback renders claude-cli as Claude-cli and google-gemini-cli as Google-gemini-cli.
Findings 1 actionable finding [P2] Label all known current runtime IDs
Security None None.

How this fits together

The Gateway returns each configured model’s resolved agent-runtime metadata to the Control UI. Chat model controls match a selected model to that catalog entry, and the picker renders its metadata for the operator before selection.

flowchart LR
  A[Configured model runtimes] --> B[Gateway model catalog]
  B --> C[Control UI catalog state]
  C --> D[Chat model controls]
  D --> E[Picker row metadata]
  E --> F[Operator model selection]
Loading

Before merge

  • Label all known current runtime IDs (P2) - claude-cli is a current models.list runtime ID and is labeled “Claude CLI” elsewhere, but this new map falls back to “Claude-cli”; google-gemini-cli similarly becomes “Google-gemini-cli”. Add those known labels and a row-level regression test while retaining the generic fallback for unknown plugin runtimes.
  • Resolve merge risk (P2) - Merging as written makes valid Claude CLI and Gemini CLI runtime rows less comprehensible through malformed fallback labels, recreating the picker ambiguity this PR is intended to remove.

Findings

  • [P2] Label all known current runtime IDs — ui/src/pages/chat/components/chat-model-picker.ts:30-40
Agent review details

Security

None.

PR surface

Source +13, Tests +34. Total +47 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 21 8 +13
Tests 1 34 0 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 55 8 +47

Review metrics

Metric Value Why it matters
Production vs test/helper LOC production +19, tests +34/-6 helper The production growth is justified by the new operator-visible metadata path, but the label table needs complete known-runtime coverage.

Merge-risk options

Maintainer options:

  1. Complete known-runtime labels (recommended)
    Add the two current CLI runtime labels and regression coverage before merging so all known runtime rows remain operator-readable.

Technical review

Best possible solution:

Extend the picker-local known-runtime label map for claude-cli and google-gemini-cli, retain the generic fallback for unknown plugin runtimes, and add focused row assertions.

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

Yes, source-reproducible: the Gateway’s current test emits claude-cli and the new picker fallback deterministically turns it into “Claude-cli.”.

Is this the best way to solve the issue?

No. Rendering the recorded runtime fact at the picker is the right boundary, but the local label map must cover the known current CLI runtime IDs before it is the best solution.

Full review comments:

  • [P2] Label all known current runtime IDs — ui/src/pages/chat/components/chat-model-picker.ts:30-40
    claude-cli is a current models.list runtime ID and is labeled “Claude CLI” elsewhere, but this new map falls back to “Claude-cli”; google-gemini-cli similarly becomes “Google-gemini-cli”. Add those known labels and a row-level regression test while retaining the generic fallback for unknown plugin runtimes.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7ecdef6e2ed4.

Labels

Label changes:

  • add P2: The PR introduces a limited-blast-radius but user-visible metadata regression for valid configured runtimes.
  • add merge-risk: 🚨 other: The new display mapping can make supported runtime choices misleading despite leaving model selection behavior unchanged.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.

Label justifications:

  • P2: The PR introduces a limited-blast-radius but user-visible metadata regression for valid configured runtimes.
  • merge-risk: 🚨 other: The new display mapping can make supported runtime choices misleading despite leaving model selection behavior unchanged.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer PR is exempt from the external-contributor proof gate; its supplied mock-gateway screenshot nevertheless directly demonstrates the intended visible row distinction.

Evidence

What I checked:

Likely related people:

  • steipete: Introduced the current picker split in current-main history and authored the reviewed picker change. (role: recent model-picker contributor; confidence: high; commits: 205753eef707, 9ed41a11e002; files: ui/src/pages/chat/components/chat-model-picker.ts, ui/src/pages/chat/components/chat-model-controls.ts)
  • Alix-007: Current runtime-label and Gateway CLI-route coverage trace to adjacent runtime-label work. (role: adjacent runtime-label contributor; confidence: medium; commits: 50ec5570ae89; files: src/status/agent-runtime-label.ts, src/gateway/server-methods/models.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add Claude CLI and Gemini CLI to the local picker label map.
  • Extend the existing picker-row test to cover those labels.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 74b1627 into main Aug 8, 2026
97 checks passed
@steipete
steipete deleted the steipete/model-picker-runtime-meta branch August 8, 2026 16:36
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
…aw#120617)

* feat(ui): show agent runtime distinction in model picker rows

* fix(ui): label known CLI runtime ids in model picker rows
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 maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. 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. size: S 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.

1 participant