Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

add support for fireworks ai health check

Ishaan Jaffb576233e66ca
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.