mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
* fix(proxy): expand config-defined model access groups when resolving team models for /v2/model/info Teams whose only model grant is a config-defined access group (a model_info.access_groups name listed in team.models) got an empty /v2/model/info?include_team_models=true result. _add_team_models_to_all_models passed each team.models entry straight to llm_router.get_model_list(model_name=...), which never matches an access-group name, so the group's member deployments were dropped. Runtime auth and /v1/models were unaffected because they expand team.models through get_team_models first. Resolve team.models through the same get_team_models resolver before iterating, reusing the exact path runtime auth and /v1/models trust so the two can't drift again. The get_model_names and get_model_access_groups accessors are hoisted above the team loop so they run once. * fix(proxy): keep a literal model whose name collides with an access-group name in listings A grant string that names both a deployed model and a config access group grants BOTH at runtime (_check_model_access_helper unions them), but the listing resolver dropped the literal and substituted the group members, hiding a callable model from /v1/models and /v2/model/info. Keep the literal when it is also a deployed model so listings match runtime access exactly. Pure-group names (no collision) are still replaced by their members. Also rewrites _get_models_from_access_groups to build its result without mutating the input list. Addresses the Greptile P1 on this PR. * fix(proxy): type proxy_model_list param as Sequence to satisfy LIT001 budget |
||
|---|---|---|
| .. | ||
| .coverage_baseline | ||
| __init__.py | ||
| _coverage_check.py | ||
| _pin_check.py | ||
| conftest.py | ||
| test_background_health.py | ||
| test_exception_handlers.py | ||
| test_harness_smoke.py | ||
| test_lifecycle.py | ||
| test_openapi_customization.py | ||
| test_proxy_config.py | ||
| test_routes_anthropic_beta.py | ||
| test_routes_assistants.py | ||
| test_routes_audio.py | ||
| test_routes_chat_completions.py | ||
| test_routes_completions.py | ||
| test_routes_config.py | ||
| test_routes_embeddings.py | ||
| test_routes_invitation.py | ||
| test_routes_login_sso.py | ||
| test_routes_misc.py | ||
| test_routes_model_cost_map.py | ||
| test_routes_model_info.py | ||
| test_routes_model_metrics.py | ||
| test_routes_models.py | ||
| test_routes_moderations.py | ||
| test_routes_onboarding.py | ||
| test_routes_queue.py | ||
| test_routes_threads.py | ||
| test_routes_utils.py | ||
| test_spend_counters.py | ||
| test_streaming_helpers.py | ||
| test_team_model_name_translation.py | ||