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

Commit 7af3ce8

Browse files
committed
DEV: Remove references to translation model
1 parent 5841543 commit 7af3ce8

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ discourse_ai:
488488
client: true
489489
validator: "DiscourseAi::Configuration::LlmDependencyValidator"
490490
area: "ai-features/translation"
491-
ai_translation_model:
491+
ai_translation_model: # Deprecated. TODO(keegan): Remove 2025-09-01
492492
default: ""
493493
type: enum
494494
allow_any: false

lib/translation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module DiscourseAi
44
module Translation
55
def self.enabled?
66
SiteSetting.discourse_ai_enabled && SiteSetting.ai_translation_enabled &&
7-
SiteSetting.ai_translation_model.present? &&
7+
SiteSetting.ai_default_llm_model.present? &&
88
SiteSetting.content_localization_supported_locales.present?
99
end
1010

spec/configuration/feature_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
fab!(:llm_model)
77
fab!(:ai_persona) { Fabricate(:ai_persona, default_llm_id: llm_model.id) }
88

9+
before { assign_fake_provider_to(:ai_default_llm_model) }
10+
911
def allow_configuring_setting(&block)
1012
DiscourseAi::Completions::Llm.with_prepared_responses(["OK"]) { block.call }
1113
end

spec/lib/translation/language_detector_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
allow(DiscourseAi::Completions::Prompt).to receive(:new).and_return(mock_prompt)
3636
allow(DiscourseAi::Completions::Llm).to receive(:proxy).with(
37-
SiteSetting.ai_translation_model,
37+
SiteSetting.ai_default_llm_model,
3838
).and_return(mock_llm)
3939
allow(mock_llm).to receive(:generate).with(
4040
mock_prompt,

0 commit comments

Comments
 (0)