fix(local-inference): preserve featured model size on delete and backfill unknown sizes - #10524
Closed
isaka1022 wants to merge 1 commit into
Closed
fix(local-inference): preserve featured model size on delete and backfill unknown sizes#10524isaka1022 wants to merge 1 commit into
isaka1022 wants to merge 1 commit into
Conversation
…fill unknown sizes Deleting a featured local model keeps its registry entry for re-download but reset size_bytes to 0, hiding the size in the UI and excluding the model from recommend_local_model (which filters on size_bytes > 0). - keep the known size_bytes when deleting a featured model; only on-disk artifacts and download state are cleared - backfill size_bytes for featured entries created without a resolved size: ensure_featured_models_current now re-resolves entries with size_bytes == 0, and sync_with_featured applies the resolved size to the existing entry without touching user settings or storage type Fixes aaif-goose#10421
Author
|
Duplicate of #10422, which came first and covers more. Closing in favor of it — sorry for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a featured local model is deleted, its registry entry is kept for re-download but
size_byteswas reset to 0. This hid the model size in the UI and excluded the model fromrecommend_local_model, which filters featured models onsize_bytes > 0. Featured entries created before their size could be resolved were also never backfilled.This PR keeps the known size on deletion (only on-disk artifacts and download state are cleared), and backfills unknown sizes on a later launch:
ensure_featured_models_currentre-resolves featured entries withsize_bytes == 0, andsync_with_featuredapplies the resolved size to the existing entry without touching user settings or storage type.Testing
size_bytesfor a featured model;sync_with_featuredbackfills a zero size without modifying settings or storage. Both isolate the registry underGOOSE_PATH_ROOTsosave()never touches the real data directory.cargo test -p goose-local-inference: 92 passed / 0 failed.cargo clippy --all-targets -- -D warnings: clean.Related Issues
Fixes #10421