LibreChat
LibreChat copied to clipboard
[Enhancement]: if `user_provided` API KEY value is used, fetch models for user
Contact Details
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
- Go to https://chat.naga.ac/
- Try it yourself
OR
- Use
OPENAI_REVERSE_PROXY=https://api.naga.ac/v1/chat/completions
- Use
OPENAI_API_KEY=user_provided
- Enter your NagaAI key on the web page
- Enjoy this issue xDDD
What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
This is by design so not a bug but a feature request. OpenAI doesn't allow model calls without API key, so this will need an added feature
there's two potential solutions, and both can be added. # 1 might be more useful in your case (using reverse proxies)
- add a env var for an API KEY exclusively for fetching available models
- if
user_provided
is set, change the fetch to a different controller, which will read the encrypted key the user provided for the official api