🚅 LiteLLM
@@ -253,3 +264,6 @@ html_form = f"""
"""
+
+
+html_form = build_ui_login_form(show_deprecation_banner=True)
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 5d097ac440..6aef4ab493 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -236,7 +236,7 @@ from litellm.proxy.common_utils.encrypt_decrypt_utils import (
decrypt_value_helper,
encrypt_value_helper,
)
-from litellm.proxy.common_utils.html_forms.ui_login import html_form
+from litellm.proxy.common_utils.html_forms.ui_login import build_ui_login_form
from litellm.proxy.common_utils.http_parsing_utils import (
_read_request_body,
check_file_size_under_limit,
@@ -8306,11 +8306,15 @@ async def fallback_login(request: Request):
# Use UI Credentials set in .env
from fastapi.responses import HTMLResponse
- return HTMLResponse(content=html_form, status_code=200)
+ return HTMLResponse(
+ content=build_ui_login_form(show_deprecation_banner=False), status_code=200
+ )
else:
from fastapi.responses import HTMLResponse
- return HTMLResponse(content=html_form, status_code=200)
+ return HTMLResponse(
+ content=build_ui_login_form(show_deprecation_banner=False), status_code=200
+ )
@router.post(
diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.py
index 76fd37596e..7b99cd0b92 100644
--- a/tests/test_litellm/proxy/test_proxy_server.py
+++ b/tests/test_litellm/proxy/test_proxy_server.py
@@ -124,6 +124,44 @@ def test_login_v2_returns_redirect_url_and_sets_cookie(monkeypatch):
)
+def test_fallback_login_has_no_deprecation_banner(client_no_auth):
+ response = client_no_auth.get("/fallback/login")
+
+ assert response.status_code == 200
+ html = response.text
+ assert '
' not in html
+ assert "Deprecated:" not in html
+ assert "