From 25933b7b25da30c2496ef556d7263f26072282c3 Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Wed, 9 Sep 2026 18:14:54 -0700 Subject: [PATCH] fix(proxy): keep the team-admin field allow-list importable on python 3.10 assert_never landed in typing in 3.11, so importing it from typing broke the 3.10 import smoke job and the py310 typing gate. Take it from typing_extensions like the rest of the proxy does. Also drop /team/update from test_neighbouring_team_routes_stay_closed. The route is self-managed now, so the coarse gate admits the caller and update_team decides, which the sibling test in the same file already asserts. Claude-Session: https://claude.ai/code/session_018PUCupsaarVLJy4iDFx256 --- .../proxy/management_endpoints/team_admin_field_permissions.py | 3 ++- tests/test_litellm/proxy/auth/test_route_checks.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/management_endpoints/team_admin_field_permissions.py b/litellm/proxy/management_endpoints/team_admin_field_permissions.py index 9ccacf9c54f..e26dd993e26 100644 --- a/litellm/proxy/management_endpoints/team_admin_field_permissions.py +++ b/litellm/proxy/management_endpoints/team_admin_field_permissions.py @@ -3,10 +3,11 @@ from collections.abc import Mapping from dataclasses import dataclass from types import MappingProxyType -from typing import Final, Literal, TypeAlias, assert_never +from typing import Final, Literal, TypeAlias from fastapi import HTTPException from pydantic import TypeAdapter, ValidationError +from typing_extensions import assert_never from litellm._logging import verbose_proxy_logger from litellm.models.team import LiteLLM_TeamTable diff --git a/tests/test_litellm/proxy/auth/test_route_checks.py b/tests/test_litellm/proxy/auth/test_route_checks.py index db8947d4998..32da04f946d 100644 --- a/tests/test_litellm/proxy/auth/test_route_checks.py +++ b/tests/test_litellm/proxy/auth/test_route_checks.py @@ -3828,7 +3828,6 @@ def test_team_disable_logging_stays_proxy_admin_only(): "route", [ "/team/06bda574-5ca9-43d3-beb8-3b23c2f17112", - "/team/update", "/team/06bda574-5ca9-43d3-beb8-3b23c2f17112/model/add", ], )