gitlab-ce/doc/user/gitlab_duo/model_selection.md

3.1 KiB

stage group info description title
AI-powered Custom Models To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments Configure large language models for GitLab Duo features. GitLab Duo model selection

{{< details >}}

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro or Enterprise
  • Offering: GitLab.com
  • Status: Private beta

{{< /details >}}

{{< history >}}

  • Introduced for top-level groups in GitLab 18.1 with a flag named ai_model_switching. Disabled by default.

{{< /history >}}

{{< alert type="flag" >}}

The availability of this feature is controlled by a feature flag. For more information, see the history.

{{< /alert >}}

To help meet your performance and compliance requirements, on GitLab.com, you can choose to use different large language models (LLMs) with GitLab Duo.

If you do not select a specific LLM, all GitLab Duo features use the default LLMs. You should use the defaults if you do not have unique requirements.

Select an LLM for a feature

Prerequisites:

  • The group that you want to select LLMs for must:
    • Be a top-level group on GitLab.com.
    • Have GitLab Duo Core, Pro, or Enterprise enabled.
  • You must have the Owner role for the group.

To select a different LLM for a feature:

  1. On the left sidebar, select Search or go to and find your group.

  2. Select Settings > GitLab Duo.

    If you GitLab Duo is not visible, ensure you have GitLab Duo Core, Pro or Enterprise turned on for the group.

  3. Select Configure features.

  4. For the feature you want to configure, select an LLM from the dropdown list.

The GitLab UI for selecting a model.

Troubleshooting

When selecting models other than the default, you might encounter the following issues.

LLM is not available

If you are using the GitLab Default LLM for a GitLab Duo AI-native feature, GitLab might change the default LLM without notifying the user to maintain optimal performance and reliability.

If you have selected a specific LLM for a GitLab Duo AI-native feature, and that LLM is not available, there is no automatic fallback, and the feature that uses this LLM is unavailable.

Latency issues with code completion

If you are assigned a seat in a project that has a specific LLM selected for code completion:

  • Your IDE extension disables the direct connection to the AI gateway.
  • Code completion requests go through the GitLab monolith, which then selects the specified model to respond to these requests.

This might cause increased latency with code completion requests.

Agentic Chat incompatibility

When a specific LLM is selected for GitLab Duo Chat or its sub-features, GitLab Duo Agentic Chat is not available in that namespace.