fix: detect HuggingFace token when downloading cookbook models#3459
Merged
alteixeira20 merged 6 commits intoJun 11, 2026
Merged
Conversation
|
Thanks for this, hope this is accepted soon! Same issue on Linux as well and this would fix it. |
This was referenced Jun 11, 2026
Closed
Contributor
Author
Collaborator
|
Hi @muhamedhamedvl, sorry for the delay! Do you mind fixing the conflicts then I'll take a closer look to this PR? |
Contributor
Author
|
Hi @alteixeira20, Thanks! |
alteixeira20
approved these changes
Jun 11, 2026
alteixeira20
left a comment
Collaborator
There was a problem hiding this comment.
LGFM.
Validated the refreshed head. The scope is limited to the HuggingFace token persistence/download path fix, CI is green, focused token tests pass, related cookbook tests pass, syntax checks pass, and the merge probe is clean.
jdmanring
pushed a commit
to jdmanring/odysseus
that referenced
this pull request
Jun 13, 2026
…form, settings fixes Upstream commits included: - fix: detect HuggingFace token from env when downloading (odysseus-dev#3459) - fix(platform): read /proc/version with utf-8 - fix(settings): degrade load_features to defaults on PermissionError - test(memory): cover owner isolation for memory search Conflict in cookbook_routes.py: _load_stored_hf_token() inline implementation vs upstream's extraction to cookbook_helpers.load_stored_hf_token(). Resolved by accepting upstream's version (strictly better — shared utility, also handles HUGGING_FACE_HUB_TOKEN). Our fix/hf-token-env-fallback branch is superseded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jdmanring
pushed a commit
to jdmanring/odysseus
that referenced
this pull request
Jun 13, 2026
…diepie-archdaemon#3459 Upstream extracted load_stored_hf_token() to cookbook_helpers.py in their own fix for the same env-var fallback issue. Both fix/hf-token-persistence and fix/hf-token-env-fallback are now covered by the upstream implementation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
kootenayalex
pushed a commit
to kootenayalex/odysseus-mlx
that referenced
this pull request
Jun 16, 2026
…eus-dev#3459) Co-authored-by: Alexandre Teixeira <111787685+alteixeira20@users.noreply.github.com>
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
Saving a HuggingFace token in Cookbook → Settings did not persist because
cookbook-hwfit.jsregistered a secondchangehandler on#hwfit-hftoken. It ran aftercookbook.jscleared the input and overwrote_envState.hfTokenwith"", so the debounced sync never wrote the token tocookbook_state.json. Gated model downloads then reported[odysseus] HF token: NOT SET. This PR removes the duplicate handlers, adds sharedload_stored_hf_token()(with env-var fallback), and uses it for the download API and agent download path.Target branch
dev, notmain.Linked Issue
Fixes #3422
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end.How to Test
docker compose upand log in.[odysseus] HF token: appliedin the log — notNOT SET — gated/private models will be denied.python -m pytest tests/test_cookbook_hf_token.py -q— expect 3 passed.