do not swallow litellm.get_model_info() exceptions #2318

This commit is contained in:
Paul Gauthier 2024-11-11 15:15:24 -08:00
parent 44063590e2
commit 0e53198c59

View file

@ -778,7 +778,9 @@ class ModelInfoManager:
# If all else fails, do it the slow way...
try:
return litellm.get_model_info(model)
except Exception:
except Exception as ex:
if "model_prices_and_context_window.json" not in str(ex):
print(str(ex))
return dict()