Loading
Use ai_prompts_v2 FF for v2 endpoint in Chain::Requests::AiGateway
What does this MR do and why?
Switch the prompts endpoint in Gitlab::Llm::Chain::Requests::AiGateway to use /v2/prompts/chat when the ai_prompts_v2 feature flag is enabled, matching the same pattern already used in Gitlab::Llm::AiGateway::Client#complete_prompt.
Also removes the unused ENDPOINT (/v1/chat/agent) and BASE_ENDPOINT (/v1/chat) constants that were never referenced anywhere.
References
Screenshots or screen recordings
N/A — backend-only change.
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:ai_prompts_v2) - Trigger a Duo Chat request and confirm it hits the
/v2/prompts/chat/<unit_primitive>endpoint. - Disable the flag:
Feature.disable(:ai_prompts_v2) - Confirm requests go to
/v1/prompts/chat/<unit_primitive>.
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.