chore(proxy): drop explanatory docstrings from credentials hint helper and tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yassin 2026-09-14 19:29:30 +00:00
parent 9ff0dea139
commit f9d0cd6409
4 changed files with 0 additions and 9 deletions

View file

@ -553,10 +553,6 @@ def _coerce_metadata_to_dict(value: Any) -> dict[str, Any] | None:
def should_hide_default_credentials_hint(general_settings: Mapping[str, object]) -> bool:
"""
Whether login pages hide the "admin / MASTER_KEY" hint: explicit opt-in, or a
non-empty UI_PASSWORD, which makes that hint wrong. UI_USERNAME alone keeps it.
"""
return (
os.getenv("LITELLM_HIDE_DEFAULT_CREDENTIALS_HINT", "false").lower() == "true"
or general_settings.get("hide_default_credentials_hint", False) is True

View file

@ -350,7 +350,6 @@ def test_ui_discovery_endpoints_hide_default_credentials_hint_default_false():
def test_ui_discovery_endpoints_hide_default_credentials_hint_when_ui_password_set():
"""A non-empty UI_PASSWORD hides the card: 'admin / MASTER_KEY' is no longer the login."""
app = FastAPI()
app.include_router(router)
client = TestClient(app)
@ -372,7 +371,6 @@ def test_ui_discovery_endpoints_hide_default_credentials_hint_when_ui_password_s
],
)
def test_ui_discovery_endpoints_keeps_default_credentials_hint_without_real_ui_password(env_overrides):
"""Only a non-empty UI_PASSWORD counts as custom credentials; the hint stays accurate otherwise."""
app = FastAPI()
app.include_router(router)
client = TestClient(app)

View file

@ -8389,8 +8389,6 @@ async def test_legacy_login_page_hides_credentials_hint_via_general_settings():
@pytest.mark.asyncio
async def test_legacy_login_page_hides_credentials_hint_when_ui_password_set():
"""Regression: the legacy page shares the rule with the discovery endpoint, so a non-empty
UI_PASSWORD hides the now-inaccurate 'admin / MASTER_KEY' hint here too."""
response = await _render_legacy_login_page(
env_overrides={"UI_PASSWORD": "s3cret-pass"},
general_settings={},

View file

@ -106,7 +106,6 @@ def test_fallback_login_shows_credentials_hint_by_default(client, monkeypatch):
def test_fallback_login_hides_credentials_hint_when_ui_password_set(client, monkeypatch):
"""Regression: a non-empty UI_PASSWORD means 'admin / MASTER_KEY' is wrong, so the hint must go."""
monkeypatch.setenv("UI_PASSWORD", "s3cret-pass")
monkeypatch.delenv("LITELLM_HIDE_DEFAULT_CREDENTIALS_HINT", raising=False)
response = client.get("/fallback/login")