     }
 }
 
-struct PackageIndexMetadataProvider: PackageMetadataProvider {
+struct PackageIndexMetadataProvider: PackageMetadataProvider, Closable {
+    typealias ProviderContainer = (provider: PackageMetadataProvider, managed: Bool)
+    
     let index: PackageIndex
-    let alternative: PackageMetadataProvider
+    let alternativeContainer: ProviderContainer
+    
+    var alternative: PackageMetadataProvider {
+        self.alternativeContainer.provider
+    }
 
     func get(
         identity: PackageIdentity,

            self.index.get(identity: identity, location: location, callback: callback)
        } else {
            self.alternative.get(identity: identity, location: location, callback: callback)
        }
    }
}

        )
        let metadataProvider = PackageIndexMetadataProvider(
            index: index,
            alternativeContainer: (
                provider: GitHubPackageMetadataProvider(
                    configuration: .init(authTokens: collectionsConfiguration.authTokens),
                    observabilityScope: observabilityScope
                ),
                managed: true
            )
        )
        
