Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove deprecated AI plugin settings (#37459)

Keegan George9ab55e9a28df
diff --git a/plugins/discourse-ai/config/locales/server.en.yml b/plugins/discourse-ai/config/locales/server.en.yml
index fc0fb7e249d..c584a8bce0b 100644
--- a/plugins/discourse-ai/config/locales/server.en.yml
+++ b/plugins/discourse-ai/config/locales/server.en.yml
@@ -87,19 +87,14 @@ en:
ai_spam_detection_max_trust_level: "Maximum trust level of users to scan for spam"
ai_openai_api_key: "API key for OpenAI API. ONLY used for Image creation and edits. For GPT use the LLM config tab"
- ai_openai_image_generation_url: "URL for OpenAI image generation API"
- ai_openai_image_edit_url: "URL for OpenAI image edit API"
ai_helper_enabled: "Enable the AI helper."
composer_ai_helper_allowed_groups: "Users on these groups will see the AI helper button in the composer."
ai_helper_allowed_in_pm: "Enable the composer's AI helper in PMs."
- ai_helper_model: "Model to use for the AI helper."
ai_helper_automatic_chat_thread_title_delay: "Delay in minutes before the AI helper automatically sets the chat thread title."
ai_helper_automatic_chat_thread_title: "Automatically set the chat thread titles based on thread contents."
- ai_helper_illustrate_post_model: "Model to use for the composer AI helper's illustrate post feature"
ai_helper_enabled_features: "Select the features to enable in the AI helper."
post_ai_helper_allowed_groups: "User groups allowed to access AI Helper features in posts"
- ai_helper_image_caption_model: "Select the model to use for generating image captions"
ai_helper_post_illustrator_persona: "The persona to use for the AI helper's illustrate post feature. Note: you must also create an image generation tool (Admin > Plugins > Discourse AI > Tools) for this feature to work."
ai_embeddings_selected_model: "Use the selected model for generating embeddings."
@@ -113,16 +108,12 @@ en:
ai_embeddings_semantic_related_include_closed_topics: "Include closed topics in semantic search results"
ai_embeddings_semantic_related_age_penalty: "Apply exponential age penalty to topics in semantic search results. 0.0 = no penalty, 0.3 = gentle bias toward recently active content, 1.0+ = strong recency bias."
ai_embeddings_semantic_related_age_time_scale: "Time scale in days for age penalty calculation. Topics inactive this many days receive ~50% penalty with penalty=1.0. Use 365 for yearly scale, 90 for quarterly scale."
- ai_embeddings_semantic_search_hyde_model: "Model used to expand keywords to get better results during a semantic search"
ai_embeddings_per_post_enabled: Generate embeddings for each post
ai_summarization_enabled: "Enable the summarize feature"
- ai_summarization_model: "Model to use for summarization"
ai_summarization_persona: "Persona to use for summarize feature"
- ai_custom_summarization_allowed_groups: "Groups allowed to use create new summaries."
ai_pm_summarization_allowed_groups: "Groups allowed to create and view summaries in PMs."
ai_summary_gists_enabled: "Generate brief summaries of latest replies in topics automatically"
- ai_summary_gists_allowed_groups: "Groups allowed to see gists in the hot topics list."
ai_summary_backfill_maximum_topics_per_hour: "Number of topic summaries to backfill per hour."
ai_bot_enabled: "Enable the AI Bot module."
@@ -138,10 +129,6 @@ en:
ai_discover_enabled: "Enable the discovery search feature"
ai_discover_persona: "Persona to use for discovery search feature"
- ai_stability_api_key: "API key for the stability.ai API"
- ai_stability_engine: "Image generation engine to use for the stability.ai API"
- ai_stability_api_url: "URL for the stability.ai API"
-
ai_google_custom_search_api_key: "API key for the Google Custom Search API see: https://developers.google.com/custom-search"
ai_google_custom_search_cx: "CX for Google Custom Search API"
@@ -153,7 +140,6 @@ en:
ai_discord_allowed_guilds: "Discord guilds (servers) where the bot is allowed to search"
ai_translation_enabled: "Enable the AI translation feature"
- ai_translation_model: "The model to use for translation. This model must support translation. Personas can override this setting."
ai_translation_backfill_limit_to_public_content: "When enabled, only content in public categories will be translated. When disabled, content in group PMs and private categories will also be sent for translation."
ai_translation_include_bot_content: "When enabled, content written by bots (user IDs below 0) will also be sent for translation."
ai_translation_max_post_length: "The maximum number of characters for a post to be translated. Posts longer than this will not be translated."
diff --git a/plugins/discourse-ai/config/settings.yml b/plugins/discourse-ai/config/settings.yml
index 8f6b5c2c33e..c1baa99ff73 100644
--- a/plugins/discourse-ai/config/settings.yml
+++ b/plugins/discourse-ai/config/settings.yml
@@ -77,30 +77,6 @@ discourse_ai:
default: false
hidden: true
- # Deprecated image generation settings - TODO(keegan): Remove 2026-02-01
- ai_openai_image_generation_url:
- default: ""
- hidden: true
- ai_openai_image_edit_url:
- default: ""
- hidden: true
- ai_stability_api_key:
- default: ""
- secret: true
- hidden: true
- ai_stability_api_url:
- default: ""
- hidden: true
- ai_stability_engine:
- default: ""
- hidden: true
- ai_helper_illustrate_post_model:
- default: ""
- type: enum
- allow_any: false
- enum: "DiscourseAi::Configuration::LlmEnumerator"
- hidden: true
-
ai_helper_enabled:
default: false
client: true
@@ -117,19 +93,6 @@ discourse_ai:
default: false
client: true
area: "ai-features/ai_helper"
- ai_helper_model: # Deprecated. TODO(keegan): Remove 2025-09-01
- default: ""
- allow_any: false
- type: enum
- enum: "DiscourseAi::Configuration::LlmEnumerator"
- hidden: true
- ai_helper_custom_prompts_allowed_groups: # Deprecated. TODO(roman): Remove 2025-09-01
- type: group_list
- list_type: compact
- default: "3" # 3: @staff
- allow_any: false
- refresh: true
- hidden: true
post_ai_helper_allowed_groups:
type: group_list
list_type: compact
@@ -155,11 +118,6 @@ discourse_ai:
- "context_menu"
- "image_caption"
area: "ai-features/ai_helper"
- ai_helper_image_caption_model: # Deprecated. TODO(keegan): Remove 2025-09-01
- default: ""
- type: enum
- enum: "DiscourseAi::Configuration::LlmVisionEnumerator"
- hidden: true
ai_helper_proofreader_persona:
default: "-22"
type: enum
@@ -263,12 +221,6 @@ discourse_ai:
default: false
validator: "DiscourseAi::Configuration::LlmDependencyValidator"
area: "ai-features/embeddings"
- ai_embeddings_semantic_search_hyde_model: # Deprecated. TODO(keegan): Remove 2025-09-01
- hidden: true
- default: ""
- type: enum
- allow_any: false
- enum: "DiscourseAi::Configuration::LlmEnumerator"
ai_embeddings_semantic_quick_search_enabled:
default: false
client: true
@@ -312,12 +264,6 @@ discourse_ai:
client: true
validator: "DiscourseAi::Configuration::LlmDependencyValidator"
area: "ai-features/summarization"
- ai_summarization_model: # Deprecated. TODO(keegan): Remove 2025-09-01
- default: ""
- allow_any: false
- type: enum
- enum: "DiscourseAi::Configuration::LlmEnumerator"
- hidden: true
ai_summarization_persona:
default: "-11"
type: enum
@@ -328,11 +274,6 @@ discourse_ai:
list_type: compact
default: ""
area: "ai-features/summarization"
- ai_custom_summarization_allowed_groups: # Deprecated. TODO(roman): Remove 2025-09-01
- type: group_list
- list_type: compact
- default: "3|13" # 3: @staff, 13: @trust_level_3
- hidden: true
ai_summary_gists_enabled:
default: false
client: true
@@ -342,11 +283,6 @@ discourse_ai:
type: enum
enum: "DiscourseAi::Configuration::PersonaEnumerator"
area: "ai-features/summarization"
- ai_summary_gists_allowed_groups: # Deprecated. TODO(roman): Remove 2025-09-01
- type: group_list
- list_type: compact
- default: "0" #everyone
- hidden: true
ai_summary_backfill_topic_max_age_days:
default: 30
min: 1
@@ -419,9 +355,6 @@ discourse_ai:
client: true
enum: "DiscourseAi::Configuration::PersonaEnumerator"
area: "ai-features/search"
- ai_bot_discover_persona: # Replaced by ai_discover_persona. TODO(roman): Remove 2026-01-01
- default: ""
- hidden: true
ai_automation_max_triage_per_minute:
default: 60
hidden: true
@@ -486,12 +419,6 @@ discourse_ai:
client: true
validator: "DiscourseAi::Configuration::LlmDependencyValidator"
area: "ai-features/translation"
- ai_translation_model: # Deprecated. TODO(keegan): Remove 2025-09-01
- default: ""
- type: enum
- allow_any: false
- enum: "DiscourseAi::Configuration::LlmEnumerator"
- hidden: true
ai_translation_locale_detector_persona:
default: "-27"
type: enum
diff --git a/plugins/discourse-ai/plugin.rb b/plugins/discourse-ai/plugin.rb
index 14bbb99ffc0..c798f90add9 100644
--- a/plugins/discourse-ai/plugin.rb
+++ b/plugins/discourse-ai/plugin.rb
@@ -114,10 +114,7 @@ after_initialize do
end
end
- if Rails.env.test?
- require_relative "spec/support/embeddings_generation_stubs"
- require_relative "spec/support/stable_diffusion_stubs"
- end
+ require_relative "spec/support/embeddings_generation_stubs" if Rails.env.test?
reloadable_patch do |plugin|
Guardian.prepend DiscourseAi::GuardianExtensions
diff --git a/plugins/discourse-ai/spec/plugin_spec.rb b/plugins/discourse-ai/spec/plugin_spec.rb
index 1c9da2a76f1..4362aff027f 100644
--- a/plugins/discourse-ai/spec/plugin_spec.rb
+++ b/plugins/discourse-ai/spec/plugin_spec.rb
@@ -9,7 +9,6 @@ describe Plugin::Instance do
before do
assign_fake_provider_to(:ai_default_llm_model)
SiteSetting.ai_helper_enabled = true
- SiteSetting.ai_helper_illustrate_post_model = "disabled"
Group.find_by(id: Group::AUTO_GROUPS[:admins]).add(user)
Group.refresh_automatic_groups!
diff --git a/plugins/discourse-ai/spec/requests/admin/ai_llms_controller_spec.rb b/plugins/discourse-ai/spec/requests/admin/ai_llms_controller_spec.rb
index 1ce1a022b2a..abcce3fec02 100644
--- a/plugins/discourse-ai/spec/requests/admin/ai_llms_controller_spec.rb
+++ b/plugins/discourse-ai/spec/requests/admin/ai_llms_controller_spec.rb
@@ -573,7 +573,6 @@ RSpec.describe DiscourseAi::Admin::AiLlmsController do
context "with llms configured" do
fab!(:ai_persona) { Fabricate(:ai_persona, default_llm_id: llm_model.id) }
- before { assign_fake_provider_to(:ai_helper_model) }
it "validates the model is not in use" do
delete "/admin/plugins/discourse-ai/ai-llms/#{llm_model.id}.json"
expect(response.status).to eq(409)
diff --git a/plugins/discourse-ai/spec/requests/summarization/chat_summary_controller_spec.rb b/plugins/discourse-ai/spec/requests/summarization/chat_summary_controller_spec.rb
index 826711bdc4c..ddb505fce36 100644
--- a/plugins/discourse-ai/spec/requests/summarization/chat_summary_controller_spec.rb
+++ b/plugins/discourse-ai/spec/requests/summarization/chat_summary_controller_spec.rb
@@ -11,7 +11,6 @@ RSpec.describe DiscourseAi::Summarization::ChatSummaryController do
assign_fake_provider_to(:ai_default_llm_model)
SiteSetting.ai_summarization_enabled = true
- SiteSetting.ai_custom_summarization_allowed_groups = group.id
SiteSetting.chat_enabled = true
SiteSetting.chat_allowed_groups = group.id
diff --git a/plugins/discourse-ai/spec/support/stable_diffusion_stubs.rb b/plugins/discourse-ai/spec/support/stable_diffusion_stubs.rb
deleted file mode 100644
index da32248cb52..00000000000
--- a/plugins/discourse-ai/spec/support/stable_diffusion_stubs.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class StableDiffusionStubs
- include RSpec::Matchers
-
- def stub_response(prompt, images)
- artifacts = images.map { |i| { base64: i } }
-
- WebMock
- .stub_request(
- :post,
- "https://api.stability.dev/v1/generation/#{SiteSetting.ai_stability_engine}/text-to-image",
- )
- .with do |request|
- json = JSON.parse(request.body, symbolize_names: true)
- expect(json[:text_prompts][0][:text]).to eq(prompt)
- true
- end
- .to_return(status: 200, body: { artifacts: artifacts }.to_json)
- end
-end