diff --git a/bindings/react-native/packages/core/src/Public/Api/Models.ts b/bindings/react-native/packages/core/src/Public/Api/Models.ts index 07b6a17669..46abf7fb42 100644 --- a/bindings/react-native/packages/core/src/Public/Api/Models.ts +++ b/bindings/react-native/packages/core/src/Public/Api/Models.ts @@ -24,6 +24,7 @@ import { getModel as getModelProto, listModels, queryModels, + refreshModelRegistry, registerArchiveModel, registerModel as registerUrlModel, registerMultiFileModel, @@ -459,6 +460,25 @@ export const models = { storageFreeBytes: Number(storage?.device?.freeBytes ?? 0), }; }, + + /** + * Rescan managed model directories and reconcile downloaded state. + * + * Matches `models.refresh` on the Swift, Kotlin, and Flutter namespaces, + * including its defaults. Non-throwing like the others: a failed refresh + * leaves the current registry contents in place. + * + * `list()` reads the registry as it stands and never rescans, so this is + * the only way to pick up artifacts that changed on disk out from under + * the SDK. + */ + refresh(options?: { + rescanLocal?: boolean; + includeRemoteCatalog?: boolean; + pruneOrphans?: boolean; + }): Promise { + return refreshModelRegistry(options); + }, }; /**