Skip to content

Return Default Probes in Duo Health Check if There Are Hybrid Models

What does this MR do and why?

Appends the Duo health check with additional relevant probes if hybrid models are being used within a self-hosted Duo setup. The work is feature flagged as additional UI work is needed before the feature can be released.

Changes in this MR:

  • Adds WIP feature flag ai_self_hosted_vendored_features
  • Returns hybrid Duo health check probes if vendored models are being used with a self-hosted setup, and the feature flag is enabled.

References

GitLab Duo Self-Hosted

Screenshots or screen recordings

Self-hosted models only Hybrid models (self-hosted and vendored)
Screenshot_2025-07-31_at_5.20.08_pm Screenshot_2025-07-31_at_4.22.28_pm

How to set up and validate locally

Set-up

  • An active online Ultimate license.
  1. Start GDK in self-managed mode GITLAB_SIMULATE_SAAS=0 gdk start
  2. Run the Duo Enterprise setup rake task GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup[duo_enterprise]' to seed DB with enterprise add-on purchase
  3. Enable the ai_self_hosted_vendored_features feature flag by visiting http://gdk.test:3000/rails/features/
  4. Navigate to the Duo settings configuration page in admin - http://gdk.test:3000/admin/gitlab_duo/configuration
  5. Set a value for Local AI Gateway URL (http://0.0.0.0:5052 is a default you can use) and save the changes.

Validating health check with hybrid models:

  1. You will need at least 1 vendored model in order to see hybrid probes in the health check. There is no UI to do this yet, so use the rails console:
Ai::FeatureSetting.find_or_create_by(feature: 'duo_chat').update!(provider: :vendored, self_hosted_model: nil)
  1. Navigate to the Duo home page http://gdk.test:3000/admin/gitlab_duo and expand the health check. Validate you are getting all the probes seen in the "Hybrid models" screenshot. It's ok if some of the probes are failing for you, as long as they are there it means they are working.
  2. Click the download icon (next to the "Run health check" button) to validate the health report matches the probes seen.

Validating health check with only self-hosted models:

  1. Remove vendored models using the Rails console:
::Ai::FeatureSetting.find_by(feature: 'duo_chat').update!(provider: :self_hosted) # change the vendored model to self-hosted
::Ai::FeatureSetting.all.any?(&:vendored?) # ensure there are no other vendored models, this should return `false`
  1. Navigate to the Duo home page http://gdk.test:3000/admin/gitlab_duo and expand the health check. Validate you are getting all the probes seen in the "Self-hosted models only" screenshot. It's ok if some of the probes are failing for you, as long as they are there it means they are working.
  2. Click the download icon (next to the "Run health check" button) to validate the health report matches the probes seen.

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 #525918

Edited by Julie Huang

Merge request reports

Loading