This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 ,
You can’t perform that action at this time.
0 commit comments