mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
test(integration): assert team model visibility follows caller scope (#50772)
Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
a390f53628
commit
b161fbf8d2
1 changed files with 3 additions and 2 deletions
|
|
@ -137,12 +137,13 @@ def _v2_team_public_names(gateway: Gateway, key: str, model: str) -> list[JsonVa
|
|||
return [entry["model_info"].get("team_public_model_name") for entry in response.json()["data"]]
|
||||
|
||||
|
||||
def test_v2_model_info_reports_a_team_model_to_team_and_non_team_keys(gateway: Gateway) -> None:
|
||||
def test_v2_model_info_reports_a_team_model_only_to_team_and_admin_keys(gateway: Gateway) -> None:
|
||||
with gateway.scenario() as scenario:
|
||||
team: Final = scenario.team(models=[])
|
||||
model: Final = scenario.model(model_info={"team_id": team})
|
||||
assert _v2_team_public_names(gateway, scenario.key(team_id=team), model) == [model]
|
||||
assert _v2_team_public_names(gateway, scenario.key(), model) == [model]
|
||||
assert _v2_team_public_names(gateway, scenario.key(), model) == []
|
||||
assert _v2_team_public_names(gateway, gateway.key, model) == [model]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("set_on", ["team_new", "team_update"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue