feat(main.py): allow updating model cost via completion()

This commit is contained in:
Krrish Dholakia 2023-11-29 20:14:31 -08:00
parent 4c1ef4e270
commit 0d200cd8dc
3 changed files with 27 additions and 3 deletions

View file

@ -1794,7 +1794,6 @@ 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]
# add new model names to provider lists
if value.get('litellm_provider') == 'openai':
if key not in litellm.open_ai_chat_completion_models: