From f04a5e711386b4584fd13948819310587071c031 Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Wed, 15 Apr 2026 11:55:51 -0700 Subject: [PATCH] fix(ui): render guardrail optional_params bool defaults in Select The bool branch of the guardrail optional params renderer was using string values ("true"/"false") for Select.Option, so when the backend declared a real JS boolean as default_value (e.g. Pillar include_scanners/include_evidence, IBM block_on_detection), antd's Form.Item initialValue did not match any Option and the Select rendered empty. Switching to real boolean Option values lets defaults flow through unchanged. This matches the sibling fix already applied in guardrail_provider_fields.tsx for Noma use_v2. --- .../src/components/guardrails/guardrail_optional_params.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/guardrails/guardrail_optional_params.tsx b/ui/litellm-dashboard/src/components/guardrails/guardrail_optional_params.tsx index 2e51980419d..b352360e505 100644 --- a/ui/litellm-dashboard/src/components/guardrails/guardrail_optional_params.tsx +++ b/ui/litellm-dashboard/src/components/guardrails/guardrail_optional_params.tsx @@ -192,8 +192,8 @@ const GuardrailOptionalParams: React.FC = ({ ) : field.type === "bool" || field.type === "boolean" ? ( ) : field.type === "number" ? (