retain ui_routes enum alias for JWT config backwards compatibility

This commit is contained in:
Ryan Crabbe 2026-04-10 08:55:32 -07:00
parent 26e99f22b3
commit 3af7de4222
No known key found for this signature in database
2 changed files with 27 additions and 1 deletions

View file

@ -607,6 +607,32 @@ class LiteLLMRoutes(enum.Enum):
]
)
# Retained for backwards compatibility with JWT auth configs that reference
# "ui_routes" in admin_allowed_routes. Not used by the proxy's own route
# authorization — UI tokens now go through the same RBAC path as API tokens.
ui_routes = [
"/sso",
"/sso/get/ui_settings",
"/get/ui_settings",
"/login",
"/key/info",
"/config",
"/spend",
"/model/info",
"/v2/model/info",
"/v2/key/info",
"/models",
"/v1/models",
"/global/spend",
"/global/spend/logs",
"/global/spend/keys",
"/global/spend/models",
"/global/spend/tags",
"/global/predict/spend/logs",
"/global/activity",
"/health/services",
] + info_routes
internal_user_routes = (
[
"/global/activity",

View file

@ -715,7 +715,7 @@ async def aaaatest_user_token_output(
assert team_result.user_id == user_id
@pytest.mark.parametrize("admin_allowed_routes", [None, ["info_routes"]])
@pytest.mark.parametrize("admin_allowed_routes", [None, ["ui_routes"]])
@pytest.mark.parametrize("audience", [None, "litellm-proxy"])
@pytest.mark.asyncio
async def test_allowed_routes_admin(