Add GitLab Default Model Modal

What does this MR do and why?

This MR adds a confirmation modal that appears when a user selects the GitLab Default model option in the Model Selection interface. Selecting the default model has implications for customers who have compliance requirements. Users should confirm they understand this before the update is persisted.

Related issue: #555899 (closed)

Design: #546548[cm_com_2_options_4_dropdown_4_gitlabrec_2_modal.png]

What this MR does:

  • Displays an information modal that pops up when a user selects the GitLab Default model for any feature setting under Model Selection. The user must confirm the selection before the model is updated.
  • When a user checks the "Do not show again" checkbox, the modal will be suppressed and not shown again (uses localStorage for state).

References

Screenshots or screen recordings

Modal:

Screenshot_2025-08-25_at_1.22.02_pm

Before After
DefaultModelModalBefore Screen_Recording_2025-08-25_at_1.34.11_pm

How to set up and validate locally

Set-up

  • An active online cloud or legacy, Ultimate license.
  1. Start GDK in saas mode GITLAB_SIMULATE_SAAS=1 gdk start
  2. Enable the model selection ai_model_switching feature flag by visiting http://gdk.test:3000/rails/features/
  3. Run the Duo setup rake task GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup' to seed DB with a Duo test group (it's called gitlab-duo).
  4. Visit the Model Selection page for the group i.e http://gdk.test:3000/groups/test/-/settings/gitlab_duo/model_selection
  5. By default, all feature settings will have the GitLab Default model pre-selected. Change the model on any feature to something else. Then change it back to the "GitLab Default" model where the modal will appear. Validate the modal appears every time the default model is selected, unless the "do not show again" checkbox is checked. To reset the "do not show again" behaviour, open dev tools, visit Application > Storage > Local storage > http://gdk.test:3000/ right-click and select "Clear".

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.

Related to #546548 (closed)

Edited by Julie Huang

Merge request reports

Loading