From 30c2357fe3c74e6fad1015d6d1e562418b50bbbf Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 11 Apr 2026 16:30:51 -0700 Subject: [PATCH] fix(ui/team): annotate effectiveGuardrails as string[] for strict typecheck The new effectiveGuardrails computation derived its element type from `info.metadata?.guardrails`, which is implicitly typed `any[]`, so the downstream `.map((name) => ...)` callback inferred `name` as implicit `any` and broke the production typecheck. --- ui/litellm-dashboard/src/components/team/TeamInfo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx index 76bd5fa4fce..5b6c716713e 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx @@ -610,10 +610,10 @@ const TeamInfoView: React.FC = ({ const initialKillSwitchOn = info.metadata?.disable_global_guardrails === true; const optedOutGlobals = new Set(info.metadata?.opted_out_global_guardrails || []); - const nonGlobalOptIns = (info.metadata?.guardrails || []).filter( + const nonGlobalOptIns: string[] = (info.metadata?.guardrails || []).filter( (n: string) => !globalGuardrailNames.has(n), ); - const effectiveGuardrails = initialKillSwitchOn + const effectiveGuardrails: string[] = initialKillSwitchOn ? nonGlobalOptIns : [ ...Array.from(globalGuardrailNames).filter((n) => !optedOutGlobals.has(n)),