Skip to content

fix(cookbook): resolve MLX serve snapshots from the macOS HF cache (#5978) - #6311

Open
Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-slice4-hfcache
Open

Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-slice4-hfcache

Conversation

@Spoofiecus

@Spoofiecus Spoofiecus commented Sep 15, 2026

Copy link
Copy Markdown

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 — where huggingface_hub defaults 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

  • This PR targets **dev**, not main. All PRs land in dev.

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)

Linked Issue

Part of #5978

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (uvicorn 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.py then ./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 --check n/a (no JS in this diff). ./venv/bin/python -m compileall -q app.py core routes src services scripts tests -> clean.
Live: :7001 and :7000 healthy; 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.

@github-actions github-actions Bot added the needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app label Sep 15, 2026
@github-actions github-actions Bot added ready for review Description complete — ready for maintainer review and removed needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant