diff --git a/ui/storybook/prototypes/jev-task-creation/JevTaskComposer.tsx b/ui/storybook/prototypes/jev-task-creation/JevTaskComposer.tsx index e08aacefd5e..59f4b3e9269 100644 --- a/ui/storybook/prototypes/jev-task-creation/JevTaskComposer.tsx +++ b/ui/storybook/prototypes/jev-task-creation/JevTaskComposer.tsx @@ -918,6 +918,8 @@ function JevConfidence({ const formatTokens = (value: number) => value.toLocaleString("en-US"); const formatUsd = (value: number) => `$${value < 0.01 ? value.toFixed(5) : value.toFixed(4)}`; +/** Whole dollars with separators, for the at-scale estimate (for example "$160"). */ +const formatScaledUsd = (value: number) => `$${Math.round(value).toLocaleString("en-US")}`; function TaskCostSummary({ jev, title, titlePending }: { jev: LiveStats; title: ModelUsage | null; titlePending: boolean }) { const total = jev.cost + (title?.cost ?? 0); @@ -946,7 +948,7 @@ function TaskCostSummary({ jev, title, titlePending }: { jev: LiveStats; title:
Total - {title ? `≈ $${(total * 1000).toFixed(2)} per 1,000 tasks` : ""} + {title ? `≈ ${formatScaledUsd(total * 1_000_000)} per 1M tasks` : ""} {formatUsd(total)}
diff --git a/ui/storybook/prototypes/jev-task-creation/README.md b/ui/storybook/prototypes/jev-task-creation/README.md index 8a28af660df..30aeb3640a3 100644 --- a/ui/storybook/prototypes/jev-task-creation/README.md +++ b/ui/storybook/prototypes/jev-task-creation/README.md @@ -102,7 +102,7 @@ Every task shows an **Estimated cost** table: is the real Messages API body for `claude-haiku-4-5`: a short system instruction, the prompt, and `max_tokens: 64`. $1 per million input tokens and $5 per million output tokens. -- **Total**, with a per-1,000-tasks estimate. +- **Total**, with an estimate for 1 million tasks like this one. Token counts are estimated at about four characters per token. In production, read `usage` from each response instead.