refactor(qhexrt): remove model catalog registration
Summary
This PR simplifies QHexRT model registration to match the current architecture:
- Removes the engine- and SDK-owned QHexRT model catalog.
- Removes device-specific model selection and architecture-folder URL rewriting.
- Removes QHexRT catalog registration helpers from the Kotlin, Flutter, and React Native packages.
- Keeps
probeNpu()andisArchitectureSupported()as optional device-support checks. - Registers exact, caller-provided model URLs through each core SDK's existing
RunAnywhere.registerModel(...)API.
Why
PR #532 followed the older QHexRT flow: seed logical catalog entries, detect the device architecture, filter models, and rewrite URLs to architecture-specific folders.
Based on the feedback on #532, current QHexRT models are published as dedicated artifacts. QHexRT should therefore not maintain a model catalog, choose a model, or modify its URL. The caller selects the model and registers its exact link through the core SDK.
This keeps model registration in the shared, backend-neutral path. QHexRT remains responsible for backend registration and optional device-capability reporting.
What changed
- Deleted the native QHexRT catalog implementation, build wiring, and catalog tests.
- Removed catalog policy and device-aware registration APIs from Kotlin, Flutter, and React Native QHexRT packages.
- Updated Android, Flutter, and React Native examples to use explicit URL registration through the core SDK.
- Removed QHexRT-specific HF authentication checks; authentication requirements now come from model metadata.
- Updated documentation and removed tests for the retired catalog APIs.
Behavior after this PR
- QHexRT does not seed or own a model catalog.
- QHexRT does not select models or rewrite model URLs.
- Applications register dedicated QHexRT model URLs through
RunAnywhere.registerModel(...). - Applications may use
probeNpu()as an optional preflight before presenting or registering NPU models. - Existing core download, registry, lifecycle, and compatibility behavior remains unchanged.
Breaking changes
The QHexRT catalog lookup, model eligibility, HF-auth policy, and device-aware model-registration APIs have been removed. Callers using those APIs should move to explicit model registration through the core SDK.
Validation
All PR checks pass, including:
- Kotlin/Android SDK and example tests
- Flutter analysis and tests
- React Native typecheck, lint, and tests
- Native Android, iOS, macOS, Linux, Windows, Web, and WASM builds
- Repository validation, security, and centralization checks
Related
Summary by CodeRabbit
-
New Features
- Model registration now supports richer metadata, including download size, context length, source, and description.
- Android, Flutter, and React Native examples can register explicit QHexRT model URLs through the core model registry.
- QHexRT availability and architecture support can be checked before registration.
-
Breaking Changes
- Removed QHexRT device-specific model registration and model catalog helper APIs.
- QHexRT now focuses on NPU probing, architecture support, and backend lifecycle management.