Files
lukaszraczyloandGitHub bfdffc2ab0 fix(admin): show aliases, guard the provider filter, tolerate failing upstreams (#23)
* fix(admin): attach model aliases to the model their target resolves to

The catalog grouped aliases by the raw target string and looked them up by
canonical provider/model id. A bare target never matched, so no model card
listed its aliases. Each alias now keys on the canonical id that the
registry resolves its target to. The alias view gains an additive
resolvedTarget field.

Model-id cells in the overview, usage and panels now show an alias badge
with the target, using the catalog alias list.

* fix(webui): omit the provider filter select until providers load

* fix(discovery): tolerate failing modelBaseUrls upstreams

A modelBaseUrls upstream that fails /v1/models must not fail the provider.
Discovery now fails only when baseUrl fails. The explicit models of the
failing upstream stay listed, and the other upstreams still merge.

The admin overview reports each failed upstream in the additive
upstreamErrors field. The registry logs it at most once per 10 minutes
per provider. The README states the new semantics.

* chore(webui): regenerate admin assets

Rebuilt with make admin-ui for the alias badge and the provider filter changes.

* style(auth): order authStore fields for fieldalignment

golangci-lint's fieldalignment check reported 240 leading pointer bytes on authStore where 232 is optimal. The bool anonymousAnyKey moves next to the mutexes. No behaviour change.
2026-11-28 02:13:22 +00:00
..
2026-08-21 09:21:41 +01:00

Admin panel (webui)

Source for the traefik-llmgateway read-only admin dashboard: Vue 3 + TypeScript + Pinia + Tailwind v4 + @perfect-design/ui, built with Vite.

See the repo root README.md's Admin section for what the dashboard shows and how its API/auth works, and the Development section for make admin-ui — the only way this directory's output (../admin_assets_gen.go) is meant to be regenerated. Nothing here runs at request time: the plugin serves the built, baked-in output, never webui/ itself.

Local development

npm ci
npm run dev      # Vite dev server — /admin/api/* calls need a real
                  # gateway to fetch from; point one at the same origin or
                  # accept the "refresh failed" state while iterating on
                  # layout/styling alone.
npm run build     # what `make admin-ui` runs, plus webui/generate.mjs

Structure

  • src/pages/ and src/panels/ — one page per nav entry and the detail panels they open.
  • src/widgets/, src/components/, src/layout/ — shared presentation built on @perfect-design/ui.
  • src/stores/ — Pinia stores (auth, dashboard, toasts, ...).
  • src/lib/ — pure helpers with specs; api.ts wraps /admin/api/*.
  • src/types/api.ts — TypeScript mirrors of admin.go's JSON response shapes.
  • mock/ — the dev-only mock admin API behind npm run dev:mock.
  • scripts/bundle-size.mjs — the bundle gate: gzip JS+CSS of dist/assets must stay at or below its LIMIT.
  • generate.mjs — reads dist/ after vite build and writes ../admin_assets_gen.go; see its header comment for why every asset is base64-encoded.

src/assets/main.css lists the @perfect-design/ui component directories Tailwind scans; add a directory there when you import a new component (src/lib/tailwind-sources.spec.ts fails otherwise).

Visual harness

npm run test:visual starts the mock dev server on PW_PORT (default 5199) and fails fast if that port is taken, so two runs cannot share one server or the .screenshots/ output. Set PW_REUSE=1 to attach to a server you already started.