Skip to content

refactor(cli): unify configured model rows onto the shared row pipeline - #115239

Merged
steipete merged 2 commits into
mainfrom
steipete/models-list-row-unification
Jul 28, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/models-list-row-unification

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Follow-up to #115190. appendConfiguredRows was a hand-rolled parallel copy of the model-list row pipeline: it reimplemented projection (projectListRowModel), the local filter, suppression, and the authAvailabilityAuthoritative decision that appendVisibleRow/buildRow already own — each with slightly different phrasing (buildRow: allowAuthAvailabilityOverride || openai || routeResolution !== null; configured path: Boolean(model && !discoveredKeys.has(key)) || …). Two expressions for one intended meaning is exactly the drift class that produced #115190's placeholder-metadata bug; this deletes the second path before it produces a different symptom.

It also fixes a residual inconsistency: configured rows evaluated auth via toModelAuthRef(model) with no route index, so route-managed (OpenAI-style) configured rows judged auth blind while the catalog rows built from the same snapshot two sources later judged it route-aware.

Why This Change Was Made

Commit 1 (refactor, behavior-neutral): configured entries resolve their model (registry → catalog → provider config), then route through the shared appendVisibleRow with a new explicit configuredEntry override for tags/aliases; the only unique behavior kept locally is emitting a missing: true row when a registry-resolved ref misses entirely. ~40 lines of duplicated decision logic deleted; one owner for row projection/suppression/availability.

Commit 2 (feat): appendConfiguredRows builds the logical route index from the shared catalog snapshot's routeVariants and threads it into auth evaluation and projection, so configured rows see the same observed routes as catalog rows.

User Impact

No visible change for typical configurations (live-verified: kimi/k3 text+image 1049k fallback#1 identical in both views before and after). Route-managed configured rows now get consistent availability verdicts between openclaw models list and --all.

Evidence

  • git diff --numstat vs main: prod file 40+/41− (net −1), +49 test lines.
  • New test: configured-row auth receives observedRoutes from the shared snapshot (list.rows.test.ts).
  • node scripts/run-vitest.mjs src/commands/models/list — 8 files, 73 tests green (includes fix(cli): resolve plugin-catalog metadata for configured models list rows #115190's regression test, proving the unification preserves catalog-backed fallback metadata, provider-config precedence, placeholder retention, and single snapshot load).
  • node scripts/run-vitest.mjs src/commands/models.list.e2e.test.ts — 20/21 locally (see e2e note below); hosted CI is the authoritative run for this lane.
  • tsgo core + test-src green; oxlint/oxfmt clean; git diff --check clean.
  • Live proof (isolated OPENCLAW_STATE_DIR, kimi plugin + auth): configured and --all views byte-identical for kimi rows pre/post refactor.
  • Codex autoreview (gpt-5.6-sol, branch vs origin/main): clean, "patch is correct (0.88)", no actionable findings.

Note on e2e: the full models.list.e2e.test.ts run went 20/21 locally with one 120s timeout ("models list runs model discovery without auth.json sync") under heavy multi-worktree lock contention; a rerun stalled outright behind the same contention and was terminated. The same file was 21/21 green on this machine earlier today (post-#115190). Hosted CI on this PR's head is the authoritative proof for that lane.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 14:22
@steipete
steipete merged commit a41c469 into main Jul 28, 2026
182 of 188 checks passed
@steipete
steipete deleted the steipete/models-list-row-unification branch July 28, 2026 14:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
* origin/main:
  fix: preserve skill proposals across apply crashes and workspace moves (#114535)
  fix(qa): run maturity Docker scenarios through the aggregate scheduler (#114447)
  refactor(cli): unify configured model rows onto the shared row pipeline (#115239)
  fix(ui): stop modal autofocus steal after the open animation (#115168)
  fix(process): preserve long supervisor timeout deadlines (#115230)
  fix(slack): preserve pasted inbound tables (#115163)
  fix(codex): restore trajectory capture for canonical session targets (#115220)
  refactor(qa): make scenario selection taxonomy-owned (#114055)
  feat(plugins): match shared models across vendor-namespaced catalog ids (#115210)
vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* origin/main: (150 commits)
  fix: preserve skill proposals across apply crashes and workspace moves (openclaw#114535)
  fix(qa): run maturity Docker scenarios through the aggregate scheduler (openclaw#114447)
  refactor(cli): unify configured model rows onto the shared row pipeline (openclaw#115239)
  fix(ui): stop modal autofocus steal after the open animation (openclaw#115168)
  fix(process): preserve long supervisor timeout deadlines (openclaw#115230)
  fix(slack): preserve pasted inbound tables (openclaw#115163)
  fix(codex): restore trajectory capture for canonical session targets (openclaw#115220)
  refactor(qa): make scenario selection taxonomy-owned (openclaw#114055)
  feat(plugins): match shared models across vendor-namespaced catalog ids (openclaw#115210)
  fix(ios): forgetting a paired gateway does nothing (openclaw#114083)
  test(ui): share pauseVirtualClock e2e helper and de-flake marquee hover-delay asserts (openclaw#115203)
  fix(docs): preserve pure fenced translation chunks (openclaw#115204)
  fix: keep shared web and TUI chats synchronized under load (openclaw#115191)
  fix(auto-reply): require a directed turn for the no-visible-reply fallback
  fix(auto-reply): attest source-routed message-tool sends via the dedupe route matcher
  fix(auto-reply): attest message-tool source replies in every delivery mode and gate eligibility on resolved settlement
  fix(auto-reply): bound turn-ledger settlement and treat started sends as conservatively visible
  fix(auto-reply): abort-aware fallback settlement and straggler drain in turn ledger
  fix(auto-reply): keep turn-ledger types module-local
  test(auto-reply): fix type-check errors in turn-ledger corner tests
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…ne (openclaw#115239)

* refactor(cli): unify configured model rows onto the shared row pipeline

* feat(cli): evaluate configured model rows with route-aware auth
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
* origin/main:
  fix: preserve skill proposals across apply crashes and workspace moves (openclaw#114535)
  fix(qa): run maturity Docker scenarios through the aggregate scheduler (openclaw#114447)
  refactor(cli): unify configured model rows onto the shared row pipeline (openclaw#115239)
  fix(ui): stop modal autofocus steal after the open animation (openclaw#115168)
  fix(process): preserve long supervisor timeout deadlines (openclaw#115230)
  fix(slack): preserve pasted inbound tables (openclaw#115163)
  fix(codex): restore trajectory capture for canonical session targets (openclaw#115220)
  refactor(qa): make scenario selection taxonomy-owned (openclaw#114055)
  feat(plugins): match shared models across vendor-namespaced catalog ids (openclaw#115210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant