Skip to content

Build MR context on monolith side and remove BuildReviewMergeRequestContext tool

We've introduced a new custom tool, BuildReviewMergeRequestContext, as part of Integrate Duo Code Review into Duo Agent Platform (&18645). Since there is no existing way to pass large MR context (diffs, full file contents, etc.) from the monolith side when starting the workflow, we needed to add a custom tool on the AIGW side to overcome this limitation.

Having custom tools that are very specific and not reusable is problematic for several reasons, including:

  • Future maintainability concerns
  • Risk of improper and unaware usage of the tool

The goal of this issue is to explore whether we could build and send the MR context when starting the workflow on the monolith side, thereby allowing us to remove the BuildReviewMergeRequestContext custom tool.

MR where it was introduced: feat: optimize duo code review flow (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!3448 - merged)


Additional context from Slack conversation: Screenshot_2025-10-01_at_11.08.29_AM Screenshot_2025-10-01_at_11.03.26_AM

Edited by Kinshuk Singh