Guard Gitlab Chat by AI toggle
What does this MR do and why?
This adds an additional check for the GitLab Chat AI feature where we only allow it when the user belongs to a paid group which has enabled experimental features and allows third party AI features.
How to set up and validate locally
-
Enable feature flags:
Feature.enable(:ai_enabling_settings)
,Feature.enable(:openai_experimentation)
andFeature.enable(:tanuki_bot)
-
Run
gdk
with SaaS:gdk stop export GITLAB_SIMULATE_SAAS=1 gdk start
-
Set OpenAI API key:
settings = Gitlab::CurrentSettings.current_application_settings settings.openai_api_key = "..." settings.save!
-
Choose a group and set it to an Ultimate Plan (Admin -> Groups -> [selected group] -> Plan)
-
Go to the group's Settings -> General -> Permissions and group features
- Toggle
Experiment features
andThird-party AI services
- Test that GitLab Chat option is only enabled when both are checked
- Toggle
Screenshots or screen recordings
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #409539 (closed)
Edited by Madelein van Niekerk