diff --git a/llama_stack/distribution/routers/routing_tables.py b/llama_stack/distribution/routers/routing_tables.py index 861c830be..a940dbae6 100644 --- a/llama_stack/distribution/routers/routing_tables.py +++ b/llama_stack/distribution/routers/routing_tables.py @@ -64,8 +64,6 @@ class CommonRoutingTableImpl(RoutingTable): self.dist_registry = dist_registry async def initialize(self) -> None: - # Initialize the registry if not already done - await self.dist_registry.initialize() async def add_objects( objs: List[RoutableObjectWithProvider], provider_id: str, cls diff --git a/llama_stack/distribution/store/registry.py b/llama_stack/distribution/store/registry.py index b876ee756..041a5677c 100644 --- a/llama_stack/distribution/store/registry.py +++ b/llama_stack/distribution/store/registry.py @@ -216,5 +216,6 @@ async def create_dist_registry( db_path=(DISTRIBS_BASE_DIR / image_name / "kvstore.db").as_posix() ) ) - - return CachedDiskDistributionRegistry(dist_kvstore), dist_kvstore + dist_registry = CachedDiskDistributionRegistry(dist_kvstore) + await dist_registry.initialize() + return dist_registry, dist_kvstore