diff --git a/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx b/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx index a29527a20fa..6e93e64d760 100644 --- a/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx +++ b/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx @@ -159,15 +159,21 @@ interface ClassificationMethodConfigProps { showValidationErrors?: boolean; /** The resolved default model - see resolveComplexityDefaultModel. Names and gates the radio. */ defaultModel?: string; + /** Mirrors the backend's proxy-admin-only heuristic_v2 write gate. */ + allowHeuristicV2?: boolean; } const ClassifierTypeRadios: React.FC<{ value: ComplexityRouterConfigValue; classifierType: ClassifierType; onTypeChange: (classifierType: ClassifierType) => void; -}> = ({ value, classifierType, onTypeChange }) => { + allowHeuristicV2: boolean; +}> = ({ value, classifierType, onTypeChange, allowHeuristicV2 }) => { const scorerLocked = Boolean(value.custom_tier_set); const scorerLockedReason = restrictedBy(value, "heuristicClassifier")?.reason; + const heuristicV2Locked = scorerLocked || !allowHeuristicV2; + const heuristicV2LockedReason = + scorerLockedReason ?? (!allowHeuristicV2 ? "Only proxy admins can configure Heuristic v2." : undefined); return ( - +