diff --git a/docs/my-website/docs/proxy/guardrails.md b/docs/my-website/docs/proxy/guardrails.md index 053fa8cab..2cfa3980e 100644 --- a/docs/my-website/docs/proxy/guardrails.md +++ b/docs/my-website/docs/proxy/guardrails.md @@ -266,6 +266,54 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ }' ``` +## Disable team from turning on/off guardrails + + +### 1. Disable team from modifying guardrails + +```bash +curl -X POST 'http://0.0.0.0:4000/team/update' \ +-H 'Authorization: Bearer sk-1234' \ +-H 'Content-Type: application/json' \ +-D '{ + "team_id": "4198d93c-d375-4c83-8d5a-71e7c5473e50", + "metadata": {"guardrails": {"modify_guardrails": false}} +}' +``` + +### 2. Try to disable guardrails for a call + +```bash +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer $LITELLM_VIRTUAL_KEY' \ +--data '{ +"model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "Think of 10 random colors." + } + ], + "metadata": {"guardrails": {"hide_secrets": false}} +}' +``` + +### 3. Get 403 Error + +``` +{ + "error": { + "message": { + "error": "Your team does not have permission to modify guardrails." + }, + "type": "auth_error", + "param": "None", + "code": 403 + } +} +``` + Expect to NOT see `+1 412-612-9992` in your server logs on your callback. :::info