How LiteLLM runs guardrails at each point of a request: blocking before the model call, running in parallel during it, checking responses after, logging-only mode, default_on, and the latency and cost trade-off of each choice.
Masking or blocking card numbers, identifiers and banned keywords with LiteLLM's local regex and keyword guardrail, with no external service: prebuilt patterns, custom regex, streaming support and where an ML-based detector is still needed.
Using LiteLLM's prompt injection checks, similarity matching against known attacks and an LLM call check, across chat, messages, responses and embeddings endpoints, including tool outputs and text attachments, and handling files it cannot scan.
Stopping API keys, passwords and tokens pasted into prompts from reaching model providers with LiteLLM's hide-secrets guardrail, and where it sits alongside DLP tools.
Running Lakera Guard as a LiteLLM guardrail for prompt attacks and content risks: the lakera_v2 integration, pre_call, during_call and monitor modes, and its limit to the chat completions endpoint.
Applying a Bedrock guardrail to any model behind LiteLLM, not only Bedrock models, through the ApplyGuardrail API: guardrail identifier and version, IAM role assumption and region settings.
Using Azure AI Content Safety at the LiteLLM gateway: Prompt Shield for jailbreak attempts before the call and text moderation on input and output.
Sanitizing prompts and responses with Google Cloud Model Armor templates at the LiteLLM gateway: template and project settings, masking versus blocking, and running on input, in parallel and on output.
Enforcing Microsoft Purview data loss prevention on AI traffic through LiteLLM: Graph processContent, the Entra app permissions, binding keys to Entra user object IDs, and blocking versus audit-only modes.
Scanning prompts, responses and MCP tool calls with Prisma AIRS at the LiteLLM gateway: prompt injection and malicious URL detection, DLP and masking, and choosing fail-open or fail-closed behaviour.
Allowing or denying tool calls by name and type with regex rules across OpenAI tool_calls, Anthropic tool_use and MCP tools, and constraining tool arguments to approved formats.
Grouping guardrails into policies and attaching them to all traffic or to specific teams, keys and models, inheriting and overriding policies, and letting teams register their own guardrails for admin approval.
Calling a self-hosted Guardrails AI server from LiteLLM to run its validators on prompts and responses, and the input format limits of the integration.