Backport 1465f38a to 17.11
We need to backport the bug fix from MR !190817 (merged), which resolves the issue that GitLab Duo Self-hosted beta features were not available in version 17.11. The original fix was merged right after the 17.11 cutoff (commit 1465f38a) and is working correctly in 18.1. This backport is needed to unblock multiple high-opportunity customer POVs that depend on GitLab Duo Self-hosted beta features.