mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge pull request #3663 from msabramo/msabramo/allow-non-admins-to-use-openai-routes
Allow non-admins to use `/engines/{model}/chat/completions`
This commit is contained in:
commit
ea976d8c30
3 changed files with 58 additions and 3 deletions
|
@ -1076,6 +1076,8 @@ async def user_api_key_auth(
|
|||
if not _is_user_proxy_admin(user_id_information): # if non-admin
|
||||
if route in LiteLLMRoutes.openai_routes.value:
|
||||
pass
|
||||
elif request['route'].name in LiteLLMRoutes.openai_route_names.value:
|
||||
pass
|
||||
elif (
|
||||
route in LiteLLMRoutes.info_routes.value
|
||||
): # check if user allowed to call an info route
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue