Files
litellm/tests/test_litellm/proxy/auth/test_model_checks.py
T
Krish Dholakia 17d2711cf4 UI - fix invitation link + ensure team models returned when team has 'all-proxy-models' + team only models (#11524)
* fix(onboarding_link.tsx): fix adding ui/invitation id

* fix(onboarding_link.tsx): update invitation link function to handle w/ and w/out custom server path cases

* fix(model_checks.py): ensure team only models returned when all proxy models set for team
2025-06-07 15:19:52 -07:00

22 lines
752 B
Python

from unittest.mock import AsyncMock, patch
import pytest
from litellm.proxy._types import LiteLLM_TeamTable, LiteLLM_UserTable, Member
from litellm.proxy.auth.handle_jwt import JWTAuthManager
def test_get_team_models_for_all_models_and_team_only_models():
from litellm.proxy.auth.model_checks import get_team_models
team_models = ["all-proxy-models", "team-only-model", "team-only-model-2"]
proxy_model_list = ["model1", "model2", "model3"]
model_access_groups = {}
include_model_access_groups = False
result = get_team_models(
team_models, proxy_model_list, model_access_groups, include_model_access_groups
)
combined_models = team_models + proxy_model_list
assert set(result) == set(combined_models)