Fix cached models missing from chat picker - #7680
Conversation
8423da0 to
9fcc24a
Compare
|
Rebased onto current The conflict mattered:
The reusable matching/dedup logic moved into a pure, unit-tested module Verification (local):
|
9fcc24a to
71b482b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71b482bb14
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return ( | ||
| row.source === LOCAL_MODEL_SOURCE.HF_CACHE && | ||
| row.repoId !== null && | ||
| completeCachedKeys.has(inventoryKey(row.repoId, row.modelFormat)) |
There was a problem hiding this comment.
Normalize non-GGUF cache rows before deduplicating
When a complete Diffusers/video repository is returned by both inventory endpoints, its cached row is classified as safetensors, while _scan_hf_cache reports the non-GGUF local twin as unknown. Requiring the formats to match therefore retains both rows; the task exemption in useChatPickerInventory then admits the unknown local row, so the Images/Video picker displays the same snapshot once as cached and again under Local models. Normalize this HF-cache format before comparison, or otherwise treat this known unknown/safetensors pair as a duplicate while preserving genuinely distinct GGUF copies.
Useful? React with 👍 / 👎.
|
Confirmed this hits use-chat-picker-inventory.ts where PICKER_LOCAL_SOURCES still omits hf_cache, so a cache-only repo never reaches the local lists, and the rebase kept the canChat and hidden-id filter intact. Will get this reviewed. |
71b482b to
3fe7fb6
Compare
3fe7fb6 to
1665c57
Compare
Summary
Validation
hf_cacheprojection fails with the reported model absent; restoring it passes.npm test(77/77 passing)npm run typechecknpm run buildFull local suite: passed.
Closes #7676