Skip to content

[Bug]: /model/info returns empty data for team-scoped BYOK models (missing team_id in get_model_list call) #30983

Closed

Description

@aanchal22

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

/model/info returns {"data": []} when called with a team key that only has access to team-scoped (BYOK) model deployments. The same key works correctly with /v1/models, which returns the expected model list.

Root cause: In litellm/proxy/proxy_server.py, the /model/info handler calls get_model_list without passing team_id:

# proxy_server.py line ~12484
router_models = llm_router.get_model_list(model_name=model)

Router.get_model_list() already accepts an optional team_id parameter and uses it to look up team_model_to_deployment_indices, but the caller never passes it. Without team_id, _get_all_deployments skips the team index lookup (line ~9831) and falls through to model_name_to_deployment_indices, which is keyed by the internal mangled name (model_name_<team_id>_<uuid>), not the public model name. Result: no match, router_models is None, and the model is silently dropped.

/v1/models works because it calls get_complete_model_list and returns the name strings directly without doing the second deployment resolution step.

Suggested fix (one-liner):

# proxy_server.py, in model_info_v1(), around line 12484
# Before:
router_models = llm_router.get_model_list(model_name=model)

# After:
router_models = llm_router.get_model_list(model_name=model, team_id=user_api_key_dict.team_id)

user_api_key_dict is already available in scope (line 12366).

Related: #28264 describes the same missing-team_id pattern for /v1/models wildcard expansion in model_checks.py. This is a separate call site with the same class of bug.

Steps to Reproduce

  1. Create a team with BYOK models (team-scoped deployments)
  2. Generate a team key
  3. Call GET /v1/models with the team key → returns the model list correctly
  4. Call GET /model/info with the same team key → returns {"data": []}
  5. Call GET /model/info with a master/admin key → returns all models including the team's BYOK models

Expected behavior

/model/info should return deployment details (cost info, max tokens, supported params) for the team's models when called with a team key, consistent with /v1/models.

Actual behavior

/model/info returns {"data": []} for team keys that only have access to team-scoped BYOK deployments.

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on?

v1.89.2 (also reproducible on latest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions