Repository navigation
feat(services/hf): add disable_config_load - #8390
Merged
Merged
Conversation
kszucs
requested review from
Xuanwo,
Zheaoli,
messense and
tisonkun
as code owners
October 8, 2026 12:15
kszucs
force-pushed
the
hf-disable-config-load
branch
2 times, most recently
from
October 8, 2026 12:32
d4db042 to
f547d49
Compare
kszucs
force-pushed
the
hf-disable-config-load
branch
from
October 8, 2026 13:30
f547d49 to
acdc71b
Compare
Xuanwo
approved these changes
Oct 8, 2026
Like s3's option of the same name, it stops the service from reading a token from the environment, so a server embedding OpenDAL does not send its users' requests with its own Hugging Face token.
kszucs
force-pushed
the
hf-disable-config-load
branch
from
October 27, 2026 14:23
acdc71b to
4af4f4f
Compare
…e_config_load Match s3, whose disable_config_load also skips AWS_ENDPOINT_URL: HF_ENDPOINT and HF_HUB_DISABLE_XET are no longer read when the option is set.
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.
Which issue does this PR close?
None.
Rationale for this change
Without an explicit
token, the hf service uses the process's token (HF_TOKENor the
hf auth logintoken file). A server that builds operators for itsusers, such as ClickHouse's
opendal()table function, would then send theirrequests with its own Hugging Face identity. s3 has
disable_config_loadforthe same problem.
What changes are included in this PR?
disable_config_loadstops the hf service from reading config from theenvironment:
HF_TOKEN,HF_TOKEN_PATH, or thetokenfile underHF_HOME,$XDG_CACHE_HOME/huggingfaceor~/.cache/huggingface;HF_ENDPOINT;HF_HUB_DISABLE_XET.This matches s3, whose
disable_config_loadalso skipsAWS_ENDPOINT_URL.The Xet client still reads its tuning variables (
HF_XET_*) and locates itscache from
HF_XET_CACHE,HF_HOMEorXDG_CACHE_HOME; these hold nocredentials. Binding configs are regenerated.
Are there any user-facing changes?
A new opt-in hf option,
falseby default. With it enabled, the endpointdefaults to
https://huggingface.coand the download mode toxetunlessendpointanddownload_modeare set explicitly.Breaking changes
AI Usage Statement
claude-opus-5-5)