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 |
|---|---|
|
|
Namespace-level model selector
| Before | After | Recording (dropdown with mix of self-hosted + GitLab models) |
|---|---|---|
|
|
InstanceModelSelection |
Instance-level model selector
| Before | After |
|---|---|
|
|
"Add Self-hosted" model selector (shared component, but no changes)
| Before | After |
|---|---|
|
|
Set-up pre-requisites
- An active online cloud or legacy, Ultimate license.
- Switch to the latest Duo project studio UI (Enable
paneled_viewfeature 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:
- Start GDK in saas mode
GITLAB_SIMULATE_SAAS=1 gdk start - Enable the necessary feature flags
ai_model_switching,ai_user_model_switching,duo_agent_platform_model_selectionby visiting http://gdk.test:3000/rails/features/ - 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 calledgitlab-duo). - 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 existingAi::SelfHostedModelrecords in the DB then you will also need to change this line tofalse. - 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
- 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:
- Start GDK in self-managed mode
GITLAB_SIMULATE_SAAS=0 gdk start - Enable the necessary feature flags
ai_model_switching,ai_user_model_switching,self_hosted_agent_platform,instance_level_model_selectionby visiting http://gdk.test:3000/rails/features/ - Run the Duo setup rake task in SM mode
GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup' - Navigate to the instance-level model selection page. The URL is:
http://gdk.test:3000/admin/gitlab_duo/self_hosted. - 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:
- 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.
- 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







