diff --git a/ui/litellm-dashboard/src/components/policies/pipeline_flow_builder.tsx b/ui/litellm-dashboard/src/components/policies/pipeline_flow_builder.tsx index 8d3b386c0f6..01318378321 100644 --- a/ui/litellm-dashboard/src/components/policies/pipeline_flow_builder.tsx +++ b/ui/litellm-dashboard/src/components/policies/pipeline_flow_builder.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Select, Typography, Tag, message } from "antd"; +import { Select, Typography, message } from "antd"; import { Button, TextInput } from "@tremor/react"; import { ArrowLeftIcon, PlusIcon, TrashIcon } from "@heroicons/react/outline"; import { GuardrailPipeline, PipelineStep, PolicyCreateRequest, PolicyUpdateRequest, Policy } from "./types"; @@ -55,39 +55,36 @@ interface ConnectorProps { } const Connector: React.FC = ({ onInsert }) => ( -
-
+
+
-
+
); @@ -116,52 +113,32 @@ const StepCard: React.FC = ({ return (
- {/* Header */} -
-
- - GUARDRAIL - - {step.guardrail || "Select guardrail..."} -
-
- - Step {stepIndex + 1} - - -
-
- - {/* Guardrail Selector */} -
- - Guardrail - + {/* Row 1: GUARDRAIL label + selector + step number + delete */} +
+ + GUARDRAIL + onChange({ on_pass: value as PipelineStep["on_pass"] })} - options={ACTION_OPTIONS} - /> - {step.on_pass === "modify_response" && ( -
- onChange({ modify_response_message: e.target.value || null })} - /> -
- )} + {/* Row 2: ON PASS + ON FAIL inline */} +
+
+ + ON PASS + + onChange({ on_fail: value as PipelineStep["on_fail"] })} + options={ACTION_OPTIONS} + /> +
- {/* ON FAIL */} -
- - ON FAIL - -