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(router): type the acreate_file fallback test helpers
mateo-berrib7f4f531b3f8
diff --git a/tests/test_litellm/router_utils/test_fallback_event_handlers.py b/tests/test_litellm/router_utils/test_fallback_event_handlers.pyindex 23e068ef708..24477248a8a 100644--- a/tests/test_litellm/router_utils/test_fallback_event_handlers.py+++ b/tests/test_litellm/router_utils/test_fallback_event_handlers.py@@ -1,4 +1,5 @@import json+from typing import NoReturnfrom unittest.mock import MagicMock, patchimport httpx@@ -167,7 +168,7 @@ async def _acreate_batch(*args, **kwargs):raise AssertionError("only used for its __name__")-async def _acreate_file(*args, **kwargs):+async def _acreate_file(*args: object, **kwargs: object) -> NoReturn:raise AssertionError("only used for its __name__")diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.pyindex 01b288d651b..833e425a3f9 100644--- a/tests/test_litellm/test_router.py+++ b/tests/test_litellm/test_router.py@@ -518,7 +518,7 @@ async def test_async_router_acreate_file_does_not_fall_back_across_model_groups(fallbacks=[{"azure-gpt": ["openai-gpt"]}],)- def fail_azure(*args, **kwargs):+ def fail_azure(*args: object, **kwargs: object) -> MagicMock:if kwargs.get("model") == "azure/my-azure-deployment":raise litellm.APIConnectionError(message="Connection error.",