Expose Model Descriptions in Model Selector

What does this MR do and why?

This MR adds model descriptions to the model selector, iterating towards this design.

The component is shared between user, namespace and instance-level model selection. It is also used on the page for adding self-hosted models.

Related: #572469 (closed)

Screenshots or screen recordings

User-level model selector

Before After
Screenshot_2025-11-21_at_4.54.46_pm Screenshot_2025-11-21_at_2.26.38_pm

Namespace-level model selector

Before After Recording (dropdown with mix of self-hosted + GitLab models)
Screenshot_2025-11-21_at_4.53.41_pm Screenshot_2025-11-21_at_2.25.44_pm InstanceModelSelection

Instance-level model selector

Before After
Screenshot_2025-11-21_at_4.48.55_pm Screenshot_2025-11-21_at_4.46.06_pm

"Add Self-hosted" model selector (shared component, but no changes)

Before After
Screenshot_2025-11-21_at_4.49.52_pm Screenshot_2025-11-21_at_4.42.11_pm

Set-up pre-requisites

  • An active online cloud or legacy, Ultimate license.
  • Switch to the latest Duo project studio UI (Enable paneled_view feature flag, then follow the rest of the instructions)
  • Set up AI Gateway (Easiest way is to through GDK)

To validate user-level and namespace-level model selectors:

  1. Start GDK in saas mode GITLAB_SIMULATE_SAAS=1 gdk start
  2. Enable the necessary feature flags ai_model_switching, ai_user_model_switching, duo_agent_platform_model_selection by visiting http://gdk.test:3000/rails/features/
  3. Run the Duo setup rake task in Saas mode GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup' to seed instance with a Duo test group (it will be called gitlab-duo).
  4. Navigate to the Model Selection page of the group. The URL should look like this: http://gdk.test:3000/groups/<name of Duo group just created>/-/settings/gitlab_duo/model_selection. If you have any existing Ai::SelfHostedModel records in the DB then you will also need to change this line to false.
  5. To validate the namespace-level model selector, open the model selector of any feature setting and ensure it looks like the screengrabs and functions as expected
  6. To validate the user-level model selector, stay on the same page as step 5, click on the Duo Chat icon on the upper right corner of the screen (under your avatar) to open the chat window. Make sure the "Agentic mode" toggle is enabled. Open the user model selector and ensure it looks like the screengrabs and functions as expected

To validate instance-level model selector:

  1. Start GDK in self-managed mode GITLAB_SIMULATE_SAAS=0 gdk start
  2. Enable the necessary feature flags ai_model_switching, ai_user_model_switching, self_hosted_agent_platform , instance_level_model_selection by visiting http://gdk.test:3000/rails/features/
  3. Run the Duo setup rake task in SM mode GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup'
  4. Navigate to the instance-level model selection page. The URL is: http://gdk.test:3000/admin/gitlab_duo/self_hosted.
  5. Open up the model selector of any feature setting and ensure it looks like the screengrabs and also functions as expected

To validate no regression in the "Add self-hosted model" model selector:

  1. From the http://gdk.test:3000/admin/gitlab_duo/self_hosted` page you visited above, click the Add self-hosted model button on the upper right-hand side of the screen.
  2. Open the "Model family" dropdown and validate there are no changes

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

Merge request reports

Loading