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

Commit c26d604

Browse files
committed
FIX: dependency validator should depend on default LLM setting
1 parent 7ae61ce commit c26d604

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

lib/configuration/llm_dependency_validator.rb

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,10 @@ def initialize(opts = {})
1010
def valid_value?(val)
1111
return true if val == "f"
1212

13-
if @opts[:name] == :ai_summarization_enabled || @opts[:name] == :ai_helper_enabled ||
14-
@opts[:name] == :ai_embeddings_semantic_search_enabled
15-
has_llms = LlmModel.count > 0
16-
@no_llms_configured = !has_llms
17-
has_llms
18-
else
19-
@llm_dependency_setting_name =
20-
DiscourseAi::Configuration::LlmValidator.new.choose_llm_setting_for(@opts[:name])
13+
@llm_dependency_setting_name =
14+
DiscourseAi::Configuration::LlmValidator.new.choose_llm_setting_for(@opts[:name])
2115

22-
SiteSetting.public_send(@llm_dependency_setting_name).present?
23-
end
16+
SiteSetting.public_send(@llm_dependency_setting_name).present?
2417
end
2518

2619
def error_message

lib/configuration/llm_vision_enumerator.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ def self.values
1616
WHERE vision_enabled
1717
SQL
1818

19-
values.each { |value_h| value_h[:value] = "custom:#{value_h[:value]}" }
20-
2119
values
2220
end
2321
end

0 commit comments

Comments
 (0)