mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
Remove cost tracking disabled tooltip in chat ui (#16953)
* Fix: Simplify cost tooltip in ResponseMetrics Co-authored-by: ishaan <ishaan@berri.ai> * Fix: Display cost metric correctly in ResponseMetrics Co-authored-by: ishaan <ishaan@berri.ai> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: ishaan <ishaan@berri.ai>
This commit is contained in:
parent
8b8b31ecd8
commit
34f0c3c4dc
1 changed files with 3 additions and 9 deletions
|
|
@ -84,17 +84,11 @@ const ResponseMetrics: React.FC<ResponseMetricsProps> = ({ timeToFirstToken, tot
|
|||
</Tooltip>
|
||||
)}
|
||||
|
||||
{usage && (
|
||||
<Tooltip
|
||||
title={
|
||||
usage.cost !== undefined
|
||||
? "Cost"
|
||||
: "Cost tracking is disabled. Set include_cost_in_streaming_usage: true in your proxy config to enable cost tracking."
|
||||
}
|
||||
>
|
||||
{usage?.cost !== undefined && (
|
||||
<Tooltip title="Cost">
|
||||
<div className="flex items-center">
|
||||
<DollarOutlined className="mr-1" />
|
||||
<span>{usage.cost !== undefined ? `$${usage.cost.toFixed(6)}` : "Not Tracked"}</span>
|
||||
<span>${usage.cost.toFixed(6)}</span>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue