Pass instance_beta_features_enabled to AI Catalog frontend

What does this MR do and why?

Related to !226615 (merged), which adds two gating mechanisms for MCP-related tools in Agent Catalog (comment):

  1. instance_beta_features_enabled — experimental namespace setting
  2. mcp_catalog_agent_tools — feature flag being added in %18.10

This MR passes instance_beta_features_enabled to the three AI Catalog frontend entry points (explore catalog, project agents platform, group agents platform) so the UI can conditionally show MCP-related features.

The value depends on deployment type:

  • SaaS: checks per-namespace experiment_features_enabled setting via Ai::Catalog.user_can_access_experimental_and_beta_features?
  • Self-managed/Dedicated: checks instance_level_ai_beta_features_enabled on Gitlab::CurrentSettings

Also moves Ai::Catalog.user_can_access_experimental_and_beta_features? from private to public so helpers and views can call it directly.

References

How to set up and validate locally

GDK mode setup

SaaS mode:

  1. Add GITLAB_SIMULATE_SAAS: '1' under the env: key in ~/gdk/gdk.yml:
    env:
      GITLAB_SIMULATE_SAAS: '1'
  2. Run gdk reconfigure && gdk restart
  3. Seed the Duo group if you haven't already:
    GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup'
  4. Verify in Rails console: Gitlab.com? should return true

Self-managed mode:

  1. Remove GITLAB_SIMULATE_SAAS from ~/gdk/gdk.yml (or set it to '0')
  2. Run gdk reconfigure && gdk restart
  3. Verify in Rails console: Gitlab.com? should return false

Toggle the settings

How to verify in Chrome

Navigate to the page, then View Page Source and search for instance-beta-features-enabled. The attribute appears on the mount element in the raw HTML:

  • AI Catalog (/explore/ai-catalog) — look for <div id="js-ai-catalog" data-...instance-beta-features-enabled="true"...>

Screenshots

SAAS MODE

Experimental Settings HTML DIV!
Screenshot_2026-04-06_at_1.32.25_PM Screenshot_2026-04-06_at_1.33.20_PM
Screenshot_2026-04-06_at_1.32.55_PM Screenshot_2026-04-06_at_1.34.16_PM

Self-Managed Mode

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 Nathan Weinshenker

Merge request reports

Loading
Loading