Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

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

yassinf9d0cd640976
diff --git a/litellm/proxy/auth/auth_utils.py b/litellm/proxy/auth/auth_utils.py
index d882141fa6f..128b789ee75 100644
--- a/litellm/proxy/auth/auth_utils.py
+++ b/litellm/proxy/auth/auth_utils.py
@@ -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
diff --git a/tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py b/tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py
index 5e3d9c0e43b..64a2eb69325 100644
--- a/tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py
+++ b/tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py
@@ -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)
diff --git a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py
index 2e3c2ceffa3..1230c548281 100644
--- a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py
+++ b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py
@@ -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={},
diff --git a/tests/test_litellm/proxy/proxy_server/test_routes_login_sso.py b/tests/test_litellm/proxy/proxy_server/test_routes_login_sso.py
index 1b4f9bc1cfe..79c23b11f3e 100644
--- a/tests/test_litellm/proxy/proxy_server/test_routes_login_sso.py
+++ b/tests/test_litellm/proxy/proxy_server/test_routes_login_sso.py
@@ -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")