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
style: move import os to module level, fix import ordering
usera4faacecafc3
diff --git a/litellm/proxy/guardrails/guardrail_endpoints.py b/litellm/proxy/guardrails/guardrail_endpoints.pyindex 5163b212b20..b38b5bb1f6a 100644--- a/litellm/proxy/guardrails/guardrail_endpoints.py+++ b/litellm/proxy/guardrails/guardrail_endpoints.py@@ -5,14 +5,15 @@ CRUD ENDPOINTS FOR GUARDRAILSimport concurrent.futuresimport inspectimport json+import osfrom datetime import datetime, timezonefrom typing import Any, Dict, List, Optional, Type, TypeVar, Union, castfrom urllib.parse import urlparsefrom fastapi import APIRouter, Depends, HTTPException+from pydantic import BaseModelfrom litellm.proxy.common_utils.path_utils import safe_join-from pydantic import BaseModelfrom litellm._logging import verbose_proxy_loggerfrom litellm.constants import DEFAULT_MAX_RECURSE_DEPTH@@ -1350,8 +1351,6 @@ async def get_category_yaml(category_name: str):Returns:The raw YAML or JSON content of the category file with file type indicator"""- import os-# Get the categories directory pathcategories_dir = os.path.join(os.path.dirname(__file__),@@ -1408,8 +1407,6 @@ async def get_major_airlines():Get the major airlines list from IATA (competitor intent, airline type).Returns airline id, match variants (pipe-separated), and tags."""- import os-airlines_path = os.path.join(os.path.dirname(__file__),"guardrail_hooks",