diff --git a/pr_agent/algo/ai_handler.py b/pr_agent/algo/ai_handler.py index 6d873cd9..24273db6 100644 --- a/pr_agent/algo/ai_handler.py +++ b/pr_agent/algo/ai_handler.py @@ -63,6 +63,9 @@ class AiHandler: "VERTEXAI.VERTEX_LOCATION", None ) if get_settings().get("AWS.BEDROCK_REGION", None): + litellm.AmazonAnthropicConfig.max_tokens_to_sample = int(get_settings().get( + "AWS.CLAUDE_MAX_TOKENS_TO_SAMPLE", '2000' + )) self.aws_bedrock_client = boto3.client( service_name="bedrock-runtime", region_name=get_settings().aws.bedrock_region,