fix(router.py): skip api key when generating model id for router deployments

This commit is contained in:
Krrish Dholakia 2023-11-29 15:37:08 -08:00
parent 6c98715b94
commit 04a1c20bc5

View file

@ -874,7 +874,8 @@ class Router:
############ End of initializing Clients for OpenAI/Azure ################### ############ End of initializing Clients for OpenAI/Azure ###################
model_id = "" model_id = ""
for key in model["litellm_params"]: for key in model["litellm_params"]:
model_id+= str(model["litellm_params"][key]) if key != "api_key":
model_id+= str(model["litellm_params"][key])
model["litellm_params"]["model"] += "-ModelID-" + model_id model["litellm_params"]["model"] += "-ModelID-" + model_id
self.model_names = [m["model_name"] for m in model_list] self.model_names = [m["model_name"] for m in model_list]