mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(proxy/_types.py): handle user_email=None
This commit is contained in:
parent
6034187aa5
commit
2d1082f520
3 changed files with 8 additions and 2 deletions
|
@ -18,4 +18,9 @@ router_settings:
|
|||
general_settings:
|
||||
enable_jwt_auth: True
|
||||
litellm_jwtauth:
|
||||
admin_jwt_scope: "ai.admin"
|
||||
admin_jwt_scope: "ai.admin"
|
||||
# team_id_jwt_field: "client_id" # 👈 CAN BE ANY FIELD
|
||||
user_id_jwt_field: "sub" # 👈 CAN BE ANY FIELD
|
||||
org_id_jwt_field: "org_id" # 👈 CAN BE ANY FIELD
|
||||
end_user_id_jwt_field: "customer_id" # 👈 CAN BE ANY FIELD
|
||||
user_id_upsert: True
|
|
@ -1631,7 +1631,7 @@ class LiteLLM_UserTable(LiteLLMPydanticObjectBase):
|
|||
|
||||
class LiteLLM_UserTableFiltered(BaseModel): # done to avoid exposing sensitive data
|
||||
user_id: str
|
||||
user_email: str
|
||||
user_email: Optional[str] = None
|
||||
|
||||
|
||||
class LiteLLM_UserTableWithKeyCount(LiteLLM_UserTable):
|
||||
|
|
|
@ -1240,4 +1240,5 @@ async def ui_view_users(
|
|||
return [LiteLLM_UserTableFiltered(**user.model_dump()) for user in users]
|
||||
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.exception(f"Error searching users: {str(e)}")
|
||||
raise HTTPException(status_code=500, detail=f"Error searching users: {str(e)}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue