From 225f411abc122087d484fb41d495d340ce5abb80 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 10 Jan 2026 12:45:31 -0800 Subject: [PATCH] aws fix base --- tests/test_litellm/llms/bedrock/test_base_aws_llm.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_litellm/llms/bedrock/test_base_aws_llm.py b/tests/test_litellm/llms/bedrock/test_base_aws_llm.py index f5856cd12d6..45fb418e79a 100644 --- a/tests/test_litellm/llms/bedrock/test_base_aws_llm.py +++ b/tests/test_litellm/llms/bedrock/test_base_aws_llm.py @@ -14,15 +14,16 @@ from datetime import datetime, timedelta, timezone from typing import Any, Dict from unittest.mock import MagicMock, patch +from botocore.awsrequest import AWSPreparedRequest, AWSRequest from botocore.credentials import Credentials -from botocore.awsrequest import AWSRequest, AWSPreparedRequest + import litellm +from litellm.caching.caching import DualCache from litellm.llms.bedrock.base_aws_llm import ( AwsAuthError, BaseAWSLLM, Boto3CredentialsInfo, ) -from litellm.caching.caching import DualCache # Global variable for the base_aws_llm.py file path @@ -582,7 +583,7 @@ def test_eks_irsa_ambient_credentials_used(): ) # Should create STS client without explicit credentials (using ambient credentials) - mock_boto3_client.assert_called_once_with("sts") + mock_boto3_client.assert_called_once_with("sts", verify=True) # Should call assume_role mock_sts_client.assume_role.assert_called_once_with( @@ -642,6 +643,7 @@ def test_explicit_credentials_used_when_provided(): aws_access_key_id="explicit-access-key", aws_secret_access_key="explicit-secret-key", aws_session_token="assumed-session-token", + verify=True, ) # Should call assume_role @@ -701,6 +703,7 @@ def test_partial_credentials_still_use_ambient(): aws_access_key_id="AKIAEXAMPLE", aws_secret_access_key=None, aws_session_token=None, + verify=True, ) # Should still call assume_role @@ -748,7 +751,7 @@ def test_cross_account_role_assumption(): ) # Should use ambient credentials - mock_boto3_client.assert_called_once_with("sts") + mock_boto3_client.assert_called_once_with("sts", verify=True) # Should call assume_role with cross-account role mock_sts_client.assume_role.assert_called_once_with(