-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Enhancement]: if user_provided
API KEY value is used, fetch models for user
#1028
Comments
user_provided
API KEY value is used, the model list will not be loadeduser_provided
API KEY value is used, fetch models for user
there's two potential solutions, and both can be added. # 1 might be more useful in your case (using reverse proxies)
|
It should be considered a bug, or at least a design flaw. It's insecure to hardcode API keys into the config files over properly hashing them individually for each user (I haven't confirmed this is how LibreChat handles it, just hopefully assume), so using The only workaround for the user is to specify the models using the |
You can also try to fetch them anyway either if it's an user_provided key or not. Some proxies including the ones above allow to get models without an API key |
This is not how we encourage users to define API keys in the LibreChat config file. While you can directly put in API keys in the config file, it's discouraged, and references to the environment variable names are encouraged instead. i.e this is a valid setting:
The models are fetched on startup, which is why it doesn't happen. They would need to be fetched upon user requests for this to be possible, which is planned. |
guys I do not understand where this discussion is going. I have submitted a PR that fixes this problem. It's around since June and I keep updating so it corresponds to other changes. We are using this long time and are happy, so what is the problem to merge it? Why "plan" something that is already available? |
Contact Details
[email protected]
What happened?
if
user_provided
API KEY value is used, the model list will not be loaded.Screenshot:
But setting the global key fixes it:
Steps to Reproduce
OR
OPENAI_REVERSE_PROXY=https://api.naga.ac/v1/chat/completions
OPENAI_API_KEY=user_provided
What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: