Skip to content

A platform for community discussion. Free, open, simple.

FIX: Remove custom prefix when seeding personas for triage (#34066)

Roman Rizzi723e13473f72
diff --git a/plugins/discourse-ai/db/migrate/20250721080444_seed_personas_from_triage_scripts.rb b/plugins/discourse-ai/db/migrate/20250721080444_seed_personas_from_triage_scripts.rb
index f436c41c4f3..a4515f7b916 100644
--- a/plugins/discourse-ai/db/migrate/20250721080444_seed_personas_from_triage_scripts.rb
+++ b/plugins/discourse-ai/db/migrate/20250721080444_seed_personas_from_triage_scripts.rb
@@ -36,6 +36,11 @@ class SeedPersonasFromTriageScripts < ActiveRecord::Migration[8.0]
end
)
temp = field["temperature"] || "NULL"
+
+ # Extract the model ID from the setting value (e.g., "custom:-5" -> "-5")
+ model = field["model"] || "NULL"
+ model = model.split(":").last if model.start_with?("custom:")
+
row =
"'#{name}', 'Seeded Persona for an LLM Triage script', FALSE, '#{field["system_prompt"]}', #{temp}, #{field["model"]}, NOW(), NOW()"