From a8b820256721df01389e73c709082edb504cec12 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Sat, 26 Jul 2025 11:40:40 +0530 Subject: [PATCH] fix: logic --- pr_agent/algo/ai_handlers/litellm_ai_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pr_agent/algo/ai_handlers/litellm_ai_handler.py b/pr_agent/algo/ai_handlers/litellm_ai_handler.py index a22906fe..ed77daf6 100644 --- a/pr_agent/algo/ai_handlers/litellm_ai_handler.py +++ b/pr_agent/algo/ai_handlers/litellm_ai_handler.py @@ -353,9 +353,10 @@ class LiteLLMAIHandler(BaseAiHandler): kwargs = _process_litellm_extra_body(kwargs) # Support for Bedrock custom inference profile via model_id - if get_settings().get("LITELLM.MODEL_ID", None) and 'bedrock/' in model: - kwargs["model_id"] = get_settings().litellm.model_id - get_logger().info(f"Using Bedrock custom inference profile: {get_settings().litellm.model_id}") + model_id = get_settings().get("litellm.model_id") + if model_id and 'bedrock/' in model: + kwargs["model_id"] = model_id + get_logger().info(f"Using Bedrock custom inference profile: {model_id}") get_logger().debug("Prompts", artifact={"system": system, "user": user})