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: hoist the json import to module scope
kerrye8f098f38e05
diff --git a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py b/tests/test_litellm/litellm_core_utils/test_litellm_logging.pyindex f226d30fc27..ab8db5cb409 100644--- a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py+++ b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py@@ -1,6 +1,7 @@import asyncioimport contextlibimport datetime+import jsonimport osimport sysfrom collections.abc import Callable@@ -1225,8 +1226,6 @@ async def test_async_success_handler_truncates_large_base64_off_the_event_loop(mmonkeypatch.setattr(logging_utils, "_truncate_base64_in_string", recording_scan)monkeypatch.setattr(logging_utils, "BASE64_TRUNCATION_OFFLOAD_THRESHOLD_CHARS", 1_000)- import json-logged = asyncio.Event()captured: dict = {}