Skip to content

[Feature]: All model_group_alias should show up in /models,/model/info,/model_group/info #5524

Description

@taralika

The Feature

When the proxy-config.yaml has:

router_settings:
  model_group_alias: {"alias-1": "model-group-1"}
model_list:
  - model_name: model-group-1
    litellm_params:
      model: azure/gpt-1
      api_base: https://xyz1.openai.azure.com/
      api_key: os.environ/AOAI_KEY
  - model_name: model-group-1
    litellm_params:
      model: azure/gpt-2
      api_base: https://xyz2.openai.azure.com/
      api_key: os.environ/AOAI_KEY

Response for GET /models should look like this:

{
      "id": "model-group-1",
      "object": "model",
      "created": 1677610602,
      "owned_by": "openai"
},
{
      "id": "alias-1",
      "object": "model",
      "created": 1677610602,
      "owned_by": "openai"
}

Response for GET /model/info should look like this:

{
      "model_name": "model-group-1",
      "litellm_params": {
        "api_base": "https://xyz1.openai.azure.com/",
        "model": "azure/gpt-1"
      },
      "model_info": {
        "id": "8eefdf61e375ace21356414a23782159e703c6afe66eb7b46a3a17a2095f53b1",
        "db_model": false,
        "key": "azure/gpt-1",
        ...
      }
},
{
      "model_name": "model-group-1",
      "litellm_params": {
        "api_base": "https://xyz2.openai.azure.com/",
        "model": "azure/gpt-2"
      },
      "model_info": {
        "id": "8eefdf61e375ace21356414a23782159e703c6afe66eb7b46a3a17a2095f53b1",
        "db_model": false,
        "key": "azure/gpt-2",
        ...
      }
},
{
      "model_name": "alias-1",
      "litellm_params": {
        "api_base": "https://xyz1.openai.azure.com/",
        "model": "azure/gpt-1"
      },
      "model_info": {
        "id": "8eefdf61e375ace21356414a23782159e703c6afe66eb7b46a3a17a2095f53b1",
        "db_model": false,
        "key": "azure/gpt-1",
        ...
      }
},
{
      "model_name": "alias-1",
      "litellm_params": {
        "api_base": "https://xyz2.openai.azure.com/",
        "model": "azure/gpt-2"
      },
      "model_info": {
        "id": "8eefdf61e375ace21356414a23782159e703c6afe66eb7b46a3a17a2095f53b1",
        "db_model": false,
        "key": "azure/gpt-2",
        ...
      }
}

Response for GET /model_group/info should look like:

{
  "model_group": "model-group-1",
      "providers": [
        "azure"
      ],
      ...
},
{
  "model_group": "alias-1",
      "providers": [
        "azure"
      ],
      ...
}

Motivation, pitch

Users of litellm proxy have no idea what aliases are available, they can only see the model group names. Please expose the aliases at same level as model group names so users of the litellm proxy can take advantage of the aliases as well.

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions