mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
feat(admin-ui): fit the Models catalog table without horizontal scroll
The table had 11 columns and scrolled at 1280px, hiding p50, p95 and error rate. It now shows compact price, one token column and a short error header. Context window stays in the model chip hover, and the :free flag moves into the price cell.
This commit is contained in:
@@ -216,6 +216,12 @@ export function formatModelCostHover(inputUsd: number, outputUsd: number): strin
|
||||
return `in ${formatUsdPerMTok(inputUsd)} / out ${formatUsdPerMTok(outputUsd)} per MTok`
|
||||
}
|
||||
|
||||
/** formatModelPriceShort is the table-cell form of formatModelCostHover: "$1.00 / $2.00" (input / output per MTok). */
|
||||
export function formatModelPriceShort(inputUsd: number, outputUsd: number): string {
|
||||
if (inputUsd === 0 && outputUsd === 0) return 'free'
|
||||
return `${formatUsdPerMTok(inputUsd)} / ${formatUsdPerMTok(outputUsd)}`
|
||||
}
|
||||
|
||||
/**
|
||||
* formatLatencyMs renders a millisecond average (admin.go's
|
||||
* adminLatencyView.avgTtfbMs/avgDurationMs — feat: latency panel) as a
|
||||
|
||||
Reference in New Issue
Block a user