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.
This commit is contained in:
Keegan George 2024-12-21 04:52:11 +09:00 committed by GitHub
parent 6a7a45fd4f
commit 059b3fabb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -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)