Skip to content

Commit

Permalink
DEV: Unreachable LLM error shouldn't prevent setting (#1036)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
keegangeorge authored Dec 20, 2024
1 parent 6a7a45f commit 059b3fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/configuration/llm_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def valid_value?(val)
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)
Expand Down

0 comments on commit 059b3fa

Please sign in to comment.