Fix import ordering in TealTiger guardrail

This commit is contained in:
AlphaRex-pixel 2026-10-12 23:05:50 +05:30
parent c63a6d86c1
commit 717d1dd14c
2 changed files with 5 additions and 4 deletions

View file

@ -14,24 +14,25 @@ from collections.abc import Mapping, Sequence
from typing import TYPE_CHECKING, Final, Literal
from fastapi import HTTPException
from litellm._logging import verbose_proxy_logger
from litellm.integrations.custom_guardrail import (
CustomGuardrail,
log_guardrail_information, # pyright: ignore[reportUnknownVariableType] # upstream decorator is untyped
)
from litellm.types.guardrails import GuardrailEventHooks, Mode
from litellm.types.utils import GenericGuardrailAPIInputs
from litellm.types.proxy.guardrails.guardrail_hooks.tealtiger import DEFAULT_POLICIES, Policy, PolicyMode
from litellm.types.utils import GenericGuardrailAPIInputs
from .decision import NO_VIOLATIONS, Action, Decision
from .engine import TealEngine
from .request import identity_of, tool_name_of
if TYPE_CHECKING:
from pydantic import BaseModel
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
from litellm.types.proxy.guardrails.guardrail_hooks.base import GuardrailConfigModel
from pydantic import BaseModel
def _to_event_hook(

View file

@ -6,7 +6,6 @@ from unittest.mock import patch
import pytest
from fastapi import HTTPException
from litellm.types.guardrails import GuardrailEventHooks
from pydantic import ValidationError
from litellm.proxy.guardrails.guardrail_hooks.tealtiger import budget as budget_module
@ -21,6 +20,7 @@ from litellm.proxy.guardrails.guardrail_hooks.tealtiger.request import (
tool_name_of,
)
from litellm.proxy.guardrails.guardrail_hooks.tealtiger.tealtiger import TealTigerGuardrail, _to_event_hook
from litellm.types.guardrails import GuardrailEventHooks
from litellm.types.proxy.guardrails.guardrail_hooks.tealtiger import (
DEFAULT_POLICIES,
CostPolicy,