Remove code_suggestions_direct_access_cloud_connected flag

What does this MR do and why?

This MR removes the code_suggestions_direct_access_cloud_connected feature flag and keeps the feature.

The flag controlled the rollout of code completion direct access tokens on cloud-connected instances. The flag has been enabled on GitLab.com for several days. The rollout is complete, and the metrics are stable. Direct access tokens are now always available on instances without a self-hosted AI Gateway.

The Ai::FeatureSetting check for Duo Self-Hosted instances stays in place: instances with a self-hosted AI Gateway and no pinned or vendored model still get the 400 error with the "assign a model" message.

After the merge

When this MR is deployed, we can delete the flag from all environments:

/chatops gitlab run feature delete code_suggestions_direct_access_cloud_connected --dev --pre --staging --staging-ref --production

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Make sure your GDK has no self-hosted AI Gateway URL and no code completions feature setting:

    # rails console
    Gitlab::CurrentSettings.update!(ai_gateway_url: nil)
    ::Ai::FeatureSetting.find_by(feature: :code_completions)&.destroy
  2. Call the endpoint with a user who has a Duo seat and a default Duo namespace:

    curl -X POST -H "Authorization: Bearer $TOKEN" \
      "http://gdk.test:3000/api/v4/code_suggestions/direct_access"
  3. Expected: 201 with a token. The feature flag state has no effect anymore.

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.

Edited by Vitali Tatarintev

Merge request reports

Loading
Loading