@@ -440,9 +440,11 @@ async def test_retrieve_response_vector_db_available(prepare_agent_mocks, mocker
440440 mock_client , mock_agent = prepare_agent_mocks
441441 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
442442 mock_client .shields .list .return_value = []
443- mock_vector_db = mocker .Mock ()
444- mock_vector_db .identifier = "VectorDB-1"
445- mock_client .vector_dbs .list .return_value = [mock_vector_db ]
443+ mock_vector_store = mocker .Mock ()
444+ mock_vector_store .id = "VectorDB-1"
445+ mock_list_response = mocker .Mock ()
446+ mock_list_response .data = [mock_vector_store ]
447+ mock_client .vector_stores .list .return_value = mock_list_response
446448
447449 # Mock configuration with empty MCP servers
448450 mock_config = mocker .Mock ()
@@ -483,7 +485,9 @@ async def test_retrieve_response_no_available_shields(prepare_agent_mocks, mocke
483485 mock_client , mock_agent = prepare_agent_mocks
484486 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
485487 mock_client .shields .list .return_value = []
486- mock_client .vector_dbs .list .return_value = []
488+ mock_list_response = mocker .Mock ()
489+ mock_list_response .data = []
490+ mock_client .vector_stores .list .return_value = mock_list_response
487491
488492 # Mock configuration with empty MCP servers
489493 mock_config = mocker .Mock ()
@@ -537,7 +541,9 @@ def __repr__(self):
537541 mock_client , mock_agent = prepare_agent_mocks
538542 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
539543 mock_client .shields .list .return_value = [MockShield ("shield1" )]
540- mock_client .vector_dbs .list .return_value = []
544+ mock_list_response = mocker .Mock ()
545+ mock_list_response .data = []
546+ mock_client .vector_stores .list .return_value = mock_list_response
541547
542548 # Mock configuration with empty MCP servers
543549 mock_config = mocker .Mock ()
@@ -592,7 +598,9 @@ def __repr__(self):
592598 MockShield ("shield1" ),
593599 MockShield ("shield2" ),
594600 ]
595- mock_client .vector_dbs .list .return_value = []
601+ mock_list_response = mocker .Mock ()
602+ mock_list_response .data = []
603+ mock_client .vector_stores .list .return_value = mock_list_response
596604
597605 # Mock configuration with empty MCP servers
598606 mock_config = mocker .Mock ()
@@ -649,7 +657,9 @@ def __repr__(self):
649657 MockShield ("output_shield3" ),
650658 MockShield ("inout_shield4" ),
651659 ]
652- mock_client .vector_dbs .list .return_value = []
660+ mock_list_response = mocker .Mock ()
661+ mock_list_response .data = []
662+ mock_client .vector_stores .list .return_value = mock_list_response
653663
654664 # Mock configuration with empty MCP servers
655665 mock_config = mocker .Mock ()
@@ -700,7 +710,9 @@ async def test_retrieve_response_with_one_attachment(prepare_agent_mocks, mocker
700710 mock_client , mock_agent = prepare_agent_mocks
701711 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
702712 mock_client .shields .list .return_value = []
703- mock_client .vector_dbs .list .return_value = []
713+ mock_list_response = mocker .Mock ()
714+ mock_list_response .data = []
715+ mock_client .vector_stores .list .return_value = mock_list_response
704716
705717 # Mock configuration with empty MCP servers
706718 mock_config = mocker .Mock ()
@@ -752,7 +764,9 @@ async def test_retrieve_response_with_two_attachments(prepare_agent_mocks, mocke
752764 mock_client , mock_agent = prepare_agent_mocks
753765 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
754766 mock_client .shields .list .return_value = []
755- mock_client .vector_dbs .list .return_value = []
767+ mock_list_response = mocker .Mock ()
768+ mock_list_response .data = []
769+ mock_client .vector_stores .list .return_value = mock_list_response
756770
757771 # Mock configuration with empty MCP servers
758772 mock_config = mocker .Mock ()
@@ -1157,7 +1171,9 @@ async def test_retrieve_response_with_mcp_servers(prepare_agent_mocks, mocker):
11571171 mock_client , mock_agent = prepare_agent_mocks
11581172 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
11591173 mock_client .shields .list .return_value = []
1160- mock_client .vector_dbs .list .return_value = []
1174+ mock_list_response = mocker .Mock ()
1175+ mock_list_response .data = []
1176+ mock_client .vector_stores .list .return_value = mock_list_response
11611177
11621178 # Mock configuration with MCP servers
11631179 mcp_servers = [
@@ -1236,7 +1252,9 @@ async def test_retrieve_response_with_mcp_servers_empty_token(
12361252 mock_client , mock_agent = prepare_agent_mocks
12371253 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
12381254 mock_client .shields .list .return_value = []
1239- mock_client .vector_dbs .list .return_value = []
1255+ mock_list_response = mocker .Mock ()
1256+ mock_list_response .data = []
1257+ mock_client .vector_stores .list .return_value = mock_list_response
12401258
12411259 # Mock configuration with MCP servers
12421260 mcp_servers = [
@@ -1298,7 +1316,9 @@ async def test_retrieve_response_with_mcp_servers_and_mcp_headers(mocker):
12981316 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
12991317 mock_client = mocker .AsyncMock ()
13001318 mock_client .shields .list .return_value = []
1301- mock_client .vector_dbs .list .return_value = []
1319+ mock_list_response = mocker .Mock ()
1320+ mock_list_response .data = []
1321+ mock_client .vector_stores .list .return_value = mock_list_response
13021322
13031323 # Mock configuration with MCP servers
13041324 mcp_servers = [
@@ -1548,9 +1568,11 @@ async def test_retrieve_response_no_tools_bypasses_mcp_and_rag(
15481568 mock_client , mock_agent = prepare_agent_mocks
15491569 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
15501570 mock_client .shields .list .return_value = []
1551- mock_vector_db = mocker .Mock ()
1552- mock_vector_db .identifier = "VectorDB-1"
1553- mock_client .vector_dbs .list .return_value = [mock_vector_db ]
1571+ mock_vector_store = mocker .Mock ()
1572+ mock_vector_store .id = "VectorDB-1"
1573+ mock_list_response = mocker .Mock ()
1574+ mock_list_response .data = [mock_vector_store ]
1575+ mock_client .vector_stores .list .return_value = mock_list_response
15541576
15551577 # Mock configuration with MCP servers
15561578 mcp_servers = [
@@ -1598,9 +1620,11 @@ async def test_retrieve_response_no_tools_false_preserves_functionality(
15981620 mock_client , mock_agent = prepare_agent_mocks
15991621 mock_agent .create_turn .return_value .output_message .content = "LLM answer"
16001622 mock_client .shields .list .return_value = []
1601- mock_vector_db = mocker .Mock ()
1602- mock_vector_db .identifier = "VectorDB-1"
1603- mock_client .vector_dbs .list .return_value = [mock_vector_db ]
1623+ mock_vector_store = mocker .Mock ()
1624+ mock_vector_store .id = "VectorDB-1"
1625+ mock_list_response = mocker .Mock ()
1626+ mock_list_response .data = [mock_vector_store ]
1627+ mock_client .vector_stores .list .return_value = mock_list_response
16041628
16051629 # Mock configuration with MCP servers
16061630 mcp_servers = [
0 commit comments