Repository navigation
fix(studio): keep On Device GGUF discovery local when offline - #12451
Closed
Souravrajvi0 wants to merge 3 commits into
Closed
Souravrajvi0 wants to merge 3 commits into
Souravrajvi0 wants to merge 3 commits into
Conversation
Treat navigator offline like Hub backoff for variant listings, request prefer_local_cache from the On Device picker when appropriate, and stop prefer_local_cache responses from falling through to remote Hub discovery or cache authorization probes.
With "All quantizations" off, the On Device expander now asks for the disk answer. The existing prefer_local_cache path already lists a cached repo with no Hub listing or access probe for UI sessions, and an unreachable Hub already gets the disk answer through isHuggingFaceOffline(). This drops the parts that broke other callers: - prefer_local_cache falls back to the Hub listing again when nothing is cached; Images and Video resolve undownloaded GGUF quants through it. - API-key tokens are probed again under prefer_local_cache, and a refused caller no longer sees cached empty quant folders. - GGUF listings no longer treat navigator.onLine === false as offline. network.ts keeps that flag advisory because it reports offline on WSL2 and some WebKitGTK/Tauri webviews. Adds regression tests for the three backend cases and pins the expander request in the picker contract test.
Collaborator
|
superseded by #12460. |
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
Fixes #12415.
On Device GGUF quant discovery no longer blocks on Hugging Face when the machine is offline or when the picker should list disk-only quants.
Changes
Frontend
isGgufVariantsListingOffline()— Hub backoff ornavigator.onLine === false— drivesprefer_local_cache/offlineon GGUF variant API calls.preferLocalCachewhen “Show all quantizations” is off or listing is offline (remote discovery remains for undownloaded quants while online with that setting on).Backend
prefer_local_cacheskips Hub cache-auth probes (same asoffline).prefer_local_cachedoes not fall through tolist_gguf_variants()when nothing is cached locally.Test plan
pytest studio/backend/tests/test_cached_gguf_routes.py::test_prefer_local_cache_without_on_disk_repo_skips_remotenode --experimental-strip-types --test tests/hub-network-availability.test.ts(frontend)