(fix) using callbacks with router

This commit is contained in:
ishaan-jaff 2023-11-20 19:04:10 -08:00
parent 668d45393c
commit 80884e9cb3

View file

@ -81,6 +81,9 @@ class Router:
self.cache_responses = cache_responses
self.cache = litellm.Cache(cache_config) # use Redis for tracking load balancing
## USAGE TRACKING ##
if type(litellm.success_callback) == list:
litellm.success_callback.append(self.deployment_callback)
else:
litellm.success_callback = [self.deployment_callback]
def _start_health_check_thread(self):