From d960fec551ba40546c07f17553565d4957926b4d Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 13 Feb 2026 19:34:36 -0800 Subject: [PATCH] Add PipelineTestRequest type for test-pipeline endpoint --- litellm/types/proxy/policy_engine/resolver_types.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/litellm/types/proxy/policy_engine/resolver_types.py b/litellm/types/proxy/policy_engine/resolver_types.py index 8a38a5a87c0..a5a2334ae4b 100644 --- a/litellm/types/proxy/policy_engine/resolver_types.py +++ b/litellm/types/proxy/policy_engine/resolver_types.py @@ -302,6 +302,17 @@ class PolicyAttachmentListResponse(BaseModel): # ───────────────────────────────────────────────────────────────────────────── +class PipelineTestRequest(BaseModel): + """Request body for testing a guardrail pipeline with sample messages.""" + + pipeline: Dict[str, Any] = Field( + description="Pipeline definition with 'mode' and 'steps'.", + ) + test_messages: List[Dict[str, str]] = Field( + description="Test messages to run through the pipeline, e.g. [{'role': 'user', 'content': '...'}].", + ) + + class PolicyResolveRequest(BaseModel): """Request body for resolving effective policies/guardrails for a context."""