forked from phoenix/litellm-mirror
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:
commit
60c06cd7df
1 changed files with 18 additions and 6 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue