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

Commit 2377b28

Browse files
committed
DEV: rely on default llm model in spec
1 parent 8da4318 commit 2377b28

33 files changed

+39
-39
lines changed

spec/configuration/llm_validator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
describe "#valid_value?" do
55
context "when the parent module is enabled and we try to reset the selected model" do
66
before do
7-
assign_fake_provider_to(:ai_summarization_model)
7+
assign_fake_provider_to(:ai_default_llm_model)
88
SiteSetting.ai_summarization_enabled = true
99
end
1010

spec/jobs/regular/fast_track_topic_gist_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
fab!(:post_2) { Fabricate(:post, topic: topic_1, post_number: 2) }
88

99
before do
10-
assign_fake_provider_to(:ai_summarization_model)
10+
assign_fake_provider_to(:ai_default_llm_model)
11+
1112
SiteSetting.ai_summarization_enabled = true
1213
SiteSetting.ai_summary_gists_enabled = true
1314
end

spec/jobs/regular/stream_composer_helper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RSpec.describe Jobs::StreamComposerHelper do
44
subject(:job) { described_class.new }
55

6-
before { assign_fake_provider_to(:ai_helper_model) }
6+
before { assign_fake_provider_to(:ai_default_llm_model) }
77

88
describe "#execute" do
99
let!(:input) { "I liek to eet pie fur brakefast becuz it is delishus." }

spec/jobs/regular/stream_post_helper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RSpec.describe Jobs::StreamPostHelper do
44
subject(:job) { described_class.new }
55

6-
before { assign_fake_provider_to(:ai_helper_model) }
6+
before { assign_fake_provider_to(:ai_default_llm_model) }
77

88
describe "#execute" do
99
fab!(:topic)

spec/jobs/regular/stream_topic_ai_summary_spec.rb

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

1212
before do
1313
Group.find(Group::AUTO_GROUPS[:trust_level_3]).add(user)
14-
assign_fake_provider_to(:ai_summarization_model)
14+
assign_fake_provider_to(:ai_default_llm_model)
1515
SiteSetting.ai_summarization_enabled = true
1616
end
1717

spec/jobs/scheduled/summaries_backfill_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
let(:intervals) { 12 } # budget is split into intervals. Job runs every five minutes.
99

1010
before do
11-
assign_fake_provider_to(:ai_summarization_model)
11+
assign_fake_provider_to(:ai_default_llm_model)
1212
SiteSetting.ai_summarization_enabled = true
1313
SiteSetting.ai_summary_backfill_maximum_topics_per_hour = limit
1414
SiteSetting.ai_summary_gists_enabled = true

spec/lib/guardian_extensions_spec.rb

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

88
before do
99
group.add(user)
10-
assign_fake_provider_to(:ai_summarization_model)
10+
assign_fake_provider_to(:ai_default_llm_model)
1111
SiteSetting.ai_summarization_enabled = true
1212
SiteSetting.ai_summary_gists_enabled = true
1313
end

spec/lib/modules/ai_helper/assistant_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fab!(:empty_locale_user) { Fabricate(:user, locale: "") }
66

77
before do
8-
assign_fake_provider_to(:ai_helper_model)
8+
assign_fake_provider_to(:ai_default_llm_model)
99
Group.refresh_automatic_groups!
1010
end
1111

spec/lib/modules/ai_helper/chat_thread_titler_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RSpec.describe DiscourseAi::AiHelper::ChatThreadTitler do
44
subject(:titler) { described_class.new(thread) }
55

6-
before { assign_fake_provider_to(:ai_helper_model) }
6+
before { assign_fake_provider_to(:ai_default_llm_model) }
77

88
fab!(:thread) { Fabricate(:chat_thread) }
99
fab!(:chat_message) { Fabricate(:chat_message, thread: thread) }

spec/lib/modules/ai_helper/entry_point_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fab!(:french_user) { Fabricate(:user, locale: "fr") }
66

77
it "will correctly localize available prompts" do
8-
assign_fake_provider_to(:ai_helper_model)
8+
assign_fake_provider_to(:ai_default_llm_model)
99
SiteSetting.default_locale = "en"
1010
SiteSetting.allow_user_locale = true
1111
SiteSetting.ai_helper_enabled = true
@@ -38,8 +38,7 @@
3838
end
3939

4040
it "will include auto_image_caption field in the user_option if image caption is enabled" do
41-
assign_fake_provider_to(:ai_helper_model)
42-
assign_fake_provider_to(:ai_helper_image_caption_model)
41+
assign_fake_provider_to(:ai_default_llm_model)
4342
SiteSetting.ai_helper_enabled = true
4443
SiteSetting.ai_helper_enabled_features = "image_caption"
4544
SiteSetting.ai_auto_image_caption_allowed_groups = "10" # tl0

0 commit comments

Comments
 (0)