Fix Duo Chat staging evaluation is timing out

What does this MR do and why?

This MR fixes that staging evaluation of Duo Chat is failing due to the rack timeout error. We're currently performing a message serialization on all message rows of a thread, which is unnecessary because we only populate last 50 messages to LLM.

This is currently not an issue on production due to the rate limiter on GraphQL API. The staging eval uses a different and internal endpoint.

See https://gitlab.slack.com/archives/C05CJ1T3P0W/p1738649916648039 for more information.

Closes Duo Chat is getting slower as the message count... (#517058 - closed)

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Shinya Maeda

Merge request reports

Loading