doc/user/gitlab_duo/code_review.md
{{< details >}}
{{< /details >}}
{{< collapsible title="Model information" >}}
{{< /collapsible >}}
{{< history >}}
ai_review_merge_request and duo_code_review_chat, both disabled by default.ai_review_merge_request and duo_code_review_chat enabled by default on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in 17.10.ai_review_merge_request removed in GitLab 18.1.duo_code_review_chat removed in GitLab 18.1.{{< /history >}}
[!note] Depending on your add-on, GitLab runs one of two code review features:
- Code Review Flow: the agentic version, part of GitLab Duo Agent Platform.
- GitLab Duo Code Review: the non-agentic version, available only for users with the GitLab Duo Enterprise add-on.
This page describes the non-agentic version. Learn how the two features compare.
GitLab Duo Code Review helps you streamline code reviews in your projects.
When your merge request is ready to be reviewed, use GitLab Duo Code Review to perform an initial review:
/assign_reviewer @GitLabDuo, or assign GitLab Duo as reviewer.<i class="fa-youtube-play" aria-hidden="true"></i> Watch an overview
Provide feedback on this feature in issue 517386.
When you use GitLab Duo Code Review, the following data is sent to the large language model:
To specify content to exclude, see exclude context from Code Review.
You can mention @GitLabDuo in comments to interact with GitLab Duo on your merge request. You can
ask follow-up questions on its review comments, or ask questions on any discussion thread in your
merge request.
Interactions with GitLab Duo can help to improve the suggestions and feedback as you work to improve your merge request.
Feedback provided to GitLab Duo does not influence later reviews of other merge requests. There is a feature request to add this functionality, see issue 560116.
You can create custom MR review instructions to ensure consistent and specific code review standards in your project.
For more information, see customize review instructions for GitLab Duo.
{{< history >}}
{{< /history >}}
Automatic reviews from GitLab Duo ensure that all merge requests in your project receive an initial review. After a merge request is created, GitLab Duo reviews it unless:
Prerequisites:
To enable @GitLabDuo to automatically review merge requests:
{{< history >}}
cascading_auto_duo_code_review_settings. Disabled by default.cascading_auto_duo_code_review_settings removed in GitLab 18.7.{{< /history >}}
Use group or application settings to enable automatic reviews for multiple projects.
Prerequisites:
To enable automatic reviews for groups:
To enable automatic reviews for all projects:
Settings cascade from application to group to project. More specific settings override broader ones.