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]

Fix import error

Sameer Kankuteb0ac74c55614
diff --git a/litellm/_logging.py b/litellm/_logging.py
index 73a08469838..96035227f9d 100644
--- a/litellm/_logging.py
+++ b/litellm/_logging.py
@@ -1,10 +1,11 @@
import ast
import logging
import os
+import re
import sys
from datetime import datetime
from logging import Formatter
-from typing import Any, Dict, Optional
+from typing import Any, Dict, List, Optional
from litellm.litellm_core_utils.safe_json_dumps import safe_dumps
from litellm.litellm_core_utils.safe_json_loads import safe_json_loads
@@ -21,6 +22,8 @@ _ENABLE_SECRET_REDACTION = (
os.getenv("LITELLM_DISABLE_REDACT_SECRETS", "").lower() != "true"
)
+_REDACTED = "REDACTED"
+
def _build_secret_patterns() -> re.Pattern: