This commit is contained in:
Shubham Kothari 2026-08-26 13:56:26 -04:00 • committed by GitHub
commit b3e51f30b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 3599 additions and 0 deletions

View file

@ -0,0 +1,72 @@
from typing import TYPE_CHECKING, Final, Protocol
from litellm.secret_managers.main import get_secret_str
from litellm.types.guardrails import SupportedGuardrailIntegrations
from .pointguardai import PointGuardAIGuardrail
if TYPE_CHECKING:
from litellm.types.guardrails import Guardrail, LitellmParams
class _CallbackRegistrar(Protocol):
def add_litellm_callback(self, callback: PointGuardAIGuardrail) -> None: ...
def _resolve_secret_reference(value: str | None) -> str | None:
if value is not None and value.startswith("os.environ/"):
return get_secret_str(value)
return value
def initialize_guardrail(
litellm_params: "LitellmParams",
guardrail: "Guardrail",
callback_manager: _CallbackRegistrar | None = None,
) -> PointGuardAIGuardrail:
import litellm
configured_fields_value: Final = getattr(litellm_params, "model_fields_set", None)
configured_fields: Final = (
configured_fields_value
if configured_fields_value is not None
else getattr(litellm_params, "__fields_set__", frozenset())
)
unreachable_fallback: Final = (
litellm_params.unreachable_fallback if "unreachable_fallback" in configured_fields else "fail_closed"
)
pointguardai_guardrail: Final = PointGuardAIGuardrail(
guardrail_name=guardrail.get("guardrail_name"),
api_key=litellm_params.api_key,
api_base=litellm_params.api_base,
org_code=_resolve_secret_reference(litellm_params.org_code),
policy_config_name=_resolve_secret_reference(litellm_params.policy_config_name),
unreachable_fallback=unreachable_fallback,
default_on=litellm_params.default_on or False,
event_hook=litellm_params.mode,
)
if callback_manager is None:
litellm.logging_callback_manager.add_litellm_callback(pointguardai_guardrail)
else:
callback_manager.add_litellm_callback(pointguardai_guardrail)
return pointguardai_guardrail
guardrail_initializer_registry: Final = { # mutable-ok: LiteLLM registry contract requires a dictionary
SupportedGuardrailIntegrations.POINTGUARDAI.value: initialize_guardrail,
}
guardrail_class_registry: Final = { # mutable-ok: LiteLLM registry contract requires a dictionary
SupportedGuardrailIntegrations.POINTGUARDAI.value: PointGuardAIGuardrail,
}
__all__: Final = (
"PointGuardAIGuardrail",
"guardrail_class_registry",
"guardrail_initializer_registry",
"initialize_guardrail",
)

File diff suppressed because it is too large Load diff

View file

@ -39,6 +39,9 @@ from litellm.types.proxy.guardrails.guardrail_hooks.litellm_content_filter impor
from litellm.types.proxy.guardrails.guardrail_hooks.ovalix import (
OvalixGuardrailConfigModel,
)
from litellm.types.proxy.guardrails.guardrail_hooks.pointguardai import (
PointGuardAIGuardrailConfigModel,
)
from litellm.types.proxy.guardrails.guardrail_hooks.promptguard import (
PromptGuardConfigModel,
)
@ -134,6 +137,7 @@ class SupportedGuardrailIntegrations(Enum):
HEADROOM = "headroom"
COMPRESR = "compresr"
STRAIKER = "straiker"
POINTGUARDAI = "pointguard_ai"
class Role(Enum):
@ -989,6 +993,7 @@ class LitellmParams(
ZscalerAIGuardConfigModel,
AktoConfigModel,
JavelinGuardrailConfigModel,
PointGuardAIGuardrailConfigModel,
BaseLitellmParams,
EnkryptAIGuardrailConfigs,
IBMGuardrailsBaseConfigModel,

View file

@ -0,0 +1,37 @@
from typing import Literal
from pydantic import Field
from .base import GuardrailConfigModel
class PointGuardAIGuardrailConfigModel(GuardrailConfigModel):
"""Configuration parameters for the PointGuardAI v2 guardrail"""
org_code: str | None = Field(
default=None,
description="Organization code for PointGuardAI.",
)
api_base: str | None = Field(
default=None,
description="Base URL for PointGuardAI. Defaults to https://api.appsoc.com.",
)
api_key: str | None = Field(
default=None,
description="API key for PointGuardAI.",
)
policy_config_name: str | None = Field(
default=None,
description="PointGuardAI policy configuration name.",
)
unreachable_fallback: Literal["fail_closed", "fail_open"] = Field(
default="fail_closed",
description=(
"Behavior when PointGuardAI is unreachable. 'fail_closed' raises an error "
"(default); 'fail_open' logs a critical error and allows the request."
),
)
@staticmethod
def ui_friendly_name() -> str:
return "PointGuard AI"

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -300,6 +300,12 @@ export const GUARDRAIL_PRESETS: Record<string, GuardrailPreset> = {
mode: "pre_call",
defaultOn: false,
},
pointguardai: {
provider: "PointguardAi",
guardrailNameSuggestion: "PointGuard AI",
mode: "pre_call",
defaultOn: false,
},
repelloai: {
provider: "Repelloai",
guardrailNameSuggestion: "RepelloAI Argus",

View file

@ -25,6 +25,7 @@ const EXPECTED_PARTNER_LOGO_FILES: Record<string, string> = {
promptguard: "promptguard.svg",
xecguard: "xecguard.svg",
deepkeep: "deepkeep.svg",
pointguardai: "pointguardai.png",
repelloai: "repelloai.png",
straiker: "straiker.svg",
};

View file

@ -444,6 +444,16 @@ export const PARTNER_GUARDRAIL_CARDS: GuardrailCardInfo[] = [
tags: ["Security", "Prompt Injection", "PII", "Firewall"],
providerKey: "Deepkeep",
},
{
id: "pointguardai",
name: "PointGuard AI",
description:
"PointGuard AI runtime guardrails inspect prompts and responses for prompt injection, sensitive data exposure, harmful content, and policy violations.",
category: "partner",
logo: guardrailLogoMap["PointGuard AI"],
tags: ["Security", "Prompt Injection", "Data Protection", "Policy"],
providerKey: "PointguardAi",
},
{
id: "repelloai",
name: "RepelloAI Argus",

View file

@ -18,6 +18,7 @@ import openaiSmallLogo from "../../../../../public/assets/logos/openai_small.svg
import paloAltoNetworksLogo from "../../../../../public/assets/logos/palo_alto_networks.jpeg";
import pangeaLogo from "../../../../../public/assets/logos/pangea.png";
import pillarLogo from "../../../../../public/assets/logos/pillar.jpeg";
import pointguardAiLogo from "../../../../../public/assets/logos/pointguardai.png";
import promptSecurityLogo from "../../../../../public/assets/logos/prompt_security.png";
import promptguardLogo from "../../../../../public/assets/logos/promptguard.svg";
import qohashLogo from "../../../../../public/assets/logos/qohash.jpg";
@ -81,6 +82,7 @@ export const guardrail_provider_map: Record<string, string> = {
LlmAsAJudge: "llm_as_a_judge",
Xecguard: "xecguard",
Deepkeep: "deepkeep",
PointguardAi: "pointguard_ai",
QostodianNexus: "qostodian_nexus",
Repelloai: "repelloai",
};
@ -201,6 +203,7 @@ export const guardrailLogoMap = {
"LiteLLM LLM as a Judge": litellmLogo.src,
Akto: aktoLogo.src,
"DeepKeep AI Firewall": deepkeepLogo.src,
"PointGuard AI": pointguardAiLogo.src,
"Qostodian Nexus": qohashLogo.src,
"RepelloAI Argus": repelloAiLogo.src,
Straiker: straikerLogo.src,