diff --git a/docs/my-website/docs/proxy/call_hooks.md b/docs/my-website/docs/proxy/call_hooks.md index 2110af3a91..392a47121a 100644 --- a/docs/my-website/docs/proxy/call_hooks.md +++ b/docs/my-website/docs/proxy/call_hooks.md @@ -2,6 +2,7 @@ - Modify data before making llm api calls on proxy - Reject data before making llm api calls / before returning the response +- Enforce 'user' param for all openai endpoint calls See a complete example with our [parallel request rate limiter](https://github.com/BerriAI/litellm/blob/main/litellm/proxy/hooks/parallel_request_limiter.py) @@ -172,4 +173,15 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ } ], }' +``` + +## Advanced - Enforce 'user' param + +Set `enforce_user_param` to true, to require all calls to the openai endpoints to have the 'user' param. + +[**See Code**](https://github.com/BerriAI/litellm/blob/4777921a31c4c70e4d87b927cb233b6a09cd8b51/litellm/proxy/auth/auth_checks.py#L72) + +```yaml +general_settings: + enforce_user_param: True ``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/configs.md b/docs/my-website/docs/proxy/configs.md index b2a7e42ba2..e83125f2a9 100644 --- a/docs/my-website/docs/proxy/configs.md +++ b/docs/my-website/docs/proxy/configs.md @@ -602,6 +602,7 @@ general_settings: "disable_spend_logs": "boolean", # turn off writing each transaction to the db "disable_reset_budget": "boolean", # turn off reset budget scheduled task "enable_jwt_auth": "boolean", # allow proxy admin to auth in via jwt tokens with 'litellm_proxy_admin' in claims + "enforce_user_param": "boolean", # requires all openai endpoint requests to have a 'user' param "allowed_routes": "list", # list of allowed proxy API routes - a user can access. (currently JWT-Auth only) "key_management_system": "google_kms", # either google_kms or azure_kms "master_key": "string",