diff --git a/litellm/proxy/common_utils/html_forms/ui_login.py b/litellm/proxy/common_utils/html_forms/ui_login.py index 8478d41e47..42cfb592a7 100644 --- a/litellm/proxy/common_utils/html_forms/ui_login.py +++ b/litellm/proxy/common_utils/html_forms/ui_login.py @@ -8,7 +8,22 @@ if server_root_path != "": url_to_redirect_to += server_root_path url_to_redirect_to += "/login" new_ui_login_url = get_custom_url("", "ui/login") -html_form = f""" + + +def build_ui_login_form(show_deprecation_banner: bool = False) -> str: + banner_html = ( + f""" +
+ Deprecated: Logging in with username and password on this page is deprecated. + Please use the new login page instead. + This page will be dedicated to signing in via SSO in the future. +
+ """ + if show_deprecation_banner + else "" + ) + + return f""" @@ -209,11 +224,7 @@ html_form = f"""
-
- Deprecated: Logging in with username and password on this page is deprecated. - Please use the new login page instead. - This page will be dedicated to signing in via SSO in the future. -
+ {banner_html}