Skip to content

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

DEV: Switch AI debug messages to off by default (#35320)

Natalie Tay4adc725d9b15
diff --git a/plugins/discourse-ai/evals/lib/boot.rb b/plugins/discourse-ai/evals/lib/boot.rb
index 11120dc587e..598cce0f6eb 100644
--- a/plugins/discourse-ai/evals/lib/boot.rb
+++ b/plugins/discourse-ai/evals/lib/boot.rb
@@ -31,6 +31,5 @@ Dir.chdir(discourse_path)
require "#{discourse_path}/config/environment"
-ENV["DISCOURSE_AI_NO_DEBUG"] = "1"
module DiscourseAi::Evals
end
diff --git a/plugins/discourse-ai/lib/completions/endpoints/base.rb b/plugins/discourse-ai/lib/completions/endpoints/base.rb
index f0f0bbc9702..55ec6e4fc67 100644
--- a/plugins/discourse-ai/lib/completions/endpoints/base.rb
+++ b/plugins/discourse-ai/lib/completions/endpoints/base.rb
@@ -279,7 +279,7 @@ module DiscourseAi
log.duration_msecs = (Time.now - start_time) * 1000
log.save!
LlmQuota.log_usage(@llm_model, user, log.request_tokens, log.response_tokens)
- if Rails.env.development? && !ENV["DISCOURSE_AI_NO_DEBUG"]
+ if Rails.env.development? && ENV["DISCOURSE_AI_DEBUG"]
puts "#{self.class.name}: request_tokens #{log.request_tokens} response_tokens #{log.response_tokens}"
end
end