fix(cookbook): resolve MLX serve snapshots from the macOS HF cache (#5978) - #6311
Open
Spoofiecus wants to merge 1 commit into
Open
Spoofiecus wants to merge 1 commit into
Spoofiecus wants to merge 1 commit into
Conversation
…dysseus-dev#5978) (cherry picked from commit 37ee302)
Spoofiecus
force-pushed
the
p4-slice4-hfcache
branch
from
September 16, 2026 06:39
37ee302 to
4b1e38f
Compare
6 tasks
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
The cookbook tmux runner resolves
mlx-community/...models to a local HuggingFace snapshot before serving. Its candidate list only searched~/.cache/huggingface/hub(Linux), so on macOS — wherehuggingface_hubdefaults to~/Library/Caches/huggingface/hub— a downloaded model was not found and the serve fell back to an unusable path. This is the same defect class as #5978 on the serve path; the scan path was fixed separately.Target branch
**dev**, notmain. All PRs land indev.Type of Change
Linked Issue
Part of #5978
Checklist
devuvicorn app:app, native venv) and verified the change works; details in How to Test.How to Test
Regression proof (test fails before, passes after):
git checkout -- routes/cookbook_routes.pythen./venv/bin/python -m pytest tests/test_cookbook_mlx_cache_roots.py-> the macOS and platform-difference tests FAIL; restore the fix -> 5 passed../venv/bin/python -m pytest tests/test_cookbook_mlx_cache_roots.py tests/test_cookbook_helpers.py tests/test_cookbook_stale_shim_recovery.py tests/test_cookbook_serve_cmd_js.py-> 102 passed, 1 skipped.node --checkn/a (no JS in this diff)../venv/bin/python -m compileall -q app.py core routes src services scripts tests-> clean.Live:
:7001and:7000healthy; the runner script is generated per launch, so no served asset/cache-buster applies.Pre-existing 4-test baseline failures are the workspace baseline (rule 30), unrelated to this diff.
Scope is the MLX serve-path cache candidate list plus its test. No backend API, arg-parsing, or UI change. The maintainer-specific absolute path at cookbook_routes.py:668 (a MiniMax-M3 remap) is a separate hygiene issue and is deliberately left alone here.