fix(proxy_server.py): fix if block

This commit is contained in:
Krrish Dholakia 2024-02-29 11:42:24 -08:00
parent 3fea348e4e
commit 7d26eaf481

View file

@ -941,8 +941,7 @@ async def _PROXY_track_cost_callback(
raise Exception("User API key missing from custom callback.") raise Exception("User API key missing from custom callback.")
else: else:
if kwargs["stream"] != True or ( if kwargs["stream"] != True or (
kwargs["stream"] == True kwargs["stream"] == True and "complete_streaming_response" in kwargs
and kwargs.get("complete_streaming_response") in kwargs
): ):
raise Exception( raise Exception(
f"Model not in litellm model cost map. Add custom pricing - https://docs.litellm.ai/docs/proxy/custom_pricing" f"Model not in litellm model cost map. Add custom pricing - https://docs.litellm.ai/docs/proxy/custom_pricing"