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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
add test for health check
Ishaan Jaff284b8b341887
diff --git a/litellm/tests/test_health_check.py b/litellm/tests/test_health_check.pyindex f632e769216..75f40541a70 100644--- a/litellm/tests/test_health_check.py+++ b/litellm/tests/test_health_check.py@@ -1,14 +1,18 @@#### What this tests ##### This tests if ahealth_check() actually works-import sys, os+import os+import sysimport traceback+import pytestsys.path.insert(0, os.path.abspath("../..")) # Adds the parent directory to the system path-import litellm, asyncio+import asyncio++import litellm@pytest.mark.asyncio@@ -105,3 +109,27 @@ async def test_sagemaker_embedding_health_check():# asyncio.run(test_sagemaker_embedding_health_check())+++async def test_fireworks_health_check():+ """+ This should not fail++ ensure that provider wildcard model passes health check+ """+ response = await litellm.ahealth_check(+ model_params={+ "api_key": os.environ.get("FIREWORKS_AI_API_KEY"),+ "model": "fireworks_ai/*",+ "messages": [{"role": "user", "content": "What's 1 + 1?"}],+ },+ mode=None,+ prompt="What's 1 + 1?",+ input=["test from litellm"],+ default_timeout=6000,+ )+ print(f"response: {response}")+ assert response == {}++ return response