- 
                Notifications
    
You must be signed in to change notification settings  - Fork 307
 
feat: enable Supabase AI during local development #1986
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
Conversation
          Pull Request Test Coverage Report for Build 8043579157Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes. 
 Details
 
 
 💛 - Coveralls | 
    
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.
LGTM with a minor nitpick. Thanks for contributing!
Also, could you confirm that AI assistant is working after adding the api key?
| 
           I tested it and now it works. It also shows a warning now when people use AI features without specifying the environment variables, so that is nice! However, it talks about  Also, I'm wondering whether the config reads   | 
    
          
 Yes it does, but only when   | 
    
          
 That's cool! I have my env file at   | 
    
| 
           It needs to be   | 
    
          
 Oh I misread siblings and thought of children, sry for the confusion. But yes, I agree it would be great to also support  Regarding this PR, is there anything else I need to do?  | 
    
| 
           It's all good. Our release process is currently broken. I will merge this PR once it's fixed.  | 
    
What kind of change does this PR introduce?
Allows users to bring their own OpenAI API key into the Supabase Studio so Supabase AI works when developing locally too.
What is the current behavior?
When using the Supabase AI fields locally, one gets an error message which is just the HTML of the standard error page. Also, the container throws an error that the OpenAI key cannot be found.
What is the new behavior?
When specifying the
OPENAI_API_KEYwhile starting Supabase locally, it should now pass it through the config into the container as an env variable.Additional context
Further ideas for improvement:
supabase startwould also read the.envfile (also for social auth secrets)