From b576233e66cab5d43b9d00ad24605b08c7b41125 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 29 Aug 2024 09:29:16 -0700 Subject: [PATCH] add support for fireworks ai health check --- litellm/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/litellm/main.py b/litellm/main.py index 7eac01ff6fe..fc9c768a16c 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -5050,6 +5050,18 @@ async def ahealth_check( model_params["prompt"] = prompt await litellm.aimage_generation(**model_params) response = {} + elif "*" in model: + from litellm.litellm_core_utils.llm_request_utils import ( + pick_cheapest_model_from_llm_provider, + ) + + # this is a wildcard model, we need to pick a random model from the provider + cheapest_model = pick_cheapest_model_from_llm_provider( + custom_llm_provider=custom_llm_provider + ) + model_params["model"] = cheapest_model + await acompletion(**model_params) + response = {} # args like remaining ratelimit etc. else: # default to completion calls await acompletion(**model_params) response = {} # args like remaining ratelimit etc.