A platform for community discussion. Free, open, simple.
FIX: use blank? check for role_arn validation (#36009)
Rafael dos Santos Silva9bb15488bdcf
diff --git a/plugins/discourse-ai/app/models/llm_model.rb b/plugins/discourse-ai/app/models/llm_model.rbindex 8e27e779cb5..c1d58aa47db 100644--- a/plugins/discourse-ai/app/models/llm_model.rb+++ b/plugins/discourse-ai/app/models/llm_model.rb@@ -193,7 +193,7 @@ class LlmModel < ActiveRecord::Basereturn nil unless provider == BEDROCK_PROVIDER_NAMErole_arn = lookup_custom_param("role_arn")- return nil unless role_arn+ return nil if role_arn.blank?# Invalidate cache if role_arn changedif @cached_role_arn != role_arn