Repository navigation
feat(settings): a Hugging Face token in Settings → Components - #379
Merged
Merged
Conversation
Gated models (pyannote's speaker diarization, some GGUF models) needed HF_TOKEN in the environment, which the Docker compose files don't even pass on. components.hf_token is a secret in Settings → Components and the settings API, kept encrypted and sent to huggingface.co only; HF_TOKEN still wins when it's set. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
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.
Requested by Adeel · project thread
Description
Before: gated models (pyannote's speaker diarization, some GGUF local models, a gated Laya model) needed
HF_TOKENin the server's environment, which the compose files don't pass on, so a Docker install had no way to use them without editing compose. A 401 said "set HF_TOKEN".After: Settings → Components has Hugging Face token (a secret field). Downloads of gated models use it, and the error says to add it there.
HF_TOKENstill wins when it's set.How:
components.hf_tokenis a new secret setting (encrypted, write-only like the other keys, validated as a token), withHF_TOKENas its environment override.components.hf_token(cfg)is what the local-model download, Laya'ssnapshot_downloadand pyannote use. The token goes only tohuggingface.co.Types of changes
!in the title)Checklist:
make hookschecks it on commit).test_a_hugging_face_token_in_settings_downloads_gated_models)docs/accordingly. (components.md, local-models.md, processing.md)## UnreleasedinCHANGELOG.md. (n/a)Done questions (AGENTS.md)
PUT /api/v1/settings/componentswithhf_token.HF_TOKENkeeps working and wins; no stored-data change.make openapi).🤖 Generated with Claude Code
https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
Generated by Claude Code