From 059b3fabb8922b0577e6d73a9f7654b4a0903067 Mon Sep 17 00:00:00 2001 From: Keegan George Date: Sat, 21 Dec 2024 04:52:11 +0900 Subject: [PATCH] DEV: Unreachable LLM error shouldn't prevent setting (#1036) Previously we had the behaviour for model settings so that when you try and set a model, it runs a test and returns an error if it can't run the test successfully. The error then prevents you from setting the site setting. This results in some issues when we try and automate things. This PR updates that so that the test runs and discreetly logs the changes, but doesn't prevent the setting from being set. Instead we rely on "run test" in the LLM config along with ProblemChecks to catch issues. --- lib/configuration/llm_validator.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/configuration/llm_validator.rb b/lib/configuration/llm_validator.rb index 732a7af2..44d94b33 100644 --- a/lib/configuration/llm_validator.rb +++ b/lib/configuration/llm_validator.rb @@ -20,8 +20,7 @@ module DiscourseAi run_test(val).tap { |result| @unreachable = result } rescue StandardError => e raise e if Rails.env.test? - @unreachable = true - false + true end def run_test(val)