From 5d146ec5cf8c9256048a784abb5347f5ba3af45b Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Tue, 17 Jun 2025 11:11:05 -0700 Subject: [PATCH] do not throw error when listing vector-dbs --- llama_stack/distribution/routers/vector_io.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/llama_stack/distribution/routers/vector_io.py b/llama_stack/distribution/routers/vector_io.py index 8eb56b7ca..a20ce70b6 100644 --- a/llama_stack/distribution/routers/vector_io.py +++ b/llama_stack/distribution/routers/vector_io.py @@ -163,10 +163,14 @@ class VectorIORouter(VectorIO): vector_dbs = await self.routing_table.get_all_with_type("vector_db") all_stores = [] for vector_db in vector_dbs: - vector_store = await self.routing_table.get_provider_impl( - vector_db.identifier - ).openai_retrieve_vector_store(vector_db.identifier) - all_stores.append(vector_store) + try: + vector_store = await self.routing_table.get_provider_impl( + vector_db.identifier + ).openai_retrieve_vector_store(vector_db.identifier) + all_stores.append(vector_store) + except Exception as e: + logger.error(f"Error retrieving vector store {vector_db.identifier}: {e}") + continue # Sort by created_at reverse_order = order == "desc"