feat(cost_calculator.py): only override base model if custom pricing is set

This commit is contained in:
Krrish Dholakia 2024-08-19 16:05:49 -07:00
parent a494b5b2f3
commit 55217fa8d7
4 changed files with 98 additions and 25 deletions

View file

@ -757,9 +757,7 @@ def response_cost_calculator(
custom_llm_provider=custom_llm_provider,
)
else:
if (
model in litellm.model_cost or custom_pricing is True
): # override defaults if custom pricing is set
if custom_pricing is True: # override defaults if custom pricing is set
base_model = model
# base_model defaults to None if not set on model_info