kszucs opened a new pull request, #7625:
URL: https://github.com/apache/opendal/pull/7625

   ## Summary
   
   - Add `download_mode` config option (`xet` | `http`) to the HuggingFace 
service. In `xet` mode (default) the resolve endpoint is called with `Accept: 
application/vnd.xet-fileinfo+json` and files are streamed via the XET SDK. In 
`http` mode the server's 302 redirect is followed and bytes are streamed 
directly without any XET SDK involvement.
   - Move `HfRepoType` from `uri.rs` to `config.rs` alongside the new 
`HfDownloadMode` enum.
   - Make `repo_type` explicit — `HfRepoType` no longer implements `Default`, 
`HfConfig.repo_type` is `Option<HfRepoType>`, and both `from_uri()` and 
`build()` return `ConfigInvalid` if it is not set.
   - Consolidate `path_resolve` / `path_resolve_http` into a single 
`resolve(path, range, mode)` method on `HfCore`.
   - Refactor `parse_error` to take `(parts, body)` directly instead of a full 
`Response<Buffer>`.
   
   ## Test plan
   
   - [ ] `cargo clippy --all-targets -- -D warnings` — clean
   - [ ] `cargo test -p opendal-service-hf` — 52 pass
   - [ ] Behavior tests with Xet mode: `OPENDAL_TEST=hf 
OPENDAL_HF_REPO_TYPE=dataset ... cargo test behavior`
   - [ ] Behavior tests with Http mode: add `OPENDAL_HF_DOWNLOAD_MODE=http` to 
the above


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to