Skip to content

Misc. bug: Remote download fails behind proxy with -hf flag #21694

Description

@yaoluxun

Name and Version

bash-4.4$ ./llama-server --version
version: 8724 (b54cb2e3d)
built with GNU 13.3.1 for Linux x86_64

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-server

Command line

./llama-server -hf hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF -v

Problem description & steps to reproduce

1. Build

cmake -S . -B build \
  -DLLAMA_OPENSSL=ON

cmake --build build --config Release -j 

2. Behavior

bash-4.4$ ./llama-server -hf hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF -v 

common_download_file_single_online: no previous model file found ~/.cache/llama.cpp/hugging-quants_Llama-3.2-1B-Instruct-Q8_0-GGUF_preset.ini 
common_download_file_single_online: HEAD failed, status: -1 
no remote preset found, skipping

3. Troubleshooting

I ran

curl -I https://huggingface.co/
curl -I https://huggingface.co/hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF

Both succeed and return:

HTTP/1.0 200 Connection Established
HTTP/2 200

So the host can reach Hugging Face through the configured proxy.

4. Expected behavior

Remote download should work when the host has working HTTPS connectivity, or at minimum fail with a clearer error explaining why the HTTP request could not be completed.

I locally patched common/http.h to read HTTPS_PROXY and apply proxy settings to the underlying HTTP client, and that appears to be the right direction for a fix.

First Bad Commit

No response

Relevant log output

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions