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]

Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_scan_only_tool_results

mateo-berri3c808f9c8f7f
diff --cc litellm/types/guardrails.py
index 3eb8faf91dc,60c3830fbef..6b354a39101
--- a/litellm/types/guardrails.py
+++ b/litellm/types/guardrails.py
@@@ -757,18 -753,8 +753,18 @@@ class BaseLitellmParams(ContentFilterCo
),
)
- scan_only_tool_results: Optional[bool] = Field(
++ scan_only_tool_results: bool | None = Field(
+ default=None,
+ description=(
+ "When True, unified guardrails only evaluate tool results, the untrusted data an "
+ "agent feeds back into the model, and skip system, user, and assistant content. "
+ "Intended for agent harnesses whose own prompt scaffolding is trusted but often "
+ "trips prompt-attack detectors."
+ ),
+ )
+
# Lakera specific params
- category_thresholds: Optional[LakeraCategoryThresholds] = Field(
+ category_thresholds: LakeraCategoryThresholds | None = Field(
default=None,
description="Threshold configuration for Lakera guardrail categories",
)