test(faros): proxy admin placeholder user id is not reported as a Faros user

https://claude.ai/code/session_01S79266vJDYzh7ay3nQ9ENW
This commit is contained in:
mateo-berri 2026-06-10 21:18:48 +00:00
parent a547735dd4
commit a9aa4337a9
No known key found for this signature in database

View file

@ -73,6 +73,25 @@ async def test_user_uid_resolution_priority():
]
@pytest.mark.asyncio
async def test_proxy_admin_placeholder_is_not_a_user():
from litellm.constants import LITELLM_PROXY_ADMIN_NAME
logger = make_logger()
await logger.async_log_success_event(
make_kwargs(user_id=LITELLM_PROXY_ADMIN_NAME, end_user="cust"),
None,
None,
None,
)
await logger.async_log_success_event(
make_kwargs(user_id=LITELLM_PROXY_ADMIN_NAME), None, None, None
)
assert [record["user_uid"] for record in logger.log_queue] == ["cust", "unknown"]
@pytest.mark.asyncio
async def test_proxy_admin_placeholder_user_id_is_ignored():
logger = make_logger()