forked from phoenix/litellm-mirror
fix(utils.py): fix register model cost map
This commit is contained in:
parent
03fb143a87
commit
e98fac66da
1 changed files with 4 additions and 1 deletions
|
@ -1793,7 +1793,10 @@ def register_model(model_cost: Union[str, dict]):
|
|||
|
||||
for key, value in loaded_model_cost.items():
|
||||
## override / add new keys to the existing model cost dictionary
|
||||
litellm.model_cost[key] = loaded_model_cost[key]
|
||||
if key in litellm.model_cost:
|
||||
for k,v in loaded_model_cost[key].items():
|
||||
litellm.model_cost[key][k] = v
|
||||
# litellm.model_cost[key] = loaded_model_cost[key]
|
||||
# add new model names to provider lists
|
||||
if value.get('litellm_provider') == 'openai':
|
||||
if key not in litellm.open_ai_chat_completion_models:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue