From 349676457688234e2056327f5967f02a51e40200 Mon Sep 17 00:00:00 2001 From: YashRaj <91825864+YashRajCodes@users.noreply.github.com> Date: Tue, 16 Sep 2025 06:17:35 +0530 Subject: [PATCH] fix: Display embedding model config in the super admin ui (#12303) ## Description This fixes an oversight from my previous PR #12120 where I forgot to add the config key to the enterprise config controller, leading to the configuration not being showed in the super admin panel. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? I believe this is the correct code change but haven't ran a full test due to hardware constraints. It would be ideal if you could perform a quick check on this. ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- .../enterprise/super_admin/app_configs_controller.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/enterprise/app/controllers/enterprise/super_admin/app_configs_controller.rb b/enterprise/app/controllers/enterprise/super_admin/app_configs_controller.rb index 5466c86a4..5e70d2d79 100644 --- a/enterprise/app/controllers/enterprise/super_admin/app_configs_controller.rb +++ b/enterprise/app/controllers/enterprise/super_admin/app_configs_controller.rb @@ -10,7 +10,7 @@ module Enterprise::SuperAdmin::AppConfigsController when 'internal' @allowed_configs = internal_config_options when 'captain' - @allowed_configs = %w[CAPTAIN_OPEN_AI_API_KEY CAPTAIN_OPEN_AI_MODEL CAPTAIN_OPEN_AI_ENDPOINT CAPTAIN_FIRECRAWL_API_KEY] + @allowed_configs = captain_config_options else super end @@ -36,4 +36,14 @@ module Enterprise::SuperAdmin::AppConfigsController CAPTAIN_CLOUD_PLAN_LIMITS ACCOUNT_SECURITY_NOTIFICATION_WEBHOOK_URL CHATWOOT_INSTANCE_ADMIN_EMAIL OG_IMAGE_CDN_URL OG_IMAGE_CLIENT_REF CLOUDFLARE_API_KEY CLOUDFLARE_ZONE_ID] end + + def captain_config_options + %w[ + CAPTAIN_OPEN_AI_API_KEY + CAPTAIN_OPEN_AI_MODEL + CAPTAIN_OPEN_AI_ENDPOINT + CAPTAIN_EMBEDDING_MODEL + CAPTAIN_FIRECRAWL_API_KEY + ] + end end