Draft: Remove ai_prompts_v2 feature flag

What does this MR do and why?

Removes the ai_prompts_v2 feature flag. The flag gated usage of the AI Gateway v2/prompts endpoints. The rollout is complete on GitLab.com and the feature is stable, so the v2 endpoints are now always used and the v1 fallback is removed.

  • Deletes the flag definition ee/config/feature_flags/beta/ai_prompts_v2.yml
  • Gitlab::Llm::AiGateway::Client#complete_prompt now always calls the /v2/prompts/:prompt_name endpoint
  • Gitlab::Llm::Chain::Requests::AiGateway now always uses the /v2/prompts/chat endpoint; the unused v1 BASE_PROMPTS_CHAT_ENDPOINT constant is removed
  • Removes the flag-disabled spec contexts; the remaining specs already cover the v2 behavior

References

Screenshots or screen recordings

Not applicable: backend-only change with no user-visible UI.

How to set up and validate locally

  1. Run the affected specs:

    bundle exec rspec ee/spec/lib/gitlab/llm/ai_gateway/client_spec.rb ee/spec/lib/gitlab/llm/chain/requests/ai_gateway_spec.rb
  2. Confirm no references to the flag remain:

    grep -r "ai_prompts_v2" ee/

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.

Merge request reports

Loading
Loading