Show Cost Indicators for GitLab Models
What does this MR do and why?
Show model cost indicators for GitLab vendored models in the model selector when the agentic_chat_ga feature flag is enabled. This change impacts user, namespace and instance-level model selection where GitLab vendored models are used. Self-hosted models are not impacted and do not use cost indicators.
Note: Cost indicator values come from the AIGW service, defined in models.yml (example)
References
Related: https://gitlab.com/gitlab-org/gitlab/-/work_items/566740
Screenshots or screen recordings
End-user model selection (.com & self-managed)
| Before | After |
|---|---|
|
|
Namespace model selection (.com)
| Before | After |
|---|---|
|
|
Instance-level model selection (self-managed)
| Before | After | After (Screen Recording with self-hosted models) |
|---|---|---|
|
|
Screen_Recording_2025-12-08_at_3.15.39_pm |
"Add Self-hosted" model selector (shared component, but no changes)
| Before | After |
|---|---|
|
|
How to set up and validate locally
Set-up pre-requisites
- An active online cloud or legacy, Ultimate license.
- Set up AI Gateway (Easiest way is to through GDK)
- Enable the necessary feature flags
agentic_chat_ga,duo_agent_platform_model_selection,self_hosted_agent_platformby visiting http://gdk.test:3000/rails/features/
To validate user-level and namespace-level model selectors:
- Start GDK in saas mode
GITLAB_SIMULATE_SAAS=1 gdk start - 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 - 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.







