fix(caching.py): remove url parsing logic - causing redis ssl connections to fail

this reverts a change that was causing redis url w/ ssl to fail. this also adds unit testing for this sc
enario, to prevent future regressions
This commit is contained in:
Krrish Dholakia 2024-04-19 14:01:13 -07:00
parent 9dc0871023
commit 7065e4ee12
4 changed files with 84 additions and 14 deletions

View file

@ -67,7 +67,7 @@ class PrometheusLogger:
# unpack kwargs
model = kwargs.get("model", "")
response_cost = kwargs.get("response_cost", 0.0)
response_cost = kwargs.get("response_cost", 0.0) or 0
litellm_params = kwargs.get("litellm_params", {}) or {}
proxy_server_request = litellm_params.get("proxy_server_request") or {}
end_user_id = proxy_server_request.get("body", {}).get("user", None)