mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-10 10:22:42 +00:00
Merge pull request #3871 from BerriAI/litellm_custom_pricing_ui_fix
fix(model_dashboard.tsx): accurately show the input/output cost per token when custom pricing is set
This commit is contained in:
@@ -1231,9 +1231,15 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||
}}
|
||||
>
|
||||
<pre style={{ fontSize: "10px" }}>
|
||||
{model.input_cost ||
|
||||
model.litellm_params.input_cost_per_token ||
|
||||
"-"}
|
||||
{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}
|
||||
</pre>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
@@ -1244,9 +1250,15 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||
}}
|
||||
>
|
||||
<pre style={{ fontSize: "10px" }}>
|
||||
{model.output_cost ||
|
||||
model.litellm_params.output_cost_per_token ||
|
||||
"-"}
|
||||
{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}
|
||||
</pre>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
|
||||
Reference in New Issue
Block a user