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
test fixes
Ishaan Jaffer6530749c891f
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex aebf1404196..6431d78a539 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -530,6 +530,7 @@ featherless_ai_models: Set = set()palm_models: Set = set()groq_models: Set = set()azure_models: Set = set()+azure_anthropic_models: Set = set()azure_text_models: Set = set()anyscale_models: Set = set()cerebras_models: Set = set()@@ -734,6 +735,8 @@ def add_known_models():groq_models.add(key)elif value.get("litellm_provider") == "azure":azure_models.add(key)+ elif value.get("litellm_provider") == "azure_anthropic":+ azure_anthropic_models.add(key)elif value.get("litellm_provider") == "anyscale":anyscale_models.add(key)elif value.get("litellm_provider") == "cerebras":@@ -873,6 +876,7 @@ model_list = list(| palm_models| groq_models| azure_models+ | azure_anthropic_models| anyscale_models| cerebras_models| galadriel_models@@ -962,6 +966,7 @@ models_by_provider: dict = {"palm": palm_models,"groq": groq_models,"azure": azure_models | azure_text_models,+ "azure_anthropic": azure_anthropic_models,"azure_text": azure_text_models,"anyscale": anyscale_models,"cerebras": cerebras_models,diff --git a/tests/mcp_tests/test_mcp_logging.py b/tests/mcp_tests/test_mcp_logging.pyindex 2b1f2699fd5..44acd60ad49 100644--- a/tests/mcp_tests/test_mcp_logging.py+++ b/tests/mcp_tests/test_mcp_logging.py@@ -2,7 +2,6 @@ import osimport sysimport pytestimport asyncio-import jsonfrom typing import Optionalfrom unittest.mock import AsyncMock, patch@@ -106,7 +105,7 @@ async def test_mcp_cost_tracking():await asyncio.sleep(2)logged_standard_logging_payload = test_logger.standard_logging_payload- print("logged_standard_logging_payload", json.dumps(logged_standard_logging_payload, indent=4))+ print("logged_standard_logging_payload", logged_standard_logging_payload)# Add assertionsassert response is not None@@ -208,7 +207,7 @@ async def test_mcp_cost_tracking_per_tool():await asyncio.sleep(2)logged_standard_logging_payload_1 = test_logger.standard_logging_payload- print("logged_standard_logging_payload_1", json.dumps(logged_standard_logging_payload_1, indent=4))+ print("logged_standard_logging_payload_1", logged_standard_logging_payload_1)# Verify expensive tool costassert logged_standard_logging_payload_1 is not None, "Standard logging payload 1 should not be None"@@ -229,7 +228,7 @@ async def test_mcp_cost_tracking_per_tool():await asyncio.sleep(2)logged_standard_logging_payload_2 = test_logger.standard_logging_payload- print("logged_standard_logging_payload_2", json.dumps(logged_standard_logging_payload_2, indent=4))+ print("logged_standard_logging_payload_2", logged_standard_logging_payload_2)# Verify cheap tool costassert logged_standard_logging_payload_2 is not None, "Standard logging payload 2 should not be None"@@ -340,6 +339,6 @@ async def test_mcp_tool_call_hook():# check logged standard logging payloadlogged_standard_logging_payload = test_logger.standard_logging_payload- print("logged_standard_logging_payload", json.dumps(logged_standard_logging_payload, indent=4))+ print("logged_standard_logging_payload", logged_standard_logging_payload)assert logged_standard_logging_payload is not None, "Standard logging payload should not be None"assert logged_standard_logging_payload["response_cost"] == 1.42