Skip to content

[feature] Adubatl/model fetching poc #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

adubatl
Copy link

@adubatl adubatl commented Feb 20, 2025

📥 Pull Request

I originally wanted to be super fancy and hit a bunch of apis buuuuut then noticed litellm has built in model/provider mappings so I went to use that.

Once I got to testing a list of 500~ models was horrific, attempted to enable search but the inquirer we chose doesnt do any of that fancy stuff.

So that lead to me replacing the lib with a diff one and trying to preserve all of the flavor and soul in the existing wizard, but with a better lib for the future of the app.

📘 Description
🙏 🕯️ 🙏
We would like to take this moment to thank inquirer for their/its service.
🙏 🕯️ 🙏

Questionary seems like a more active and up to date tool, its probably overkill, but it had search yaaaay.

Its got a lot more support for robust CLI interactivity, and more importantly... it let me search a much longer model list lol.

Replaced all inquirer with questionary. There is yet another inquirer model included in the exampled poetry locks but thats not my concern just yet.

  1. models are determined from the litellm package litellm.models_by_provider giving us the models in our expected format by default 🥇
  2. search is enabled for the now much more thicc model list 🔍
  3. a script to check that this is working is added too so you can test it and debug as we see how this works.

TODO

  1. testing, the repo needs the testing love, I shant push without some tests
  2. validation - the errors are handled better by questionary IMO, but I need to add custom message text

🧪 Testing
I tried one model and it worked. Ill validate more later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use uv instead of poetry

@bboynton97
Copy link
Contributor

overall comment, i would say undo the linter changes. there's a ton of noise in this pr. if we want to make linter changes, it'd be better to apply it as a rule to the entire codebase and require it as github check (i.e. what we did with ruff). otherwise people's IDE's will be competing with each other

@bboynton97 bboynton97 marked this pull request as ready for review February 21, 2025 02:04
@bboynton97
Copy link
Contributor

moved it out of draft to run tests

@adubatl
Copy link
Author

adubatl commented Feb 21, 2025

I had this as a draft cause I was just messin around getting to understand the codebase - happy to close it out or take it back to my fork and play there! Don't wanna bog you down with a feature change thats just nice to have if it aint the focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants