GitLab Duo Feature Availability and Configuration | GitLab Docs
/ GitLab Duo Feature Availability and Configuration This document explains how GitLab Duo features are controlled, who can access them, and how they are configured across GitLab deployments. Controlling GitLab Duo Feature Availability Various settings control when and how users can interact with GitLab Duo features. The end-user documentation explains this from a user perspective. This document explains the implementation logic from a developer perspective and includes technical details.
Namespace billing and governance On GitLab.com, the Ai::UserAuthorizer#governing_namespace method determines the authoritative namespace for GitLab Duo usage-based billing and governance in a user’s request context. Governing namespace is not applicable to GitLab Self-Managed or dedicated instances. The governing_namespace method follows this decision process: If a scope (namespace context) is provided and the user is a member of that namespace’s top-level group or any subgroups or projects within the top-level group, use the top-level group.
Otherwise, use the user’s selected default GitLab Duo namespace. If the user has not selected a default namespace, attempt to infer one. Return nil if no suitable namespace can be determined. ruby # Without a scope: uses the user's default GitLab Duo namespace governing_ns = :: Ai :: UserAuthorizer . for ( current_user ) . governing_namespace # => Returns the user's default namespace or inferred namespace # With a scope: prefers the scope's top-level group if the user is a member governing_ns = :: Ai :: UserAuthorizer . for ( current_user ) . governing_namespace ( project ) # => Returns the project's top-level group if the user is a member.
Otherwise, returns the default namespace # Alias for clarity in billing contexts billable_ns = :: Ai :: UserAuthorizer . for ( current_user ) . billable_duo_namespace ( resource ) UI Options and Database States In the UI, the “GitLab Duo Enterprise availability” setting shows 3 options: On by default - Features are enabled and child entities inherit this setting Off by default - Features are disabled but can be overridden by child entities Always off - Features are disabled and cannot be overridden by child entities These UI options map directly to the following database states: UI Option duo_features_enabled lock_duo_features_enabled On by default true false Off by default false false Always off false true Cascading Settings Implementation The duo_features_enabled setting is a cascading setting , which impacts how GitLab Duo features are propagated through the hierarchy.
This cascading behavior means: The setting can be configured at any level: instance, group, subgroup, or project For GitLab.com, the instance-wide setting is always true Child entities can override their parent’s setting. For example: An instance with duo_features_enabled: false can have a group with duo_features_enabled: true A group with duo_features_enabled: true can have a subgroup with duo_features_enabled: false When the setting is true at a parent level, all child entities are reset to true When the setting is false at a parent level, all child entities are reset to false A parent entity can “lock” the setting using lock_duo_features_enabled: true (displayed as “Always off” in the UI) When locked, child entities cannot override the parent setting This effectively disables GitLab Duo features for the entire hierarchy below that point Feature Accessibility By Context Where Users Can Access GitLab Duo Features Users with a paid GitLab Duo license (GitLab Duo Pro or GitLab Duo Enterprise) can access Chat and Code Suggestions in both the Web UI and IDE for: Resources that cannot disable GitLab Duo features: Personal GitLab namespaces and projects Free tier GitLab groups and projects Premium and Ultimate groups and projects without a paid GitLab Duo license Resources where GitLab Duo features are enabled: In GitLab Self-Managed and GitLab Dedicated: Groups or projects in an instance with a paid GitLab Duo license In GitLab.com: Groups or projects in a group with a paid GitLab Duo license Additional IDE Access Scenarios In the IDE environment specifically, users with a GitLab Duo license can use Chat and Code Suggestions for: Repositories without Git configuration Repositories with Git configuration pointing to unknown origins (such as GitHub or other GitLab instances where the user is not authenticated) In these scenarios there is no GitLab project to check, so Code Suggestions falls back to the user’s governing namespace .
If GitLab Duo is turned off for that namespace, Code Suggestions is unavailable. Users who belong to more than one namespace with GitLab Duo and have not selected a default namespace for GitLab Duo are not restricted, because the request cannot be attributed to a single namespace. Platform-Specific Behavior GitLab.com License Assignment On GitLab.com, a GitLab Duo license is associated with the individual user to whom it is assigned, not the group that assigned the seat.
User accounts on GitLab.com are independent entities that belong to the entire GitLab instance rather than being “owned” by any specific group. Impact on Feature Availability Disabling GitLab Duo features ( duo_features_enabled: false ) in a group: Does not revoke GitLab Duo access for group members who have GitLab Duo licenses Only prevents licensed users from using GitLab Duo features with resources belonging to that group Example Scenario If a user has a GitLab Duo license but belongs to a group where GitLab Duo features are set to “Always off”, they can still: Use GitLab Duo Chat for questions about issues in free projects Ask GitLab Duo Chat general coding questions or questions about GitLab Use GitLab Duo features with resources from other groups where GitLab Duo features are enabled They cannot use Code Suggestions for projects in that group.
If the group is also their governing namespace , Code Suggestions is unavailable even when the IDE cannot resolve the repository to a GitLab project. This flow diagram shows how GitLab Duo feature availability works on GitLab.com: flowchart TD A[Start] --> B{Member of Premium/Ultimate group?} B -->|No| C[Cannot use GitLab Duo] B -->|Yes| D{Has GitLab Duo Pro/Enterprise license?} D -->|No| E[Cannot use GitLab Duo] D -->|Yes| F{Using GitLab Duo with specific group/project resource?} F -->|No| G[Can use GitLab Duo] F -->|Yes| H{Group/Project has GitLab Duo features enabled?} H -->|No| I[Cannot use GitLab Duo with this resource] H -->|Yes| J[Can use GitLab Duo with this resource] GitLab.com with GitLab Duo Core, GitLab Duo Pro, and GitLab Duo Enterprise GitLab offers three tiers of AI functionality: GitLab Duo Core - Basic AI capabilities GitLab Duo Pro - Enhanced AI capabilities with more advanced features GitLab Duo Enterprise - Comprehensive AI capabilities with additional controls and features GitLab Duo Core Configuration With the introduction of GitLab Duo Core, a new setting is available for top-level Premium and Ultimate groups.
This setting allows group owners to control GitLab Duo Core availability: When GitLab Duo Core is enabled (“on”): Every member of the group automatically receives a GitLab Duo Core seat When GitLab Duo Core is disabled (“off”): No members of the group have GitLab Duo Core seats Feature Availability by License Tier Feature GitLab Duo Core GitLab Duo Pro GitLab Duo Enterprise Chat Agentic Chat only. Limited to IDE Full functionality Full functionality Code Suggestions Available in IDE and Web IDE Available in IDE and Web IDE Available in IDE and Web IDE Additional AI features Not available Some Available All Available This flow diagram shows how GitLab Duo feature availability works on GitLab.com with GitLab Duo Core settings taken into consideration: flowchart TD A[Start] --> B{Member of Premium/Ultimate group?} B -->|No| C[Cannot use GitLab Duo] B -->|Yes| D{Has GitLab Duo Pro/Enterprise license?} D -->|Yes| E[Can use GitLab
The rest of this page is on the live site.