Model selection

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro, or Enterprise
  • Offering: GitLab Self-Managed, GitLab Dedicated

Every GitLab Duo feature has a default large language model (LLM) chosen by GitLab.

GitLab can update this default model to optimize feature performance. Therefore, a feature's model might change without you taking any action.

Model changes come from the GitLab AI Gateway and take effect regardless of your GitLab version, unless otherwise noted.

If you do not want to use the default model for each feature, or have specific requirements, you can choose from an array of other available supported models.

If you select a specific model for a feature, the feature uses that model until you select another.

Select a model for the instance

Version history

  • Introduced in GitLab 18.4 with a flag named instance_level_model_selection. Enabled by default.
  • Introduced to GitLab Dedicated in GitLab 18.5.
  • Feature flag instance_level_model_selection removed in GitLab 18.6.
  • Changed to include GitLab Duo Core and Pro in GitLab 18.6.

You can select a default model for a feature and that default applies to the entire instance. If you do not select a specific model, all GitLab Duo features use the default GitLab model.

Note

For GitLab Self-Managed instances with an offline license, GitLab-managed models are not available. An offline license has no connection to the GitLab.com AI Gateway that serves them, so the model selection list does not include GitLab-managed models and no error is displayed. To change the model for features in the GitLab Duo Agent Platform, you must have the GitLab Duo Agent Platform Self-Hosted add-on and configure self-hosted models.

Prerequisites:

  • You must be an administrator.

Note

For GitLab 19.0 or earlier, Code Review Flow and GitLab Duo Code Review share the same model setting. Changes you make to the model impact both features.

To select a model for a feature:

  1. In the upper-right corner, select Admin.

  2. In the left sidebar, select GitLab Duo.

  3. Under Model selection, select Manage models. If Model selection is not displayed, verify that the GitLab Duo Enterprise add-on is configured for your instance.

  4. For the feature you want to configure, select a model from the dropdown list to set as the default model.

  5. Optional. To apply the model to all features in the section, select Apply to all.

    Note

    If you select Default for all features, each feature uses its own GitLab default model, which might vary between features.

Select a model for Agentic Chat

Version history

  • Ability to restrict GitLab Duo Agentic Chat to specific models added in GitLab 19.1.
  1. In the upper-right corner, select Admin.

  2. In the left sidebar, select GitLab Duo.

  3. Under Model selection, select Manage models.

  4. Go to the GitLab Duo Agentic Chat section.

  5. Select a model from the dropdown list to set as the default model. If you plan to restrict access to other models, select a GitLab-managed model as the default.

  6. Optional. To restrict what other models users can select for Agentic Chat:

    1. Under Available models, select Configure.

    2. In the Available models: Agentic Chat dialog, select the Restrict to specific models checkbox.

    3. Select the models that you want Agentic Chat to be able to use. To select every model, select the Select all models checkbox. When every model is selected, select Clear all models to clear the selection.

      Note

      The default model is always available to users and cannot be cleared. To save your changes, you must select at least one model in addition to the default model.

    4. Select Save.

    Note

    To restrict Agentic Chat to specific models, you must select a GitLab-managed model as the default model. If you do not restrict Agentic Chat to specific models, users can choose from all GitLab-managed models.

Select a model for Code Review Flow

Version history

  • Separate model setting for Code Review Flow introduced in GitLab 19.1, using the Agentic Code Review setting.

For Code Review Flow, the setting for model selection differs based on your GitLab version.

GitLab 19.1 or later

To select a model for Code Review Flow:

  1. In the upper-right corner, select Admin.
  2. In the left sidebar, select GitLab Duo.
  3. Under Model selection, select Manage models.
  4. Under GitLab Duo Agent Platform, find Agentic Code Review.
  5. Select a model from the dropdown list to set as the default model.

For a list of available models, see Agent Platform AI models.

GitLab 19.0 or earlier

Code Review Flow shares a model setting with GitLab Duo Code Review, the non-agentic version of the feature. The model you select applies to both features, and you can only choose from the models available for the non-agentic feature.

To select a model for Code Review Flow:

  1. In the upper-right corner, select Admin.
  2. In the left sidebar, select GitLab Duo.
  3. Under Model selection, select Manage models.
  4. Under GitLab Duo for merge requests, find Code Review.
  5. Select a model from the dropdown list to set as the default model.