File tree Expand file tree Collapse file tree 2 files changed +4
-24
lines changed
ui/litellm-dashboard/src/components Expand file tree Collapse file tree 2 files changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -857,10 +857,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
857
857
className = "mt-4"
858
858
help = { premiumUser ? "Select existing guardrails or enter new ones" : "Premium feature - Upgrade to set guardrails by key" }
859
859
>
860
- < Tooltip
861
- title = { ! premiumUser ? "Setting guardrails by key is a premium feature" : "" }
862
- placement = "top"
863
- >
864
860
< Select
865
861
mode = "tags"
866
862
style = { { width : '100%' } }
@@ -872,7 +868,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
872
868
}
873
869
options = { guardrailsList . map ( name => ( { value : name , label : name } ) ) }
874
870
/>
875
- </ Tooltip >
876
871
</ Form . Item >
877
872
< Form . Item
878
873
label = {
@@ -894,10 +889,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
894
889
className = "mt-4"
895
890
help = { premiumUser ? "Select existing prompts or enter new ones" : "Premium feature - Upgrade to set prompts by key" }
896
891
>
897
- < Tooltip
898
- title = { ! premiumUser ? "Setting prompts by key is a premium feature" : "" }
899
- placement = "top"
900
- >
901
892
< Select
902
893
mode = "tags"
903
894
style = { { width : '100%' } }
@@ -909,7 +900,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
909
900
}
910
901
options = { promptsList . map ( name => ( { value : name , label : name } ) ) }
911
902
/>
912
- </ Tooltip >
913
903
</ Form . Item >
914
904
< Form . Item
915
905
label = {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import EditLoggingSettings from "../team/EditLoggingSettings"
11
11
import { extractLoggingSettings , formatMetadataForDisplay } from "../key_info_utils"
12
12
import { fetchMCPAccessGroups } from "../networking"
13
13
import { mapInternalToDisplayNames , mapDisplayToInternalNames } from "../callback_info_helpers"
14
+ import GuardrailSelector from "@/components/guardrails/GuardrailSelector"
14
15
15
16
interface KeyEditViewProps {
16
17
keyData : KeyResponse
@@ -220,20 +221,9 @@ export function KeyEditView({
220
221
</ Form . Item >
221
222
222
223
< Form . Item label = "Guardrails" name = "guardrails" >
223
- < Tooltip title = { ! premiumUser ? "Setting guardrails by key is a premium feature" : "" } placement = "top" >
224
- < Select
225
- mode = "tags"
226
- style = { { width : "100%" } }
227
- disabled = { ! premiumUser }
228
- placeholder = {
229
- ! premiumUser
230
- ? "Premium feature - Upgrade to set guardrails by key"
231
- : Array . isArray ( keyData . metadata ?. guardrails ) && keyData . metadata . guardrails . length > 0
232
- ? `Current: ${ keyData . metadata . guardrails . join ( ", " ) } `
233
- : "Select or enter guardrails"
234
- }
235
- />
236
- </ Tooltip >
224
+ { accessToken &&
225
+ < GuardrailSelector onChange = { ( v ) => { form . setFieldValue ( "guardrails" , v ) } } accessToken = { accessToken } />
226
+ }
237
227
</ Form . Item >
238
228
239
229
< Form . Item label = "Prompts" name = "prompts" >
You can’t perform that action at this time.
0 commit comments