Skip to content

Truncate diffs further to fit input token limit

Patrick Bajao requested to merge 427230-truncate-diffs-further into master

What does this MR do and why?

Based on testing in #427230 (comment 1589217301), truncating diff to 2000 words will lead to more than 8k input tokens. As a result, we're getting random characters, letters, or numbers as response when asking Vertex to summarize merge request.

To fix, we reduce the words to 750. Based on testing, this is within the limit of 8,192 input tokens.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #427230 (closed)

Merge request reports

Loading