Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(control-ui): unify model catalog and discovery
Miguelon Peluchon79b31d42e72f
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex 0b9b6252e..3f1962a85 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -8777,7 +8777,8 @@ textarea.cu-input {.cu-app-layout .cu-main:has(> .cu-card--viewport-fill),.cu-app-layout .cu-main:has(> .cu-registry-layout),-.cu-app-layout .cu-main:has(> .cu-cost-layout) {+.cu-app-layout .cu-main:has(> .cu-cost-layout),+.cu-app-layout .cu-main:has(> .cu-llm-models-layout) {padding-bottom: 0;}@@ -8790,7 +8791,8 @@ textarea.cu-input {}.cu-app-layout .cu-main:has(> .cu-registry-layout),-.cu-app-layout .cu-main:has(> .cu-cost-layout) {+.cu-app-layout .cu-main:has(> .cu-cost-layout),+.cu-app-layout .cu-main:has(> .cu-llm-models-layout) {display: flex;flex-direction: column;height: 100vh;@@ -8804,7 +8806,8 @@ textarea.cu-input {}.cu-app-layout .cu-main > .cu-registry-layout,-.cu-app-layout .cu-main > .cu-cost-layout {+.cu-app-layout .cu-main > .cu-cost-layout,+.cu-app-layout .cu-main > .cu-llm-models-layout {flex: 1;min-height: 0;}@@ -9170,6 +9173,58 @@ textarea.cu-input {table-layout: fixed;}+.cu-llm-models-layout {+ display: flex;+ min-width: 0;+ flex-direction: column;+ gap: var(--cu-space-3);+ overflow-y: auto;+ padding: var(--cu-space-3) var(--cu-space-3) var(--cu-space-3) 0;+}++.cu-llm-models-layout > .cu-section-card {+ flex: 0 0 auto;+ margin-bottom: 0;+}++.cu-llm-models-lifecycle {+ display: flex;+ flex: 0 0 auto;+ align-items: center;+ flex-wrap: wrap;+ gap: var(--cu-space-3);+ padding: var(--cu-space-3) var(--cu-space-4);+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius);+ background: var(--cu-bg-elevated);+ color: var(--cu-text-soft);+ font-size: 0.8125rem;+}++.cu-llm-models-lifecycle > strong {+ color: var(--cu-text);+}++.cu-llm-models-lifecycle__item {+ display: inline-flex;+ align-items: center;+ gap: var(--cu-space-2);+}++.cu-llm-review-table,+.cu-llm-stale-table {+ min-width: 48rem;+ table-layout: fixed;+}++.cu-llm-review-table .cu-llm-model-row > td:first-child {+ padding-left: 0.85rem;+}++.cu-llm-models-error {+ flex: 0 0 auto;+}+.cu-agent-select.cu-llm-provider-filter {width: 12rem;flex: 0 0 12rem;@@ -9401,11 +9456,22 @@ textarea.cu-input {/* Discovery: persistent "last synced" line under the panel header. */.cu-discovery-status {flex: 0 0 auto;+ display: flex;+ align-items: center;+ flex-wrap: wrap;+ gap: var(--cu-space-2);padding: var(--cu-space-3) 1rem 0;font-size: 0.8125rem;color: var(--cu-text-muted);}+.cu-discovery-status__facts {+ display: inline-flex;+ align-items: center;+ flex-wrap: wrap;+ gap: var(--cu-space-2);+}+/* Discovery: bulk-enable toolbar shown when review rows are selected. */.cu-discovery-bulkbar {flex: 0 0 auto;diff --git a/control-ui/app/llm-models/discovery/page.tsx b/control-ui/app/llm-models/discovery/page.tsxindex 2bfa891a8..78b1e8fb6 100644--- a/control-ui/app/llm-models/discovery/page.tsx+++ b/control-ui/app/llm-models/discovery/page.tsx@@ -1,13 +1,6 @@-import { AuthGate } from '@components/AuthGate'-import { DashboardLayout } from '@components/DashboardLayout'-import { LlmDiscoveryPanel } from '@components/LlmDiscoveryPanel'+import { redirect } from 'next/navigation'+import { CONTROL_ROUTES } from '@constants/routes'export default function LlmModelsDiscoveryPage() {- return (- <AuthGate>- <DashboardLayout>- <LlmDiscoveryPanel />- </DashboardLayout>- </AuthGate>- )+ redirect(CONTROL_ROUTES.llmModels.root)}diff --git a/control-ui/app/llm-models/page.tsx b/control-ui/app/llm-models/page.tsxindex a85d5a24d..78b2f8230 100644--- a/control-ui/app/llm-models/page.tsx+++ b/control-ui/app/llm-models/page.tsx@@ -6,6 +6,7 @@ import { useAuth } from '@components/AuthContext'import { AuthGate } from '@components/AuthGate'import { useConfirmDialog } from '@components/ConfirmDialog'import { DashboardLayout } from '@components/DashboardLayout'+import { LlmDiscoveryPanel } from '@components/LlmDiscoveryPanel'import { LlmModelTable } from '@components/LlmModelTable'import { useToast } from '@components/Toast'import { CONTROL_ROUTES } from '@constants/routes'@@ -103,12 +104,27 @@ function LlmModelsContent() {}, [authState.isLoggedIn, authState.isLoading])return (- <>+ <div className="cu-llm-models-layout">{error ? (<div className="cu-banner cu-banner--error" role="alert">{error}</div>) : null}+ <section className="cu-llm-models-lifecycle" aria-label="Model lifecycle">+ <strong>One inventory, explicit provenance and lifecycle</strong>+ <span className="cu-llm-models-lifecycle__item">+ <span className="cu-px-badge cu-px-badge--off">Manual</span>+ Added and maintained by an operator+ </span>+ <span className="cu-llm-models-lifecycle__item">+ <span className="cu-px-badge cu-px-badge--info">Discovered</span>+ Synced into review and disabled by default+ </span>+ <span className="cu-llm-models-lifecycle__item">+ <span className="cu-px-badge cu-px-badge--warn">Stale</span>+ Missing from the latest live catalog, never auto-removed+ </span>+ </section><LlmModelTableitems={models}unpricedKeys={unpricedKeys}@@ -120,8 +136,13 @@ function LlmModelsContent() {refreshing={loading}loading={loading && models.length === 0}/>+ <LlmDiscoveryPanel+ items={models}+ loading={loading && models.length === 0}+ onRefresh={loadAll}+ />{confirmDialog}- </>+ </div>)}diff --git a/control-ui/components/LlmDiscoveryPanel/index.tsx b/control-ui/components/LlmDiscoveryPanel/index.tsxindex 527732f16..e4ff4e83a 100644--- a/control-ui/components/LlmDiscoveryPanel/index.tsx+++ b/control-ui/components/LlmDiscoveryPanel/index.tsx@@ -1,35 +1,32 @@'use client'import React, { useEffect, useMemo, useState } from 'react'-import { useAuth } from '@components/AuthContext'import { useConfirmDialog } from '@components/ConfirmDialog'+import { LlmProviderIcon } from '@components/LlmProviderIcon'import { IconModels } from '@components/Sidebar/icons'import { SkeletonTableRows } from '@components/SkeletonTableRows'import { TableHeaderRow } from '@components/TableHeaderRow'import type { TableHeaderColumn } from '@components/TableHeaderRow/types'import { TablePanelHeader } from '@components/TablePanelHeader'import { useToast } from '@components/Toast'-import { IconRefresh, IconTrash } from '@components/icons'+import { IconChevronRight, IconRefresh, IconTrash } from '@components/icons'import {type LlmAllowedModel,type LlmDiscoveryStatus,deleteLlmModel,getDiscoveryStatus,- getLlmModels,isLlmModelConfigMapDeferred,isSilentApiError,syncDiscovery,updateLlmModel,} from '@lib/api'import { formatContextWindow, getProviderDisplayLabel } from '@lib/llm'+import type { LlmDiscoveryPanelProps } from './types'-// Surfaced when a mutation persisted but the runtime ConfigMap write is delayed-// (503 configmap_write_failed): the change is saved, only propagation lags.const CONFIGMAP_DEFERRED_WARNING ='Propagation to the cluster is delayed and will reconcile shortly.'const REVIEW_COLUMNS: TableHeaderColumn[] = [- { key: 'provider', label: 'Provider', width: '12%' },{ key: 'model', label: 'Model', minWidth: '12rem' },{ key: 'vendor', label: 'Vendor', width: '10rem' },{ key: 'contextWindow', label: 'Context window', align: 'right', width: '9rem' },@@ -37,14 +34,25 @@ const REVIEW_COLUMNS: TableHeaderColumn[] = []const STALE_COLUMNS: TableHeaderColumn[] = [- { key: 'provider', label: 'Provider', width: '12%' },{ key: 'model', label: 'Model', minWidth: '12rem' },{ key: 'vendor', label: 'Vendor', width: '10rem' },{ key: 'contextWindow', label: 'Context window', align: 'right', width: '9rem' },- { key: 'status', label: 'Status', width: '9rem' },+ { key: 'status', label: 'Runtime status', width: '9rem' },{ key: 'actions', width: '11rem', align: 'right', ariaLabel: 'Actions' },]+type ProviderModelGroup = [provider: string, models: LlmAllowedModel[]]++type ProviderGroupRowProps = {+ actionLabel: string+ colSpan: number+ expanded: boolean+ models: LlmAllowedModel[]+ onToggle: () => void+ provider: string+ summary: string+}+function modelLabel(model: LlmAllowedModel): string {return `${getProviderDisplayLabel(model.provider)}/${model.model}`}@@ -55,79 +63,124 @@ function formatRunAt(value: string | null | undefined): string {return Number.isNaN(date.getTime()) ? value : date.toLocaleString()}-// The operator's review surface for catalog discovery (spec 09 §7, F2).-// Discovery seeds `llm_allowed_models` with `source='discovery', enabled=false`;-// this panel lets the operator sync a fresh catalog, then enable models out of-// the review queue and triage models that vanished from the catalog (stale).-export function LlmDiscoveryPanel() {- const { authState } = useAuth()+function groupByProvider(models: LlmAllowedModel[]): ProviderModelGroup[] {+ const groups = new Map<string, LlmAllowedModel[]>()+ for (const model of models) {+ const group = groups.get(model.provider)+ if (group) group.push(model)+ else groups.set(model.provider, [model])+ }+ return Array.from(groups.entries()).sort(([left], [right]) =>+ getProviderDisplayLabel(left).localeCompare(getProviderDisplayLabel(right))+ )+}++function ProviderGroupRow({+ actionLabel,+ colSpan,+ expanded,+ models,+ onToggle,+ provider,+ summary,+}: ProviderGroupRowProps) {+ const providerLabel = getProviderDisplayLabel(provider)+ return (+ <tr className="cu-llm-model-group__row">+ <td colSpan={colSpan}>+ <button+ type="button"+ className="cu-llm-model-group__toggle"+ onClick={onToggle}+ aria-expanded={expanded}+ aria-label={`${expanded ? 'Collapse' : 'Expand'} ${providerLabel} ${actionLabel}`}+ >+ <span className="cu-llm-model-group__chevron" aria-hidden="true">+ <IconChevronRight+ className={expanded ? 'is-expanded' : undefined}+ width={18}+ height={18}+ />+ </span>+ <LlmProviderIcon provider={provider} label={providerLabel} />+ <span className="cu-llm-model-group__provider">{providerLabel}</span>+ <span className="cu-llm-model-group__count">+ {models.length} model{models.length === 1 ? '' : 's'}+ </span>+ <span className="cu-llm-model-group__summary">{summary}</span>+ <span className="cu-llm-model-group__action" aria-hidden="true">+ {expanded ? 'Hide models' : 'Show models'}+ </span>+ </button>+ </td>+ </tr>+ )+}++// Discovery and Catalog are two workflows over the same llm_allowed_models+// records. The parent owns that shared inventory; this panel owns only sync,+// review selection, and stale-model actions.+export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPanelProps) {const { showToast } = useToast()const { confirm, confirmDialog } = useConfirmDialog()- const [models, setModels] = useState<LlmAllowedModel[]>([])const [status, setStatus] = useState<LlmDiscoveryStatus | null>(null)- const [loading, setLoading] = useState(false)+ const [statusLoading, setStatusLoading] = useState(false)const [error, setError] = useState('')const [syncing, setSyncing] = useState(false)const [pendingId, setPendingId] = useState<string | null>(null)const [bulkEnabling, setBulkEnabling] = useState(false)const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())+ const [expandedReviewProviders, setExpandedReviewProviders] = useState<Set<string>>(new Set())+ const [expandedStaleProviders, setExpandedStaleProviders] = useState<Set<string>>(new Set())- const isInitialLoad = loading && models.length === 0-- // Newly discovered rows awaiting enablement. Stale rows are excluded here and- // handled in their own list — enabling a model that vanished from the catalog- // is not the "review a fresh catalog" action, and excluding them keeps a row- // from appearing in both tables.+ const isInitialLoad = loading && items.length === 0const reviewQueue = useMemo(- () => models.filter(m => m.source === 'discovery' && !m.enabled && !m.stale),- [models]+ () => items.filter(model => model.source === 'discovery' && !model.enabled && !model.stale),+ [items])const staleModels = useMemo(- () => models.filter(m => m.source === 'discovery' && m.stale),- [models]+ () => items.filter(model => model.source === 'discovery' && model.stale),+ [items])+ const reviewGroups = useMemo(() => groupByProvider(reviewQueue), [reviewQueue])+ const staleGroups = useMemo(() => groupByProvider(staleModels), [staleModels])const selectedCount = useMemo(- () => reviewQueue.reduce((count, m) => (selectedIds.has(m.id) ? count + 1 : count), 0),+ () => reviewQueue.reduce((count, model) => (selectedIds.has(model.id) ? count + 1 : count), 0),[reviewQueue, selectedIds])const allSelected = reviewQueue.length > 0 && selectedCount === reviewQueue.length- async function loadAll() {- setLoading(true)- setError('')- try {- // Status is optional (endpoint may not be deployed) — a failure there must- // not hide the review queue.- const [modelsResult, statusResult] = await Promise.allSettled([- getLlmModels(),- getDiscoveryStatus(),- ])- if (modelsResult.status === 'fulfilled') {- setModels(modelsResult.value.rows ?? [])- } else if (!isSilentApiError(modelsResult.reason)) {- throw modelsResult.reason- }- setStatus(statusResult.status === 'fulfilled' ? statusResult.value : null)- } catch (e) {- if (isSilentApiError(e)) return- setError(e instanceof Error ? e.message : 'Failed to load discovered models')- } finally {- setLoading(false)+ useEffect(() => {+ let active = true+ setStatusLoading(true)+ void getDiscoveryStatus()+ .then(nextStatus => {+ if (active) setStatus(nextStatus)+ })+ .catch(() => {+ // Status is optional while older control-api builds roll forward.+ })+ .finally(() => {+ if (active) setStatusLoading(false)+ })+ return () => {+ active = false}- }+ }, [])useEffect(() => {- if (authState.isLoggedIn && !authState.isLoading) {- void loadAll()- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [authState.isLoggedIn, authState.isLoading])+ const currentIds = new Set(reviewQueue.map(model => model.id))+ setSelectedIds(previous => {+ const next = new Set(Array.from(previous).filter(id => currentIds.has(id)))+ return next.size === previous.size ? previous : next+ })+ }, [reviewQueue])function toggleRow(id: string) {- setSelectedIds(prev => {- const next = new Set(prev)+ setSelectedIds(previous => {+ const next = new Set(previous)if (next.has(id)) next.delete(id)else next.add(id)return next@@ -135,25 +188,43 @@ export function LlmDiscoveryPanel() {}function toggleAll() {- setSelectedIds(prev => {- if (reviewQueue.every(m => prev.has(m.id)) && reviewQueue.length > 0) {+ setSelectedIds(previous => {+ if (reviewQueue.length > 0 && reviewQueue.every(model => previous.has(model.id))) {return new Set()}- return new Set(reviewQueue.map(m => m.id))+ return new Set(reviewQueue.map(model => model.id))+ })+ }++ function toggleProvider(+ provider: string,+ setExpanded: React.Dispatch<React.SetStateAction<Set<string>>>+ ) {+ setExpanded(previous => {+ const next = new Set(previous)+ if (next.has(provider)) next.delete(provider)+ else next.add(provider)+ return next})}+ async function handleRefresh() {+ setStatusLoading(true)+ setError('')+ try {+ const [, statusResult] = await Promise.allSettled([onRefresh(), getDiscoveryStatus()])+ if (statusResult.status === 'fulfilled') setStatus(statusResult.value)+ } finally {+ setStatusLoading(false)+ }+ }+async function handleSync() {setSyncing(true)setError('')try {const result = await syncDiscovery()- await loadAll()- // Seed the "last synced" line from the sync result AFTER loadAll, so it- // reflects this run even when the optional status endpoint is absent- // (loadAll would leave `status` null on a 404). `result.ranAt` is the DB- // commit time — the SAME value the status endpoint reports — so the label- // is stable across a reload.+ await onRefresh()setStatus({ranAt: result.ranAt,source: result.source,@@ -165,9 +236,9 @@ export function LlmDiscoveryPanel() {`Synced from ${result.source}: +${result.added} new, ${result.updated} updated, ${result.staled} marked stale`,{ tone: 'success' })- } catch (e) {- if (isSilentApiError(e)) return- const message = e instanceof Error ? e.message : 'Discovery sync failed'+ } catch (caught) {+ if (isSilentApiError(caught)) return+ const message = caught instanceof Error ? caught.message : 'Discovery sync failed'setError(message)showToast(message, { tone: 'error' })} finally {@@ -181,16 +252,16 @@ export function LlmDiscoveryPanel() {setError('')try {await updateLlmModel(model.id, { enabled: true })- await loadAll()+ await onRefresh()showToast(`${label} enabled.`, { tone: 'success' })- } catch (e) {- if (isSilentApiError(e)) return- if (isLlmModelConfigMapDeferred(e)) {- await loadAll()+ } catch (caught) {+ if (isSilentApiError(caught)) return+ if (isLlmModelConfigMapDeferred(caught)) {+ await onRefresh()showToast(`${label} enabled. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })return}- const message = e instanceof Error ? e.message : `Failed to enable ${label}`+ const message = caught instanceof Error ? caught.message : `Failed to enable ${label}`setError(message)showToast(message, { tone: 'error' })} finally {@@ -199,28 +270,30 @@ export function LlmDiscoveryPanel() {}async function handleBulkEnable() {- const targets = reviewQueue.filter(m => selectedIds.has(m.id))+ const targets = reviewQueue.filter(model => selectedIds.has(model.id))if (targets.length === 0) return+setBulkEnabling(true)setError('')- // No batch route exists (lib/api.ts): enable is N independent PUTs.- // Promise.allSettled never rejects; the finally is defensive so the button- // never stays stuck if loadAll's contract ever changes.let results: PromiseSettledResult<unknown>[] = []try {- results = await Promise.allSettled(targets.map(m => updateLlmModel(m.id, { enabled: true })))+ results = await Promise.allSettled(+ targets.map(model => updateLlmModel(model.id, { enabled: true }))+ )setSelectedIds(new Set())- await loadAll()+ await onRefresh()} finally {setBulkEnabling(false)}- if (results.some(r => r.status === 'rejected' && isSilentApiError(r.reason))) return+ if (results.some(result => result.status === 'rejected' && isSilentApiError(result.reason))) {+ return+ }const deferred = results.some(- r => r.status === 'rejected' && isLlmModelConfigMapDeferred(r.reason)+ result => result.status === 'rejected' && isLlmModelConfigMapDeferred(result.reason))const hardFailures = results.filter(- r => r.status === 'rejected' && !isLlmModelConfigMapDeferred(r.reason)+ result => result.status === 'rejected' && !isLlmModelConfigMapDeferred(result.reason)).lengthconst succeeded = targets.length - hardFailuresif (hardFailures === 0) {@@ -230,11 +303,12 @@ export function LlmDiscoveryPanel() {}`,{ tone: deferred ? 'info' : 'success' })- } else {- const message = `Enabled ${succeeded} of ${targets.length} models; ${hardFailures} failed.`- setError(message)- showToast(message, { tone: 'error' })+ return}++ const message = `Enabled ${succeeded} of ${targets.length} models; ${hardFailures} failed.`+ setError(message)+ showToast(message, { tone: 'error' })}async function handleDisable(model: LlmAllowedModel) {@@ -243,16 +317,16 @@ export function LlmDiscoveryPanel() {setError('')try {await updateLlmModel(model.id, { enabled: false })- await loadAll()+ await onRefresh()showToast(`${label} disabled.`, { tone: 'success' })- } catch (e) {- if (isSilentApiError(e)) return- if (isLlmModelConfigMapDeferred(e)) {- await loadAll()+ } catch (caught) {+ if (isSilentApiError(caught)) return+ if (isLlmModelConfigMapDeferred(caught)) {+ await onRefresh()showToast(`${label} disabled. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })return}- const message = e instanceof Error ? e.message : `Failed to disable ${label}`+ const message = caught instanceof Error ? caught.message : `Failed to disable ${label}`setError(message)showToast(message, { tone: 'error' })} finally {@@ -264,25 +338,26 @@ export function LlmDiscoveryPanel() {const label = modelLabel(model)const shouldDelete = await confirm({title: 'Delete stale model',- message: `Remove ${label} from the catalog? It already vanished from the provider's catalog. Existing agents keep running, but it can no longer be selected.`,+ message: `Remove ${label} from the inventory? It already vanished from the provider catalog. Existing agents keep running, but it can no longer be selected.`,confirmLabel: 'Delete',tone: 'danger',})if (!shouldDelete) return+setPendingId(model.id)setError('')try {await deleteLlmModel(model.id)- await loadAll()- showToast(`${label} removed from the catalog.`, { tone: 'success' })- } catch (e) {- if (isSilentApiError(e)) return- if (isLlmModelConfigMapDeferred(e)) {- await loadAll()+ await onRefresh()+ showToast(`${label} removed from the inventory.`, { tone: 'success' })+ } catch (caught) {+ if (isSilentApiError(caught)) return+ if (isLlmModelConfigMapDeferred(caught)) {+ await onRefresh()showToast(`${label} removed. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })return}- const message = e instanceof Error ? e.message : `Failed to delete ${label}`+ const message = caught instanceof Error ? caught.message : `Failed to delete ${label}`setError(message)showToast(message, { tone: 'error' })} finally {@@ -290,8 +365,6 @@ export function LlmDiscoveryPanel() {}}- const lastSyncedLabel = status ? `${formatRunAt(status.ranAt)} (${status.source})` : null-const reviewColumns: TableHeaderColumn[] = [{key: 'select',@@ -300,12 +373,12 @@ export function LlmDiscoveryPanel() {<inputtype="checkbox"checked={allSelected}- ref={el => {- if (el) el.indeterminate = selectedCount > 0 && !allSelected+ ref={element => {+ if (element) element.indeterminate = selectedCount > 0 && !allSelected}}onChange={toggleAll}disabled={reviewQueue.length === 0 || bulkEnabling}- aria-label={allSelected ? 'Deselect all models' : 'Select all models'}+ aria-label={allSelected ? 'Deselect all review models' : 'Select all review models'}/>),},@@ -315,12 +388,12 @@ export function LlmDiscoveryPanel() {return (<>{error ? (- <div className="cu-banner cu-banner--error" role="alert" style={{ marginBottom: '1rem' }}>+ <div className="cu-banner cu-banner--error cu-llm-models-error" role="alert">{error}</div>) : null}- <div className="cu-card cu-card--viewport-fill" style={{ marginBottom: '1.25rem' }}>+ <div className="cu-card cu-section-card"><TablePanelHeadertitle={<>@@ -328,17 +401,21 @@ export function LlmDiscoveryPanel() {{isInitialLoad ? 'Discovery review' : `Discovery review (${reviewQueue.length})`}</>}- subtitle="Models pulled from the public catalog arrive disabled. Review and enable the ones you want available to agents and runtime."+ subtitle="Newly synced models land here disabled. Enabling one makes the same inventory row available to agents and runtime."actions={<><buttontype="button"className="cu-btn cu-btn--icon cu-btn--toolbar"- onClick={() => void loadAll()}- disabled={loading || isInitialLoad}- aria-label={loading ? 'Refreshing…' : 'Reload discovered models'}+ onClick={() => void handleRefresh()}+ disabled={loading || statusLoading || isInitialLoad}+ aria-label={loading || statusLoading ? 'Refreshing…' : 'Reload discovery review'}>- <IconRefresh className={loading ? 'cu-spin' : undefined} width={18} height={18} />+ <IconRefresh+ className={loading || statusLoading ? 'cu-spin' : undefined}+ width={18}+ height={18}+ /></button><buttontype="button"@@ -353,9 +430,25 @@ export function LlmDiscoveryPanel() {/><div className="cu-discovery-status" role="status">- {lastSyncedLabel- ? `Last synced ${lastSyncedLabel}`- : 'Not synced yet. Run a sync to pull the latest catalog.'}+ <span>+ {status+ ? `Last synced ${formatRunAt(status.ranAt)}`+ : 'Not synced yet. Run a sync to pull the latest catalog.'}+ </span>+ {status ? (+ <span className="cu-discovery-status__facts">+ <span+ className={`cu-px-badge ${+ status.source === 'live' ? 'cu-px-badge--info' : 'cu-px-badge--warn'+ }`}+ >+ {status.source === 'live' ? 'Live catalog' : 'Vendored fallback'}+ </span>+ <span>+{status.added} new</span>+ <span>{status.updated} refreshed</span>+ <span>{status.staled} stale</span>+ </span>+ ) : null}</div>{selectedCount > 0 ? (@@ -373,7 +466,7 @@ export function LlmDiscoveryPanel() {) : null}{isInitialLoad ? (- <div className="cu-table-wrap">+ <div className="cu-table-wrap cu-table-wrap--sticky-header"><table className="cu-table cu-table--header-band"><thead><TableHeaderRow columns={reviewColumns} />@@ -388,118 +481,167 @@ export function LlmDiscoveryPanel() {No models awaiting review. Sync the catalog to pull newly released models.</div>) : (- <div className="cu-table-wrap">- <table className="cu-table cu-table--header-band">+ <div className="cu-table-wrap cu-table-wrap--sticky-header">+ <table className="cu-table cu-table--header-band cu-llm-review-table"><thead><TableHeaderRow columns={reviewColumns} /></thead>- <tbody>- {reviewQueue.map(model => (- <tr key={model.id} className="cu-table__row">- <td>- <input- type="checkbox"- checked={selectedIds.has(model.id)}- onChange={() => toggleRow(model.id)}- disabled={bulkEnabling}- aria-label={`Select ${modelLabel(model)}`}- />- </td>- <td>{getProviderDisplayLabel(model.provider)}</td>- <td className="cu-px-model">{model.model}</td>- <td>{model.vendor || '—'}</td>- <td className="cu-px-num">- {formatContextWindow(model.context_window_tokens)}- </td>- <td className="cu-px-actions">- <button- type="button"- className="cu-btn cu-btn--primary cu-btn--sm"- onClick={() => void handleEnable(model)}- disabled={pendingId === model.id || bulkEnabling}- >- {pendingId === model.id ? 'Enabling…' : 'Enable'}- </button>- </td>- </tr>- ))}- </tbody>+ {reviewGroups.map(([provider, models]) => {+ const expanded = expandedReviewProviders.has(provider)+ return (+ <tbody key={provider} className="cu-llm-model-group">+ <ProviderGroupRow+ actionLabel="review models"+ colSpan={reviewColumns.length}+ expanded={expanded}+ models={models}+ onToggle={() => toggleProvider(provider, setExpandedReviewProviders)}+ provider={provider}+ summary="Awaiting operator enablement"+ />+ {expanded+ ? models.map(model => (+ <tr key={model.id} className="cu-table__row cu-llm-model-row">+ <td>+ <input+ type="checkbox"+ checked={selectedIds.has(model.id)}+ onChange={() => toggleRow(model.id)}+ disabled={bulkEnabling}+ aria-label={`Select ${modelLabel(model)}`}+ />+ </td>+ <td className="cu-px-model">{model.model}</td>+ <td>{model.vendor || '—'}</td>+ <td className="cu-px-num">+ {formatContextWindow(model.context_window_tokens)}+ </td>+ <td className="cu-px-actions">+ <button+ type="button"+ className="cu-btn cu-btn--primary cu-btn--sm"+ onClick={() => void handleEnable(model)}+ disabled={pendingId === model.id || bulkEnabling}+ >+ {pendingId === model.id ? 'Enabling…' : 'Enable'}+ </button>+ </td>+ </tr>+ ))+ : null}+ </tbody>+ )+ })}</table></div>)}</div>- {staleModels.length > 0 ? (- <div className="cu-card cu-card--viewport-fill" style={{ marginBottom: '1.25rem' }}>- <TablePanelHeader- title={- <>- <IconModels />- {`Stale models (${staleModels.length})`}- </>- }- subtitle="These models vanished from the provider catalog. They are kept, never auto-removed — decide whether to disable or delete them."- />+ <div className="cu-card cu-section-card">+ <TablePanelHeader+ title={+ <>+ <IconModels />+ {isInitialLoad ? 'Stale models' : `Stale models (${staleModels.length})`}+ </>+ }+ subtitle="Rows missing from the latest live provider catalog stay in the inventory and are never auto-disabled or auto-removed."+ />+ {staleModels.length > 0 ? (<div className="cu-px-unpriced-slot"><div className="cu-banner cu-banner--warning" role="status">- A stale model that is still <strong>enabled</strong> is <strong>served</strong> at- runtime. Disable it to stop serving it, or delete it to drop it from the catalog.+ A stale model that is still <strong>enabled</strong> remains <strong>served</strong>{' '}+ at runtime. Disable it to stop serving it, or delete it to remove it from the+ inventory.</div></div>- <div className="cu-table-wrap">+ ) : null}+ {isInitialLoad ? (+ <div className="cu-table-wrap cu-table-wrap--sticky-header"><table className="cu-table cu-table--header-band"><thead><TableHeaderRow columns={STALE_COLUMNS} /></thead><tbody>- {staleModels.map(model => (- <tr key={model.id} className="cu-table__row">- <td>{getProviderDisplayLabel(model.provider)}</td>- <td className="cu-px-model">{model.model}</td>- <td>{model.vendor || '—'}</td>- <td className="cu-px-num">- {formatContextWindow(model.context_window_tokens)}- </td>- <td>- {model.enabled ? (- <span- className="cu-px-badge cu-px-badge--warn"- title="Enabled and still served at runtime despite being stale."- >- Enabled · served- </span>- ) : (- <span className="cu-px-badge cu-px-badge--off">Disabled</span>- )}- </td>- <td className="cu-px-actions">- {model.enabled ? (- <button- type="button"- className="cu-btn cu-btn--secondary cu-btn--sm"- onClick={() => void handleDisable(model)}- disabled={pendingId === model.id}- >- {pendingId === model.id ? 'Working…' : 'Disable'}- </button>- ) : null}- <button- type="button"- className="cu-btn cu-btn--icon cu-btn--danger-icon"- onClick={() => void handleDelete(model)}- disabled={pendingId === model.id}- aria-label={`Delete ${modelLabel(model)}`}- >- <IconTrash width={16} height={16} />- </button>- </td>- </tr>- ))}+ <SkeletonTableRows columns={STALE_COLUMNS.length} rows={3} /></tbody></table></div>- </div>- ) : null}+ ) : staleModels.length === 0 ? (+ <div className="cu-empty">+ No stale models. Every discovered row was present in the latest live sync.+ </div>+ ) : (+ <div className="cu-table-wrap cu-table-wrap--sticky-header">+ <table className="cu-table cu-table--header-band cu-llm-stale-table">+ <thead>+ <TableHeaderRow columns={STALE_COLUMNS} />+ </thead>+ {staleGroups.map(([provider, models]) => {+ const expanded = expandedStaleProviders.has(provider)+ const servedCount = models.filter(model => model.enabled).length+ return (+ <tbody key={provider} className="cu-llm-model-group">+ <ProviderGroupRow+ actionLabel="stale models"+ colSpan={STALE_COLUMNS.length}+ expanded={expanded}+ models={models}+ onToggle={() => toggleProvider(provider, setExpandedStaleProviders)}+ provider={provider}+ summary={`${servedCount} still served`}+ />+ {expanded+ ? models.map(model => (+ <tr key={model.id} className="cu-table__row cu-llm-model-row">+ <td className="cu-px-model">{model.model}</td>+ <td>{model.vendor || '—'}</td>+ <td className="cu-px-num">+ {formatContextWindow(model.context_window_tokens)}+ </td>+ <td>+ {model.enabled ? (+ <span+ className="cu-px-badge cu-px-badge--warn"+ title="Enabled and still served at runtime despite being stale."+ >+ Enabled · served+ </span>+ ) : (+ <span className="cu-px-badge cu-px-badge--off">Disabled</span>+ )}+ </td>+ <td className="cu-px-actions">+ {model.enabled ? (+ <button+ type="button"+ className="cu-btn cu-btn--secondary cu-btn--sm"+ onClick={() => void handleDisable(model)}+ disabled={pendingId === model.id}+ >+ {pendingId === model.id ? 'Working…' : 'Disable'}+ </button>+ ) : null}+ <button+ type="button"+ className="cu-btn cu-btn--icon cu-btn--danger-icon"+ onClick={() => void handleDelete(model)}+ disabled={pendingId === model.id}+ aria-label={`Delete ${modelLabel(model)}`}+ >+ <IconTrash width={16} height={16} />+ </button>+ </td>+ </tr>+ ))+ : null}+ </tbody>+ )+ })}+ </table>+ </div>+ )}+ </div>{confirmDialog}</>diff --git a/control-ui/components/LlmDiscoveryPanel/types.ts b/control-ui/components/LlmDiscoveryPanel/types.tsnew file mode 100644index 000000000..08d1b115f--- /dev/null+++ b/control-ui/components/LlmDiscoveryPanel/types.ts@@ -0,0 +1,7 @@+import type { LlmAllowedModel } from '@lib/api'++export type LlmDiscoveryPanelProps = {+ items: LlmAllowedModel[]+ loading: boolean+ onRefresh: () => Promise<void>+}diff --git a/control-ui/components/LlmModelTable.tsx b/control-ui/components/LlmModelTable.tsxindex 204ff9c9e..991adf5be 100644--- a/control-ui/components/LlmModelTable.tsx+++ b/control-ui/components/LlmModelTable.tsx@@ -155,15 +155,15 @@ export function LlmModelTable({}return (- <div className="cu-card cu-card--viewport-fill cu-section-card">+ <div className="cu-card cu-section-card"><TablePanelHeadertitle={<><IconModels />- {isInitialLoad ? 'LLM Models' : `LLM Models (${filteredItems.length})`}+ {isInitialLoad ? 'Model catalog' : `Model catalog (${filteredItems.length})`}</>}- subtitle="Operator-declared allowlist of usable models per provider. Only enabled models can be selected for agents and runtime."+ subtitle="The authoritative allowlist of manual and discovered models. Only enabled rows can be selected for agents and runtime."actions={<>{providerOptions.length > 1 ? (@@ -228,7 +228,7 @@ export function LlmModelTable({}/>{isInitialLoad ? (- <div className="cu-table-wrap">+ <div className="cu-table-wrap cu-table-wrap--sticky-header"><table className="cu-table cu-table--header-band cu-llm-model-table"><thead><TableHeaderRow columns={MODEL_COLUMNS} />@@ -245,7 +245,7 @@ export function LlmModelTable({: 'No models in the allowlist yet. Add one to let agents and runtime use it.'}</div>) : (- <div className="cu-table-wrap">+ <div className="cu-table-wrap cu-table-wrap--sticky-header"><table className="cu-table cu-table--header-band cu-llm-model-table"><thead><TableHeaderRow columns={MODEL_COLUMNS} />diff --git a/control-ui/components/Sidebar/constants.tsx b/control-ui/components/Sidebar/constants.tsxindex 5a1767e0a..6a0b4ba03 100644--- a/control-ui/components/Sidebar/constants.tsx+++ b/control-ui/components/Sidebar/constants.tsx@@ -8,8 +8,6 @@ import {IconInfrastructureTrace,IconKey,IconLlmPrices,- IconModelCatalog,- IconModelDiscovery,IconModels,IconOutputs,IconPublish,@@ -83,18 +81,6 @@ export const SIDEBAR_TABS: Record<SidebarTab, SidebarItem> = {label: 'LLM Models',href: CONTROL_ROUTES.llmModels.root,icon: <IconModels />,- children: [- {- label: 'Catalog',- href: CONTROL_ROUTES.llmModels.root,- icon: <IconModelCatalog />,- },- {- label: 'Discovery',- href: CONTROL_ROUTES.llmModels.discovery,- icon: <IconModelDiscovery />,- },- ],},'registry-catalog': {label: 'Marketplace',diff --git a/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsxnew file mode 100644index 000000000..f3eda8eee--- /dev/null+++ b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx@@ -0,0 +1,133 @@+import type { ReactNode } from 'react'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { cleanup, fireEvent, render as rtlRender, screen, waitFor } from '@testing-library/react'+import * as api from '../../lib/api'+import type { LlmAllowedModel } from '../../lib/api'+import { LlmDiscoveryPanel } from '../LlmDiscoveryPanel'+import { ToastProvider } from '../Toast'++vi.mock('../../lib/api', async importOriginal => {+ const actual = await importOriginal<typeof import('../../lib/api')>()+ return {+ ...actual,+ deleteLlmModel: vi.fn(),+ getDiscoveryStatus: vi.fn(),+ syncDiscovery: vi.fn(),+ updateLlmModel: vi.fn(),+ }+})++const reviewModel: LlmAllowedModel = {+ id: 'review-openai',+ provider: 'openai',+ model: 'gpt-5',+ vendor: 'OpenAI',+ display_name: 'GPT-5',+ context_window_tokens: 400000,+ enabled: false,+ source: 'discovery',+ stale: false,+ discovered_at: '2026-01-01T00:00:00.000Z',+ last_seen_at: '2026-01-02T00:00:00.000Z',+ created_at: '2026-01-01T00:00:00.000Z',+ updated_at: '2026-01-02T00:00:00.000Z',+}++const staleModel: LlmAllowedModel = {+ ...reviewModel,+ id: 'stale-anthropic',+ provider: 'claude',+ model: 'claude-retired',+ vendor: 'Anthropic',+ enabled: true,+ stale: true,+}++function render(children: ReactNode) {+ return rtlRender(<ToastProvider>{children}</ToastProvider>)+}++beforeEach(() => {+ vi.mocked(api.getDiscoveryStatus).mockResolvedValue({+ ranAt: '2026-07-29T12:00:00.000Z',+ source: 'live',+ added: 3,+ updated: 14,+ staled: 1,+ })+ vi.mocked(api.updateLlmModel).mockResolvedValue(reviewModel)+ vi.mocked(api.syncDiscovery).mockResolvedValue({+ fetchedAt: '2026-07-29T12:59:59.000Z',+ ranAt: '2026-07-29T13:00:00.000Z',+ source: 'live',+ added: 2,+ updated: 12,+ staled: 0,+ })+})++afterEach(() => {+ cleanup()+ vi.clearAllMocks()+})++describe('LlmDiscoveryPanel merged lifecycle workflow', () => {+ it('keeps discovery review and stale models visually distinct and grouped by provider', async () => {+ render(+ <LlmDiscoveryPanel+ items={[reviewModel, staleModel]}+ loading={false}+ onRefresh={vi.fn().mockResolvedValue(undefined)}+ />+ )++ expect(screen.getByText('Discovery review (1)')).toBeInTheDocument()+ expect(screen.getByText('Stale models (1)')).toBeInTheDocument()+ expect(screen.getByText(/Newly synced models land here disabled/)).toBeInTheDocument()+ expect(screen.getByText(/never auto-disabled or auto-removed/)).toBeInTheDocument()++ const reviewGroup = screen.getByRole('button', { name: 'Expand OpenAI review models' })+ const staleGroup = screen.getByRole('button', { name: 'Expand Anthropic stale models' })+ expect(reviewGroup).toHaveAttribute('aria-expanded', 'false')+ expect(staleGroup).toHaveAttribute('aria-expanded', 'false')+ expect(screen.queryByText('gpt-5')).toBeNull()+ expect(screen.queryByText('claude-retired')).toBeNull()++ fireEvent.click(reviewGroup)+ expect(screen.getByText('gpt-5')).toBeInTheDocument()+ expect(screen.queryByText('claude-retired')).toBeNull()++ await waitFor(() => expect(screen.getByText('Live catalog')).toBeInTheDocument())+ expect(screen.getByText('+3 new')).toBeInTheDocument()+ expect(screen.getByText('14 refreshed')).toBeInTheDocument()+ expect(screen.getByText('1 stale')).toBeInTheDocument()+ })++ it('enables a reviewed row and refreshes the shared inventory', async () => {+ const onRefresh = vi.fn().mockResolvedValue(undefined)+ render(<LlmDiscoveryPanel items={[reviewModel]} loading={false} onRefresh={onRefresh} />)++ fireEvent.click(screen.getByRole('button', { name: 'Expand OpenAI review models' }))+ fireEvent.click(screen.getByRole('button', { name: 'Enable' }))++ await waitFor(() =>+ expect(api.updateLlmModel).toHaveBeenCalledWith('review-openai', { enabled: true })+ )+ expect(onRefresh).toHaveBeenCalledTimes(1)+ })++ it('always renders an explicit empty stale state', () => {+ render(+ <LlmDiscoveryPanel+ items={[reviewModel]}+ loading={false}+ onRefresh={vi.fn().mockResolvedValue(undefined)}+ />+ )++ expect(screen.getByText('Stale models (0)')).toBeInTheDocument()+ expect(+ screen.getByText('No stale models. Every discovered row was present in the latest live sync.')+ ).toBeInTheDocument()+ })+})diff --git a/control-ui/components/__tests__/Sidebar.test.tsx b/control-ui/components/__tests__/Sidebar.test.tsxindex 4468300fc..0fe748fe5 100644--- a/control-ui/components/__tests__/Sidebar.test.tsx+++ b/control-ui/components/__tests__/Sidebar.test.tsx@@ -87,19 +87,19 @@ describe('Sidebar publisher gating', () => {expect(screen.getByRole('link', { name: 'Settings' })).toHaveAttribute('href', '/settings/ui')})- it.each([- ['/llm-models', 'Catalog'],- ['/llm-models/model-id/edit', 'Catalog'],- ['/llm-models/discovery', 'Discovery'],- ])('keeps the matching LLM Models child selected for %s', (pathname, label) => {- vi.mocked(hook.usePublishScope).mockReturnValue({ scope: null, loading: false, error: false })- navigationState.pathname = pathname- render(<Sidebar currentTab="llm-models" />)-- const child = screen.getByRole('link', { name: label })- expect(child).toHaveAttribute('data-active', 'true')- expect(child).toHaveAttribute('aria-current', 'page')- })+ it.each(['/llm-models', '/llm-models/model-id/edit', '/llm-models/discovery'])(+ 'keeps the merged LLM Models entry selected for %s',+ pathname => {+ vi.mocked(hook.usePublishScope).mockReturnValue({ scope: null, loading: false, error: false })+ navigationState.pathname = pathname+ render(<Sidebar currentTab="llm-models" />)++ const entry = screen.getByRole('link', { name: 'LLM Models' })+ expect(entry).toHaveAttribute('href', '/llm-models')+ expect(entry).toHaveAttribute('data-active', 'true')+ expect(entry).toHaveAttribute('aria-current', 'page')+ }+ )it.each([['/agent-outputs/recipe-artifacts', 'Agent Outputs', '/agent-outputs/recipe-artifacts'],diff --git a/control-ui/e2e/qa-recorder-llm-models.spec.ts b/control-ui/e2e/qa-recorder-llm-models.spec.tsindex 41fa6550e..698e14eb5 100644--- a/control-ui/e2e/qa-recorder-llm-models.spec.ts+++ b/control-ui/e2e/qa-recorder-llm-models.spec.ts@@ -22,18 +22,13 @@ test.describe('optional QA recorder: Control UI LLM models and secrets', () => {const mainNav = page.getByRole('navigation', { name: 'Main sections' })- // (1) LLM Models catalog. The sidebar entry may be a direct link or an- // expandable group (button -> 'Catalog' child); click the label, then follow- // the Catalog child link if it appears. Assert the canonical URL and that the- // models table rendered (the 'Context window' column header is a stable shell- // marker that renders regardless of row count).- await mainNav.getByText('LLM Models', { exact: true }).click()- const catalogLink = mainNav.getByRole('link', { name: 'Catalog', exact: true })- if (await catalogLink.isVisible().catch(() => false)) {- await catalogLink.click()- }+ // (1) Unified LLM Models inventory. Catalog, Discovery Review, and Stale+ // Models now share this direct sidebar destination.+ await mainNav.getByRole('link', { name: 'LLM Models', exact: true }).click()await expect(page).toHaveURL(/\/llm-models/, { timeout: 20_000 })await expect(page.getByText('Context window').first()).toBeVisible({ timeout: 20_000 })+ await expect(page.getByText(/Discovery review/)).toBeVisible({ timeout: 20_000 })+ await expect(page.getByText(/Stale models/)).toBeVisible({ timeout: 20_000 })await screenshotAndLog(page, testInfo, 'control-ui-llm-models')// (2) Secrets management (LLM scope). 'Secrets' is a direct sidebar link todiff --git a/control-ui/e2e/qa-recorder-navigation.spec.ts b/control-ui/e2e/qa-recorder-navigation.spec.tsindex 84894e6b7..69eb0ef5a 100644--- a/control-ui/e2e/qa-recorder-navigation.spec.ts+++ b/control-ui/e2e/qa-recorder-navigation.spec.ts@@ -65,17 +65,13 @@ test.describe('optional QA recorder: Control UI navigation', () => {).toBeVisible({ timeout: 20_000 })await screenshotAndLog(page, testInfo, 'control-ui-navigation-external-channels')- // 5) LLM Models — this is an expandable sidebar GROUP rendered as a <button>- // (not a link), so clicking it only toggles its subnav. Expand the group,- // then follow the 'Catalog' child link (href = CONTROL_ROUTES.llmModels.root- // = /llm-models) into the model catalog page. Scope to the sidebar nav so- // the 'Catalog' match is unambiguous.- await mainNav.getByRole('button', { name: 'LLM Models', exact: true }).click()- await mainNav.getByRole('link', { name: 'Catalog', exact: true }).click()+ // 5) LLM Models — Catalog, Discovery Review, and Stale Models share one+ // canonical operator surface, so the sidebar uses one direct link.+ await mainNav.getByRole('link', { name: 'LLM Models', exact: true }).click()await expect(page).toHaveURL(/\/llm-models/, { timeout: 20_000 })// The subtitle is long; anchor on a unique leading substring.await expect(- page.getByText('Operator-declared allowlist of usable models per provider')+ page.getByText('The authoritative allowlist of manual and discovered models')).toBeVisible({ timeout: 20_000 })await screenshotAndLog(page, testInfo, 'control-ui-navigation-llm-models')diff --git a/control-ui/lib/api.ts b/control-ui/lib/api.tsindex cee917335..70aa73874 100644--- a/control-ui/lib/api.ts+++ b/control-ui/lib/api.ts@@ -1606,9 +1606,10 @@ export async function deleteLlmModel(id: string) {// ── Catalog discovery (spec 09 §7, F2) ────────────────────────────────────// Discovery pulls the public models.dev catalog into `llm_allowed_models` as// `source='discovery', enabled=false`. The operator reviews and enables from a-// fresh catalog. These wrappers drive the /llm-models/discovery review surface;-// enable/disable/delete of the discovered rows reuse the existing update/delete-// routes above (no dedicated discovery mutation endpoint).+// fresh catalog. These wrappers drive the Discovery Review section on the+// unified /llm-models surface; enable/disable/delete of discovered rows reuse+// the existing update/delete routes above (no dedicated discovery mutation+// endpoint).// `live` = fetched from the upstream catalog; `vendored` = served from the// bundled snapshot fallback (upstream unreachable).diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex e929212db..e9cbf1349 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.354",+ "version": "0.1.355","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.354",+ "version": "0.1.355","dependencies": {"@clerum/llm-providers": "file:../packages/llm-providers","@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 276e86133..aa450626d 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.354",+ "version": "0.1.355","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/docs/llm-providers/README.md b/docs/llm-providers/README.mdindex 89670b812..5245ad814 100644--- a/docs/llm-providers/README.md+++ b/docs/llm-providers/README.md@@ -2,11 +2,11 @@This is the orientation guide. Read it first, then branch:-| You want to… | Go to |-| ------------------------------------------ | ----------------------------------------------------------------- |-| Set up credentials and the model allowlist | [Operator guide](../deploy/llm-providers.md) |-| Add a provider that isn't in the list | [Adding a provider](adding-a-provider.md) |-| Understand the Control UI surface | [Control UI](../surfaces/control-ui.md) |+| You want to… | Go to |+| ------------------------------------------ | -------------------------------------------- |+| Set up credentials and the model allowlist | [Operator guide](../deploy/llm-providers.md) |+| Add a provider that isn't in the list | [Adding a provider](adding-a-provider.md) |+| Understand the Control UI surface | [Control UI](../surfaces/control-ui.md) |> Code and API group still use the historical name **clerum** (`clerum.io`,> `CLERUM_*`, `@clerum/*`). Same project — [code names](../concepts/code-names.md).@@ -232,9 +232,11 @@ to the `clerum-llm-allowed-models` ConfigMap for the runtime.- **Fail-closed**: a row must exist and be `enabled`. A provider with no enabledrows is unusable and flagged in the wizard.-- **Discovery**: `/llm-models/discovery` can sync a catalog from models.dev,- which lands rows as **disabled** for the operator to curate — it never- auto-enables anything.+- **Discovery review**: `/llm-models` combines the authoritative catalog,+ discovery review queue, and stale-model triage in one operator surface. A+ models.dev sync still lands rows as **disabled** for the operator to curate —+ it never auto-enables anything. The legacy `/llm-models/discovery` URL+ redirects to this merged surface.- **Deployed resources are never interrupted.** If a model falls out of theallowlist, running Hosts keep working (a `WARN` plus a metric, marked "out ofallowlist" in the UI). Hard enforcement applies only to _new_ selections: hostdiff --git a/docs/surfaces/control-ui.md b/docs/surfaces/control-ui.mdindex 3ae0a911f..1d2ccf0e1 100644--- a/docs/surfaces/control-ui.md+++ b/docs/surfaces/control-ui.md@@ -110,23 +110,23 @@ caveat to the heading: the `GlobalFileSystem` CRD itself is applied out of band(kustomize), and the Global File System screen only manages the brokered gfsresources and grants inside it — it never writes that CR.-| Sidebar label | Route | CRD / control-api resource |-| ------------------ | -------------------------------------------------------------------------------------- | -------------------------------- |-| Agent Files | `/agent-files` | `SharedFileSystem` |-| Agent Outputs | `/agent-outputs/recipe-artifacts` | outputs (non-CRD) |-| Agents | `/agents` | `Host` |-| Connectors | `/connectors` | `McpServer` |-| Contexts | `/contexts` | `Context` |-| Cost & Usage | `/cost-and-usage/usage`, `/cost-and-usage/llm-prices`, `/cost-and-usage/token-budgets` | cost (non-CRD) |-| External Channels | `/external-channels` | `CommunicationChannel` |-| Global File System | `/global-file-system` | gfs resources & grants (non-CRD) |-| LLM Models | `/llm-models`, `/llm-models/discovery` | model allowlist (non-CRD) |-| Marketplace | `/marketplace/connectors` | registry (non-CRD) |-| Plugins | `/plugins` | `WorkflowRecipe` |-| Publisher | `/publisher` | publisher (non-CRD) |-| Secrets | `/secrets/llm` | secrets (non-CRD) |-| Settings | `/settings/ui` | settings (non-CRD) |-| Users & Teams | `/users-and-teams/users` | users/teams (non-CRD) |+| Sidebar label | Route | CRD / control-api resource |+| ------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------- |+| Agent Files | `/agent-files` | `SharedFileSystem` |+| Agent Outputs | `/agent-outputs/recipe-artifacts` | outputs (non-CRD) |+| Agents | `/agents` | `Host` |+| Connectors | `/connectors` | `McpServer` |+| Contexts | `/contexts` | `Context` |+| Cost & Usage | `/cost-and-usage/usage`, `/cost-and-usage/llm-prices`, `/cost-and-usage/token-budgets` | cost (non-CRD) |+| External Channels | `/external-channels` | `CommunicationChannel` |+| Global File System | `/global-file-system` | gfs resources & grants (non-CRD) |+| LLM Models | `/llm-models` | model allowlist and discovery review (non-CRD) |+| Marketplace | `/marketplace/connectors` | registry (non-CRD) |+| Plugins | `/plugins` | `WorkflowRecipe` |+| Publisher | `/publisher` | publisher (non-CRD) |+| Secrets | `/secrets/llm` | secrets (non-CRD) |+| Settings | `/settings/ui` | settings (non-CRD) |+| Users & Teams | `/users-and-teams/users` | users/teams (non-CRD) |Secret **values are write-only from the UI**: the Secrets screen lets anadmin create or replace a value, but never displays one back.