Skip to content

fix: --token now works with --url, add --header for custom HTTP headers#16

Merged
thxCode merged 2 commits intogpustack:mainfrom
2niuhe:custom_header
Jan 6, 2026
Merged

fix: --token now works with --url, add --header for custom HTTP headers#16
thxCode merged 2 commits intogpustack:mainfrom
2niuhe:custom_header

Conversation

@2niuhe
Copy link
Copy Markdown
Contributor

@2niuhe 2niuhe commented Jan 5, 2026

Add --header flag for custom HTTP headers

Adds support for custom HTTP headers when fetching remote GGUF files, enabling Basic Auth and other authentication methods for private registries.

Fix bug: --token cannot work with --url

resolve #15

@2niuhe
Copy link
Copy Markdown
Contributor Author

2niuhe commented Jan 5, 2026

Usage:

# Single custom header
gguf-parser --url <URL> --header "Authorization: Basic <base64>"

# Multiple headers
gguf-parser --url <URL> --header "X-Key: value1" --header "X-Other: value2"

# Combined with --token (both are sent)
gguf-parser --url <URL> --token "bearer-token" --header "X-Custom: value"

Test:

# Verify headers are sent (use --debug to inspect requests)
gguf-parser --debug --skip-cache --url "<URL>" --header "Authorization: Basic dXNlcjpwYXNz"

# Expected output shows header in request:
# > Authorization: Basic ████████████████████
# (Values are masked in debug output for security)

@2niuhe
Copy link
Copy Markdown
Contributor Author

2niuhe commented Jan 6, 2026

@thxCode need a review, thanks.

@thxCode
Copy link
Copy Markdown
Collaborator

thxCode commented Jan 6, 2026

@2niuhe, please also update the Model/Remote section of the README.md.

image

You can paste the output of gguf-parser --help directly without Version. :).

@2niuhe
Copy link
Copy Markdown
Contributor Author

2niuhe commented Jan 6, 2026

@thxCode README updated.

@thxCode thxCode merged commit a86c04a into gpustack:main Jan 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support Custom Headers or Basic Auth for Remote Parsing

2 participants