@@ -1479,14 +1479,14 @@ async def test_no_add_note_when_not_available(bedrock_client, model, alist, mess
14791479
14801480@pytest .mark .skipif (sys .version_info < (3 , 11 ), reason = "This test requires Python 3.11 or higher (need add_note)" )
14811481@pytest .mark .asyncio
1482- async def test_add_note_on_access_denied_exception (bedrock_client , model , alist , messages ):
1483- """Test that add_note adds documentation link for AccessDeniedException ."""
1482+ async def test_add_note_on_validation_exception_identifier (bedrock_client , model , alist , messages ):
1483+ """Test that add_note adds documentation link for ValidationException about invalid model identifier ."""
14841484 # Mock the client error response for access denied
14851485 error_response = {
14861486 "Error" : {
1487- "Code" : "AccessDeniedException " ,
1488- "Message" : "An error occurred (AccessDeniedException ) when calling the ConverseStream operation: "
1489- "You don't have access to the model with the specified model ID ." ,
1487+ "Code" : "ValidationException " ,
1488+ "Message" : "An error occurred (ValidationException ) when calling the ConverseStream operation: "
1489+ "The provided model identifier is invalid ." ,
14901490 }
14911491 }
14921492 bedrock_client .converse_stream .side_effect = ClientError (error_response , "ConversationStream" )
@@ -1499,7 +1499,7 @@ async def test_add_note_on_access_denied_exception(bedrock_client, model, alist,
14991499 "└ Bedrock region: us-west-2" ,
15001500 "└ Model id: m1" ,
15011501 "└ For more information see "
1502- "https://strandsagents.com/latest /user-guide/concepts/model-providers/amazon-bedrock/#model-access-issue " ,
1502+ "https://strandsagents.com/docs /user-guide/concepts/model-providers/amazon-bedrock/#model-identifier-is-invalid " ,
15031503 ]
15041504
15051505
@@ -1527,7 +1527,7 @@ async def test_add_note_on_validation_exception_throughput(bedrock_client, model
15271527 "└ Bedrock region: us-west-2" ,
15281528 "└ Model id: m1" ,
15291529 "└ For more information see "
1530- "https://strandsagents.com/latest /user-guide/concepts/model-providers/amazon-bedrock/#on-demand-throughput-isnt-supported" ,
1530+ "https://strandsagents.com/docs /user-guide/concepts/model-providers/amazon-bedrock/#on-demand-throughput-isnt-supported" ,
15311531 ]
15321532
15331533
0 commit comments