-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: issue-1028, fetch models when user enters api key #3251
base: main
Are you sure you want to change the base?
Conversation
Is it working without issues @normunds-wipo ? |
Yes. I just merged the main branch and had to adjust for encryption/decryption utility return value change (from string to Promise), but else we are using this code for a couple of months without problems. |
I'll try it. What's your case for the reloading fetch? |
The same, query models from LiteLLM. Different users have different keys and potentially different set of models. So we cannot cache all models and need to query models by user. Also once the user enters the key we need to reload models corresponding to the new key. It seems it is doing it correctly. |
This is a useful feature, looking forward to see the PR approved and merged. |
Summary
Solution is intended only for custom configurations. Each time the user enters api key from frontend, it reloads models, including from the endpoint using the new key.
Relevant changes:
It might be working also for default endpoints, as now each time key has been entered, the models get refreshed, but this is not tested.
Change Type
user_provided
API KEY value is used, fetch models for user #1028, fetch user models when user provides API_KEYTesting
Tested just by running code. We are only using custom configuration
Checklist
Please delete any irrelevant options.