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
Screenshots or screen recordings
Self-hosted models only | Hybrid models (self-hosted and vendored) |
---|---|
![]() |
![]() |
How to set up and validate locally
Set-up
- An active online Ultimate license.
- Start GDK in self-managed mode
GITLAB_SIMULATE_SAAS=0 gdk start
- 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 - Enable the
ai_self_hosted_vendored_features
feature flag by visitinghttp://gdk.test:3000/rails/features/
- Navigate to the Duo settings configuration page in admin -
http://gdk.test:3000/admin/gitlab_duo/configuration
- 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:
- 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)
- 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. - 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:
- 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`
- 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. - 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