Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(ui): convert model pricing in UI to per 1000 units (#1123)

Richard Krümmelc5d7772fe6c8
diff --git a/src/components/table/use-cases/models.tsx b/src/components/table/use-cases/models.tsx
index 4c014efc38..aaf11fdfd0 100644
--- a/src/components/table/use-cases/models.tsx
+++ b/src/components/table/use-cases/models.tsx
@@ -31,10 +31,10 @@ const modelConfigDescriptions = {
"Regex pattern to match `model` parameter of generations to model pricing",
startDate:
"Date to start pricing model. If not set, model is active unless a more recent version exists.",
- inputPrice: "Price per unit of input",
- outputPrice: "Price per unit of output",
+ inputPrice: "Price per 1000 units of input",
+ outputPrice: "Price per 1000 units of output",
totalPrice:
- "Price per unit, for models that don't have input/output specific prices",
+ "Price per 1000 units, for models that don't have input/output specific prices",
unit: "Unit of measurement for generative model, can be TOKENS, CHARACTERS, SECONDS, MILLISECONDS, or IMAGES.",
tokenizerId:
"Tokenizer used for this model to calculate token counts if none are ingested. Pick from list of supported tokenizers.",
@@ -107,7 +107,14 @@ export default function ModelTable({ projectId }: { projectId: string }) {
{
accessorKey: "inputPrice",
id: "inputPrice",
- header: "Input Price",
+ header: () => {
+ return (
+ <>
+ Input Price{" "}
+ <span className="text-xs text-gray-400">/ 1k units</span>
+ </>
+ );
+ },
headerTooltip: {
description: modelConfigDescriptions.inputPrice,
},
@@ -116,7 +123,7 @@ export default function ModelTable({ projectId }: { projectId: string }) {
return value ? (
<span className="text-xs">
- {usdFormatter(value.toNumber(), 2, 8)}
+ {usdFormatter(value.toNumber() * 1000, 2, 8)}
</span>
) : (
<span className="text-xs">-</span>
@@ -129,13 +136,20 @@ export default function ModelTable({ projectId }: { projectId: string }) {
headerTooltip: {
description: modelConfigDescriptions.outputPrice,
},
- header: "Output Price",
+ header: () => {
+ return (
+ <>
+ Output Price{" "}
+ <span className="text-xs text-gray-400">/ 1k units</span>
+ </>
+ );
+ },
cell: ({ row }) => {
const value: Decimal | undefined = row.getValue("outputPrice");
return value ? (
<span className="text-xs">
- {usdFormatter(value.toNumber(), 2, 8)}
+ {usdFormatter(value.toNumber() * 1000, 2, 8)}
</span>
) : (
<span className="text-xs">-</span>
@@ -145,7 +159,13 @@ export default function ModelTable({ projectId }: { projectId: string }) {
{
accessorKey: "totalPrice",
id: "totalPrice",
- header: "Total Price",
+ header: () => {
+ return (
+ <>
+ Total Price<span className="text-xs text-gray-400">/ 1k units</span>
+ </>
+ );
+ },
headerTooltip: {
description: modelConfigDescriptions.totalPrice,
},
@@ -154,7 +174,7 @@ export default function ModelTable({ projectId }: { projectId: string }) {
return value ? (
<span className="text-xs">
- {usdFormatter(value.toNumber(), 2, 8)}
+ {usdFormatter(value.toNumber() * 1000, 2, 8)}
</span>
) : (
<span className="text-xs">-</span>