Self-Hosted Duo DAP instances should be able to configure cloud-connected models
What does this MR do and why?
Final step for #576314 (closed), so that if a self-hosted Duo instance has configured DAP to work with a cloud-connected model, it will work as expected.
Earlier, the request to go to self_hosted_url
, even if the feature was configured to use a cloud-connected model, which would just fail because self-hosted systems do not have ANTHROPIC_API_KEY configured.
After the change: if the feature is configured to use a cloud-connected model, it will make DAP requests to the cloud_connected_url, as expected.
This change improves how GitLab's AI workflow system determines which AI service to connect to based on user configuration settings. Previously, the system would look up AI feature settings multiple times in different places, which was inefficient. Now, the system looks up these settings once early in the process and passes them through to all the components that need them.
The main improvement is that the system now properly routes AI requests to either a self-hosted AI service or GitLab's cloud-based AI service depending on what the user has configured. It also ensures that the correct AI model metadata is included with requests, which helps the AI service understand what capabilities are available.
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.