Skip to content

fix(cookbook): discover macOS HuggingFace cache location (#5978) - #6306

Open
Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-cookbook-5978
Open

Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-cookbook-5978

Conversation

@Spoofiecus

@Spoofiecus Spoofiecus commented Sep 15, 2026

Copy link
Copy Markdown

Summary

The cookbook local-cache scanner (routes/cookbook_helpers.py, _cached_model_scan_script) only listed ~/.cache/huggingface/hub (Linux) and never consulted huggingface_hub, so on macOS models cached at the platform default ~/Library/Caches/huggingface/hub were invisible in the model picker.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #5978

Type of Change

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

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 (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

How to Test

  1. cd '/home/user/Odysseus Project' && ./venv/bin/python -m pytest tests/test_cookbook_helpers.py -k 'cached or hf_cache or platform or 5978' -v -> 13 passed, 1 skipped (windows-only).
  2. Live: dev server :7001 restarted with the new code; /api/health healthy; original :7000 untouched.

Runtime attestation

  • py_compile + focused pytest: 13 passed / 1 skipped.
  • Dev :7001 booted with the new code (uvicorn app:app); /api/health healthy; original :7000 untouched.
  • macOS host not available (box is Linux); the darwin branch is covered by a behavioral test that execs the shipped scanner def under sys.platform == 'darwin'.
  • Pre-existing 4-test baseline failures (rule 30): 3x test_run_focus dry-run space-in-path exact-match + 1x test_opencode_setup_provider_aliases_resolve drift. Not caused by this PR.

Visual / UI changes

None - no static/js, CSS, HTML, SVG, or DOM rendering changed.

@github-actions github-actions Bot added needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap labels Sep 15, 2026
@Spoofiecus Spoofiecus changed the title P4 cookbook 5978 fix(cookbook): discover macOS HuggingFace cache location (#5978) Sep 15, 2026
@github-actions github-actions Bot added ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap labels Sep 15, 2026
This was referenced Sep 15, 2026

This branch has not been deployed

No deployments
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.

Cookbook won't find cached models when downloaded on MacOS

1 participant