mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
perf(cost): check the exact cost-map row before generalization rules when picking the priced model
This commit is contained in:
parent
fcb22cb202
commit
439d4b8c5c
1 changed files with 3 additions and 3 deletions
|
|
@ -1029,10 +1029,10 @@ def _cost_map_model_name(model: str, custom_llm_provider: str | None, region_nam
|
|||
|
||||
|
||||
def _resolves_to_rates(model: str, custom_llm_provider: str | None) -> bool:
|
||||
if _declares_rates(_cost_map_model_info(model, custom_llm_provider)):
|
||||
return True
|
||||
rule_info: Final = unmapped_model_generalization(model, custom_llm_provider)
|
||||
if rule_info is not None:
|
||||
return _cost_map_entry_prices_anything(rule_info)
|
||||
return _declares_rates(_cost_map_model_info(model, custom_llm_provider))
|
||||
return rule_info is not None and _cost_map_entry_prices_anything(rule_info)
|
||||
|
||||
|
||||
def _served_or_priced_requested_model(served: str, requested: str | None, custom_llm_provider: str | None) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue