Skip to content

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

FIX: Disable AI Problem Checks (#35475)

Roman Rizzi424edb1b4b33
diff --git a/plugins/discourse-ai/db/post_migrate/20251017150024_delete_ai_problem_check_trackers.rb b/plugins/discourse-ai/db/post_migrate/20251017150024_delete_ai_problem_check_trackers.rb
new file mode 100644
index 00000000000..fec58e1d5ef
--- /dev/null
+++ b/plugins/discourse-ai/db/post_migrate/20251017150024_delete_ai_problem_check_trackers.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+class DeleteAiProblemCheckTrackers < ActiveRecord::Migration[8.0]
+ def up
+ tracker_identifiers = %w[ai_llm_status ai_credit_soft_limit ai_credit_hard_limit]
+
+ DB.exec(<<~SQL, tracker_identifiers: tracker_identifiers)
+ DELETE FROM problem_check_trackers
+ WHERE identifier IN (:tracker_identifiers)
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/plugins/discourse-ai/plugin.rb b/plugins/discourse-ai/plugin.rb
index bd4ff213421..56b46d8cecd 100644
--- a/plugins/discourse-ai/plugin.rb
+++ b/plugins/discourse-ai/plugin.rb
@@ -101,9 +101,9 @@ after_initialize do
DiscourseAi::Discover::EntryPoint.new,
].each { |a_module| a_module.inject_into(self) }
- register_problem_check ProblemCheck::AiLlmStatus
- register_problem_check ProblemCheck::AiCreditSoftLimit
- register_problem_check ProblemCheck::AiCreditHardLimit
+ #register_problem_check ProblemCheck::AiLlmStatus
+ #register_problem_check ProblemCheck::AiCreditSoftLimit
+ #register_problem_check ProblemCheck::AiCreditHardLimit
register_reviewable_type ReviewableAiChatMessage
register_reviewable_type ReviewableAiPost
diff --git a/plugins/discourse-ai/spec/jobs/regular/run_problem_check_spec.rb b/plugins/discourse-ai/spec/jobs/regular/run_problem_check_spec.rb
index 38651a69884..03f5882d42b 100644
--- a/plugins/discourse-ai/spec/jobs/regular/run_problem_check_spec.rb
+++ b/plugins/discourse-ai/spec/jobs/regular/run_problem_check_spec.rb
@@ -3,7 +3,7 @@
RSpec.describe Jobs::RunProblemCheck do
subject(:run_check_job) { described_class.new }
- describe "integration specs for AI-based problem checks" do
+ xdescribe "integration specs for AI-based problem checks" do
before { enable_current_plugin }
context "when running AI LLM status checks" do