Skip to content

Drop legacy options from HF Inference api - #40892

Merged
Amar3tto merged 1 commit into
apache:masterfrom
aIbrahiim:fix-hf-api-payload
Oct 30, 2026
Merged

Amar3tto merged 1 commit into
apache:masterfrom
aIbrahiim:fix-hf-api-payload

Conversation

@aIbrahiim

Copy link
Copy Markdown
Contributor

fixes: #30799

@github-actions github-actions Bot added python size/xs XS: <10 lines changed labels Oct 29, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR updates _InferenceAPIHandler.run_inference to send only {"inputs": batch} to the Hugging Face router feature-extraction endpoint, removing the legacy nested "options" field in the JSON payload. The change is straightforward and fixes the payload compatibility issue.

🔍 General Feedback

  • With inference_args no longer forwarded in _InferenceAPIHandler.run_inference, the options dictionary (wait_for_model and use_cache) populated in InferenceAPIEmbeddings.get_ptransform_for_processing (lines 268-274) is now dead code. Consider cleaning that up or passing those options via HTTP headers (x-wait-for-model, x-use-cache) if supported by the router.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.83%. Comparing base (0f1ac43) to head (12bbb17).
⚠️ Report is 25 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #40892       +/-   ##
===========================================
+ Coverage        0   79.83%   +79.83%     
===========================================
  Files           0      494      +494     
  Lines           0    83575    +83575     
===========================================
+ Hits            0    66722    +66722     
- Misses          0    16853    +16853     
Flag Coverage Δ
python 79.83% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @claudevdm for label python.
Backup reviewer: shunping (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@Amar3tto
Amar3tto requested a review from Abacn October 30, 2026 13:17
@Amar3tto
Amar3tto merged commit 966735e into apache:master Oct 30, 2026
90 checks passed
Amar3tto added a commit that referenced this pull request Oct 30, 2026
Cherrypick #40892 Drop legacy options from HF Inference api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The PostCommit Python Dependency job is flaky

2 participants