refreshDiscoveredModels static method
Re-discover models on the filesystem via C++ registry.
This scans the filesystem for downloaded models and updates the C++ registry with localPath for discovered models.
Note: This is called automatically on first availableModels() call. You typically don't need to call this manually unless you've done manual file operations outside the SDK.
Matches Swift: CppBridge.ModelRegistry.shared.discoverDownloadedModels()
Implementation
static Future<void> refreshDiscoveredModels() async {
if (!_isInitialized) return;
final logger = SDKLogger('RunAnywhere.Discovery');
final result =
await DartBridgeModelRegistry.instance.discoverDownloadedModels();
if (result.discoveredModels.isNotEmpty) {
logger.info(
'Discovery found ${result.discoveredModels.length} downloaded models');
}
}