Skip to content

[litellm] Fix model ID input component #1428

@dlqqq

Description

@dlqqq

Description

The MUI autocomplete component used to show model ID suggestions is buggy and needs to be fixed before #1426 is merged. This was added in #1425.

Known issues:

  • Suggestions only update sometimes when typing.
  • The suggestions include results that don't match the user input whatsoever.
  • (optional) The matched portion of each suggestion is not bolded.

Proposed solution

  • Implement a custom function that computes the list of model ID suggestions and make sure this is called every time the user input changes.

  • Ensure that the model ID suggestions match the user input. I should not see "azure/" models if I type "bedrock/".

  • (optional) For each model ID suggestion, bold/highlight the substrings that match the current input, to show why a model ID suggestion is being shown.

I recommend looking into the fuzzysort package on NPM for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions