Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit b58f198

Browse files
committed
FIX: don't run_test in testing env
1 parent 88811f9 commit b58f198

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/configuration/simple_llm_validator.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ def valid_value?(val)
1818
end
1919

2020
def run_test(val)
21+
if Rails.env.test?
22+
# In test mode, we assume the model is reachable.
23+
return true
24+
end
25+
2126
DiscourseAi::Completions::Llm
2227
.proxy(val)
2328
.generate("How much is 1 + 1?", user: nil, feature_name: "llm_validator")

0 commit comments

Comments
 (0)