-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: fixed model not loading, even after baseUrl set in .env file #816
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recognizing the baseurl set in the .env.local however is not displaying in the provider tab it is showing as blank, but debug tab shows the correct baseURL, This problem existed before this PR though and I can address it in a future on.
I was not aiming to sync the env urls with settings tab. as it can have weird consequences like and if it should not sync then people who does not know about setting tab and only using env file, if they change the url in env file and it was previously added in the settings tab then the new url in env will not work anymore they have to clear the cache. |
what we can do is add an indicator in the provider tab that shows that the baseUrl is already set from env file, and if you want to override that you can add a new one in the text box |
@dustinwloring1988 check now |
@thecodacus Thanks, love it |
Fix Model List Loading from Environment Variables
Overview
This PR fixes a critical issue where model lists were not properly loading when configured via environment variables. Previously, the application would fail to recognize models configured in
.env
files, leading to incomplete model lists and potential connectivity issues.Key Changes
1. Environment Variable Resolution
2. API Key and Provider Settings
3. Model List Initialization
initializeModelList
to accept comprehensive optionsTechnical Details
Environment Variable Resolution
The core fix involves proper cascade of environment variables. Example from Together provider:
Model List Initialization Changes
Key changes to the initialization function:
Provider Updates
Updated provider type definition to support server environment:
Testing
Migration Impact
Future Improvements