GitLab Duo model selection

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

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

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

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

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

Select an LLM for a feature

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

On GitLab.com, you can select a model for a feature in a top-level group. The model that you select applies to that feature for all child groups and projects.

Prerequisites:

  • You must have the Owner role for the group.
  • The group that you want to select LLMs for must be a top-level group.
  • In GitLab 18.3 or later, you must assign a default namespace if you belong to multiple GitLab Duo namespaces.

To select a different LLM for a feature:

  1. On the left sidebar, select Search or go to and find your group. If you’ve turned on the new navigation, this field is on the top bar.
  2. Select Settings > GitLab Duo.
  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 at the top-group level.

  • Model selection for GitLab Duo Chat (Agentic) is independent from GitLab Duo Chat (Classic). You must configure each feature separately — changes to one won’t affect the other.

  • In the IDE, model selection for GitLab Duo Chat (Agentic) is applied only when the connection type is set to WebSocket.

  • The OpenAI models used in GitLab Duo Chat (Agentic) have experimental support, specifically for GPT-5, GPT-5 mini, and GPT-5-Codex. Please leave your feedback about using OpenAI models in GitLab Duo Chat (Agentic) in this issue.

Assign a default GitLab Duo namespace

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

If you belong to multiple GitLab Duo namespaces, you must choose one as your default namespace.

You must do this because GitLab Duo might not be able to automatically detect the namespace you are working from, and therefore the LLMs you want to use. For example, when:

  • Using GitLab Duo in the CLI.
  • A new project has not been initialized with Git, so the IDE cannot identify an associated namespace.

If this happens, GitLab Duo uses the LLMs you have selected in your default namespace.

To select a default namespace:

  1. In GitLab.com, on the left sidebar, select your avatar. If you’ve turned on the new navigation, this button is in the upper-right corner.
  2. Select Preferences.
  3. Go to the Behavior section.
  4. From the Default GitLab Duo namespace dropdown list, select the namespace to set as your default.
  5. Select Save changes.

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.

No default GitLab Duo namespace

When using a GitLab Duo feature with a selected LLM, you might get an error that states that you have not selected a default GitLab Duo namespace. For example, on:

  • GitLab Duo Code Suggestions, you might get Error 422: No default Duo group found. Select a default Duo group in your user preferences and try again.
  • GitLab Duo Chat, you might get Error G3002: I'm sorry, you have not selected a default GitLab Duo namespace. Please go to GitLab and in user Preferences - Behavior, select a default namespace for GitLab Duo.

This issue occurs when you belong to multiple GitLab Duo namespaces, but have not chosen one as your default namespace.

To resolve this, assign a default GitLab Duo namespace.