forked from phoenix/litellm-mirror
fix(model_dashboard.tsx): accurately show the input/output cost per token when custom pricing is set
This commit is contained in:
parent
3be6a07e35
commit
d54c1f2da0
1 changed files with 18 additions and 6 deletions
|
@ -1196,9 +1196,15 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
|||
wordBreak: "break-word",
|
||||
}}
|
||||
>
|
||||
{model.input_cost ||
|
||||
model.litellm_params.input_cost_per_token ||
|
||||
null}
|
||||
{model.input_cost
|
||||
? model.input_cost
|
||||
: model.litellm_params.input_cost_per_token
|
||||
? (
|
||||
Number(
|
||||
model.litellm_params.input_cost_per_token
|
||||
) * 1000000
|
||||
).toFixed(2)
|
||||
: null}
|
||||
</TableCell>
|
||||
<TableCell
|
||||
style={{
|
||||
|
@ -1207,9 +1213,15 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
|||
wordBreak: "break-word",
|
||||
}}
|
||||
>
|
||||
{model.output_cost ||
|
||||
model.litellm_params.output_cost_per_token ||
|
||||
null}
|
||||
{model.output_cost
|
||||
? model.output_cost
|
||||
: model.litellm_params.output_cost_per_token
|
||||
? (
|
||||
Number(
|
||||
model.litellm_params.output_cost_per_token
|
||||
) * 1000000
|
||||
).toFixed(2)
|
||||
: null}
|
||||
</TableCell>
|
||||
<TableCell
|
||||
style={{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue