mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-18 05:47:38 +00:00
feat(webui): list every model with full usage on the Models tab
The Models tab ranks by requests by default and asks the server for per-model detail. A table under the chart lists requests, tokens in, tokens out and cost for each model. A model with no recorded cost that is marked free shows a "free" badge instead of $0. The CSV export includes every column and the free flag. admin_assets_gen.go is regenerated. Claude-Session: https://claude.ai/code/session_01V5jYJNxpDFdJkyyExpADrv
This commit is contained in:
@@ -16,7 +16,15 @@ import type { HistoryWindow } from '@/types/api'
|
||||
/** The five defaults every per-tab param omits from the built hash when the field is already at its default value (buildHash's own "caller decides what's default" contract, lib/hash-state.ts). */
|
||||
const DEFAULT_WINDOW: HistoryWindow = 'hour'
|
||||
const DEFAULT_CHART_TAB: ChartTab = 'requests'
|
||||
const DEFAULT_METRIC: ModelMetric = 'cost'
|
||||
/**
|
||||
* DEFAULT_METRIC mirrors stores/history.ts's own initial `modelMetric`
|
||||
* state (free-models-plan.md: 'req', not 'cost' — a cost-default ranking
|
||||
* hides every free model). An omitted `metric` hash param, or one this
|
||||
* build does not recognize (parseChartsParams' own independent-field
|
||||
* validation, lib/hash-state.ts), falls back to this value here; an
|
||||
* explicit `metric=cost` in the hash still parses and applies normally.
|
||||
*/
|
||||
const DEFAULT_METRIC: ModelMetric = 'req'
|
||||
const DEFAULT_SCOPE = 'total'
|
||||
const DEFAULT_MODEL_FILTER = ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user