Hide DAP Self-hosted Models if the GitLab Testing Terms Have Not Been Accepted
What does this MR do and why?
As DAP self-hosted models are beta in 18.7, we should only allow for their usage when customers have accepted the GitLab beta testing terms. This MR will hide DAP self-hosted models from all DAP feature settings unless the user has enabled the Self-hosted beta models and features checkbox in the Duo settings page.
References
Related: https://gitlab.com/gitlab-org/gitlab/-/issues/583038
Screenshots or screen recordings
| Before | After |
|---|---|
| Screen_Recording_2025-12-09_at_4.50.40_pm | Screen_Recording_2025-12-09_at_4.54.07_pm |
How to set up and validate locally
Set-up pre-requisites
- An active online cloud or legacy, Ultimate license.
- Start GDK in self-managed mode
GITLAB_SIMULATE_SAAS=0 gdk start - Enable the
ai_agentic_chat_feature_setting_splitandself_hosted_agent_platformfeature flag by visiting http://gdk.test:3000/rails/features/ - Run the Duo Enterprise setup rake task in self-managed mode
GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup[duo_enterprise]' - Create some DAP compatible self-hosted models by:
- Navigating to the create self-hosted model page i.e
admin/gitlab_duo/self_hosted/models/new - Create a self-hosted model. Select
GPTfor the model family and enter any allowable values for everything else
- Navigating to the create self-hosted model page i.e
Validate when DAP self-hosted models should be shown
- Navigate to the Duo settings page i.e
http://gdk.test:3000/admin/gitlab_duo/configuration - Enable the Self-hosted beta models and features setting and save changes
- Navigate to the model selection page i.e
http://gdk.test:3000/admin/gitlab_duo/self_hosted - Validate that features under the "GitLab Duo Agent Platform" section show the self-hosted model created above in the "Self-hosted models" section in the dropdown
Validate when DAP self-hosted models should not be shown
- Navigate to the Duo settings page i.e
http://gdk.test:3000/admin/gitlab_duo/configuration - Disable the Self-hosted beta models and features setting and save changes
- Navigate to the model selection page i.e
http://gdk.test:3000/admin/gitlab_duo/self_hosted - Validate that features under the "GitLab Duo Agent Platform" section do not have a "Self-hosted models" section in the dropdown and contains no self-hosted models.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Julie Huang
