Duo Self-Hosted: Add GitLab managed models as options in model selector dropdown

What does this MR do and why?

This MR makes updates to the Duo Self-Hosted model selector component to support GitLab managed models offered by instance-level model selection. This will replace the existing GitLab AI vendor model option for Duo Self-Hosted as part of hybrid configuration.

However, we will still need to support it at this stage until the instance-level model selection feature flag is fully rolled out and the documentation is updated.

Note: the following changes will be handled separately:

  • GitLab default model option
  • Bulk update

References

Update Duo Self-Hosted model selector dropdown ... (#565365 - closed)

Screenshots or screen recordings

Self-hosted models only Self-hosted and GitLab managed models
self_hosted self_hosted_and_gitlab_managed

How to set up and validate locally

Prerequisites:

  • Run GDK on non-SASS mode: GITLAB_SIMULATE_SAAS=0 gdk start
  • Run the following setup script to get Duo Enterprise add on: GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup'
  • Access Duo Self-Hosted feature settings: /admin/gitlab_duo/self_hosted/features.
  • Create a self-hosted model if you haven't already.

Self-hosted only:

  • Disable the instance_level_model_selection feature flag.
  • Access Duo Self-Hosted feature settings: /admin/gitlab_duo/self_hosted/features
  • In the dropdown, note that only self-hosted models are present (no GitLab managed models)
  • Observe that GitLab AI vendor model option appears in the list.
  • Observe that disabled option appears as a separate group, no longer part of Self-Hosted models
  • Ensure model selection works as expected

Self-hosted and GitLab managed models:

  • Enable the instance_level_model_selection feature flag.
  • Access Duo Self-Hosted feature settings: /admin/gitlab_duo/self_hosted/features
  • In the dropdown, note the presence of GitLab managed models in addition to self-hosted models
  • Observe that disabled option appears as a separate group, no longer part of Self-Hosted models
  • Ensure model selection works as expected

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 Cindy Halim

Merge request reports

Loading