Move AI infrastructure settings to application_settings

What does this MR do and why?

Moves 5 instance-level AI infrastructure settings from ai_settings to application_settings, as the first step of splitting the larger ai_settings org-scoping work (issue #531356):

  • ai_gateway_url
  • ai_gateway_timeout_seconds
  • enabled_instance_verbose_ai_logs
  • duo_agent_platform_service_url
  • self_hosted_duo_agent_platform_service_secure

These settings are infrastructure/deployment concerns that apply to the whole instance, in some cases we are unable to find a current organizations for those.

They may do better in application_settings rather than in the (soon to be org-scoped) ai_settings table.

This MR:

  • adds the 5 columns to application_settings (with limits/defaults and application_setting_columns definitions);
  • adds a post-deploy migration backfilling the values from the existing ai_settings record;
  • switches Gitlab::Duo::Administration::VerifySelfHostedSetup and Gitlab::Duo::Developments::Setup to read/write via Gitlab::CurrentSettings;
  • updates developer documentation for application settings.

The old ai_settings columns are not dropped here; column removal will follow the standard multi-release process (planned for %19.5 via ignore_columns) in a follow-up MR.

References

Database

  • Migration: db/migrate/20260705100000_add_ai_infrastructure_columns_to_application_settings.rb
  • Post-deploy backfill: db/post_migrate/20260705100100_backfill_ai_infrastructure_settings_from_ai_settings.rb

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 Alper Akgun

Merge request reports

Loading