mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(auth): pass llm_router to _check_team_member_model_access
Without the router, _can_object_call_model cannot resolve wildcard model names (e.g. openai/*) or access-group names in allowed_models, causing legitimate requests to be denied. Thread the existing llm_router from _run_common_checks through to the new member-scope check.
This commit is contained in:
parent
48ecd59aa5
commit
ed9009347b
1 changed files with 3 additions and 1 deletions
|
|
@ -435,6 +435,7 @@ async def common_checks( # noqa: PLR0915
|
|||
model=_model,
|
||||
team_object=team_object,
|
||||
valid_token=valid_token,
|
||||
llm_router=llm_router,
|
||||
prisma_client=prisma_client,
|
||||
user_api_key_cache=user_api_key_cache,
|
||||
proxy_logging_obj=proxy_logging_obj,
|
||||
|
|
@ -3085,6 +3086,7 @@ async def _check_team_member_model_access(
|
|||
model: Union[str, List[str]],
|
||||
team_object: LiteLLM_TeamTable,
|
||||
valid_token: UserAPIKeyAuth,
|
||||
llm_router: Optional[Router],
|
||||
prisma_client: Optional["PrismaClient"],
|
||||
user_api_key_cache: DualCache,
|
||||
proxy_logging_obj: ProxyLogging,
|
||||
|
|
@ -3119,7 +3121,7 @@ async def _check_team_member_model_access(
|
|||
try:
|
||||
_can_object_call_model(
|
||||
model=model,
|
||||
llm_router=None,
|
||||
llm_router=llm_router,
|
||||
models=member_allowed_models,
|
||||
object_type="team",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue