Skip to content

feat(sdk): stamp pulled models with their QAIRT version#1179

Draft
RemiliaForever (RemiliaForever) wants to merge 2 commits into
mainfrom
feat/manifest-qairt-version
Draft

feat(sdk): stamp pulled models with their QAIRT version#1179
RemiliaForever (RemiliaForever) wants to merge 2 commits into
mainfrom
feat/manifest-qairt-version

Conversation

@RemiliaForever

Copy link
Copy Markdown
Contributor

What

Persist, per cached model, the QAIRT version its assets were built for, and expose it through the FFI to the bindings.

  • AI Hub's release-assets.json declares tool_versions.qairt for each Genie asset (e.g. 2.45.0.260326154327). We now parse that field (previously dropped) and write it into each model's geniex.json as QairtVersion at pull time.
  • Empty for non-AI-Hub / llama.cpp models; omitted from the serialized manifest when empty. Legacy manifests without the key still deserialize.
  • Threaded through geniex_ModelPaths → Go ModelPaths.QairtVersion and the Python ModelPaths dataclass.

Why

Part of #1229. After a geniex update bumps the bundled QAIRT, a model pulled under the old runtime may carry incompatible artifacts. Recording the QAIRT version each model was pulled for is the prerequisite for detecting that mismatch. This PR lands the stamp + FFI exposure only; the actual compatibility check / user-facing warning is left for a follow-up.

FFI change

sdk/model-manager/include/geniex_model.h gains a char* qairt_version field on geniex_ModelPaths (pure append). Per CONTRIBUTING §4, the Go and Python FFI surfaces are updated in the same PR. Android JNI consumes the header directly and stays layout-compatible on recompile; surfacing the value into its Kotlin bean is out of scope.

Tests

  • Rust unit tests: parse tool_versions.qairt from a live-shaped release-assets.json, serialize/omit the QairtVersion key, legacy manifest without the key deserializes.
  • Extended the ai_hub_pull integration test to assert the pulled geniex.json carries the QAIRT version end-to-end.
  • Full cargo test suite and the CLI bazelisk test //cli/cmd/geniex pass.

Verification

Rebuilt the SDK bridge and confirmed a pulled AI Hub model's geniex.json records QairtVersion, readable via the Go binding's ModelPaths.QairtVersion.

AI Hub's release-assets.json declares, per asset, the QAIRT version its
Genie artifacts were exported against (tool_versions.qairt). Parse that
field and persist it into each model's geniex.json as QairtVersion at
pull time, so a later run can tell whether cached artifacts still match
the runtime this build ships — the "stale artifact after a GenieX
update" case from #1229.

The value is empty for non-AI-Hub / llama.cpp models and omitted from
the serialized manifest when empty; legacy manifests without the key
still deserialize.

Expose it through the FFI so bindings can read it: append qairt_version
to geniex_ModelPaths and thread it through the Go and Python
model-paths wrappers (FFI surfaces updated in lockstep per CONTRIBUTING
§4). Compatibility checking on top of this stamp is left for a
follow-up.

Signed-off-by: RemiliaForever <remilia@koumakan.cc>
The pinned aihm release version and base URL are owned by the Rust
model-manager (sdk/model-manager/crates/core/src/config.rs); the CLI's
DefaultAIHubBaseURL / DefaultAIHubVersion constants and the AIHubVersion
config field were dead mirrors with no remaining readers. Remove them
and the stale viper default.

Signed-off-by: RemiliaForever <remilia@koumakan.cc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant