GitLab Duo model selection
- Tier: Premium, Ultimate
- Add-on: GitLab Duo Core, Pro or Enterprise
- Offering: GitLab.com
Every GitLab Duo feature has a default large language model, 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.
If you don’t 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 a feature
The availability of this feature for GitLab Duo Agent Platform is controlled by a feature flag. For more information, see the history.
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 have the Owner role for the group.
- The group that you select models for is a top-level group.
- In GitLab 18.3 or later, if you belong to multiple GitLab Duo namespaces, you must assign a default namespace.
To select a model for a feature:
- On the top bar, select Search or go to and find your group.
- Select Settings > GitLab Duo.
- Select Configure features.
- For the feature you want to configure, select a model from the dropdown list.
- Optional. To apply the model to all features in the section, select Apply to all.
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 models 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 models you have selected in your default namespace.
To select a default namespace:
- In GitLab.com, in the upper-right corner, select your avatar.
- Select Preferences.
- Go to the Behavior section.
- From the Default GitLab Duo namespace dropdown list, select the namespace to set as your default.
- Select Save changes.
Troubleshooting
When selecting models other than the default, you might encounter the following issues.
Model is not available
If you are using the default GitLab model for a GitLab Duo AI-native feature, GitLab might change the default model without notifying the user to maintain optimal performance and reliability.
If you have selected a specific model for a GitLab Duo AI-native feature, and that model is not available, there is no automatic fallback. The feature that uses this model is unavailable.
Latency issues with code completion
If you are assigned a seat in a project that has a specific model 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 model, 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.
