Semantic Search: toggle self-hosted config by feature release state

What does this MR do and why?

In [Code Embeddings] Allow SM instances with self-... (gitlab-org#20110), we introduced the ability to allow Self-Managed instance admins to select their own embedding models. This was toggled by the beta-type FF semantic_search_user_model_selection. However, since it is synced with the Self-hosted models implementation, we also check against the feature release state of its corresponding embeddings_code Feature Setting.

This means that currently, the release state of this feature is toggled behind 2 things:

  • the beta-type Feature Flag
  • the Feature Setting release state

Changes in this MR:

  • remove the semantic_search_user_model_selection flag, making the Feature Setting release state the source of truth for beta toggle
    • note: this is not enabled on GitLab.com as this feature is only available on Self-Managed instances
  • remove the Ai::ActiveContext.user_can_select_embedding_model? method
    • this method checks Ai::ActiveContext.user_selects_embedding_model? AND the semantic_search_user_model_selection FF. It was added simply to deduplicate Feature Flag checking
    • since we are removing the FF, callers can simply check user_selects_embedding_model? directly

References

Screenshots or screen recordings

Search Admin page Semantic search Code embeddings page
Screenshot_2026-07-17_at_12.34.21 Screenshot_2026-07-17_at_12.35.49

How to set up and validate locally

This technically just removes the feature flag, so no validation is needed. But I've attached screenshots above to show that the Semantic search embedding model configuration is still working ☝️

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.

Related to #597029 (closed)

Edited by Pam Artiaga

Merge request reports

Loading