/** * GET /dashboard/providers (FEAT-539) — every pipeline role's configured * provider/model + live up/down status, in one place. * * Motivation: the operator asked why the dashboard showed no LLM/provider * status at all. FEAT-538 already computes real per-provider health (up/down * from actual chat() auth/quota/5xx failures, not a probe — see * src/providers/llm/health-tracking.ts's module doc comment) and surfaces it * on `GET /health` as `provider_health.{extraction,compaction}`. This route * is a pure READ of that same registry (`getProviderHealthEntry`) — it never * probes a provider itself and never adds a second source of truth. * * Six pipeline roles are shown, not just the two `/health` wires up: * embedding, compaction, extraction, judge (contradiction detection), * extractionPassB, atomTriage. * * `judge`/`extractionPassB`/`atomTriage` all default to "ride extraction" — * unset `provider`/`model` means the SAME provider instance as * `config.llm.extraction` (shared rate-limit bucket, shared health-registry * entry, see health-tracking.ts's doc comment). Rendering those rows with * their own green dot when un-overridden would look like three independently * monitored providers when it is really one signal wearing three names — so * an un-overridden (or mode:'off'/inactive) role renders GREY with a "rides * extraction" / "disabled" note instead of a false-green independent status, * even when the extraction provider it would ride is currently up. * * `embedding` is not an LLM-chat role (no ProviderHealthEntry) — its status * comes from `healthState.embed` (the same field the main dashboard's * "Embedding" strip and `/health`'s `embed` block already read), so it always * shows its own real up/down/starting rather than grey. */ import type { FastifyInstance } from 'fastify'; import type { Config } from '../../config/config.js'; import type { HealthState } from '../health-state.js'; import { type ProviderFailureKind } from '../../providers/llm/health-tracking.js'; export type RoleDotStatus = 'up' | 'down' | 'grey'; export interface ProviderRoleRow { role: string; provider: string; model: string; status: RoleDotStatus; /** Why the row is grey (rides-extraction / disabled) — empty for up/down rows. */ note: string; reason: ProviderFailureKind | null; /** Failure remedy (down) or last embed error (embedding, down) — null otherwise. */ message: string | null; } /** AC: single source of truth — every non-embedding row's up/down comes from * FEAT-538's `getProviderHealthEntry` registry (the same one `/health` * reads), never a separate probe. */ export declare function resolveProviderRows(config: Config, healthState?: HealthState): ProviderRoleRow[]; export declare function dashboardProvidersRoute(config: Config, token: string, healthState?: HealthState, devNoAuthActive?: boolean): (app: FastifyInstance) => Promise;