Skip to content

fix(policy): update HuggingFace preset to router.huggingface.co - #1481

Closed
dknos wants to merge 1 commit into
NVIDIA:mainfrom
dknos:fix/huggingface-endpoint-1453
Closed

fix(policy): update HuggingFace preset to router.huggingface.co#1481
dknos wants to merge 1 commit into
NVIDIA:mainfrom
dknos:fix/huggingface-endpoint-1453

Conversation

@dknos

@dknos dknos commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Updates the HuggingFace policy preset from the deprecated api-inference.huggingface.co endpoint to router.huggingface.co
  • The old endpoint returns HTTP 410 (Gone), breaking HuggingFace inference from sandboxes

Test plan

  • Apply huggingface preset and verify inference calls route to router.huggingface.co
  • Confirm the old endpoint is no longer referenced in any preset files

Fixes #1453

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the network endpoint used for HuggingFace Inference API access to route requests through the new host, preserving existing access patterns and security settings to maintain uninterrupted connectivity and compatibility.

Signed-off-by: dknos rneebo@gmail.com

@coderabbitai

coderabbitai Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Replaced the HuggingFace preset network policy host from api-inference.huggingface.co to router.huggingface.co; all other endpoint settings (port, protocol, TLS, enforcement, allowed methods/paths) remain unchanged.

Changes

Cohort / File(s) Summary
HuggingFace Preset Configuration
nemoclaw-blueprint/policies/presets/huggingface.yaml
Changed network policy endpoint host from api-inference.huggingface.co to router.huggingface.co to stop routing to a deprecated (HTTP 410) endpoint. All other endpoint fields unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped in code to make it right,
Swapped a host that gave a fright.
From old 410 to router's glow,
Now requests can safely go.
Cheers — the preset's back in flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the HuggingFace preset endpoint from the deprecated api-inference.huggingface.co to router.huggingface.co.
Linked Issues check ✅ Passed The code changes fully satisfy the requirements from issue #1453: the endpoint has been updated from api-inference.huggingface.co to router.huggingface.co.
Out of Scope Changes check ✅ Passed The pull request contains only a single targeted change to update the HuggingFace preset endpoint, with no out-of-scope modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
nemoclaw-blueprint/policies/presets/huggingface.yaml (1)

27-27: Add a hostname-specific regression test for this preset.

Current tests only verify presets have endpoints, not that HuggingFace uses the expected inference host. Please add an assertion that huggingface preset endpoints include router.huggingface.co (and optionally exclude the deprecated host) to prevent silent regressions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nemoclaw-blueprint/policies/presets/huggingface.yaml` at line 27, Add a
focused regression test that checks the "huggingface" preset's endpoints include
the hostname "router.huggingface.co" (and optionally assert it does not include
the deprecated "api-inference.huggingface.co"). Implement this as a new unit
test (e.g., TestHuggingFacePresetHost or add to TestPresetsEndpoints) that loads
the presets map or uses the existing helper (e.g., presets["huggingface"] or
GetPreset("huggingface")) and asserts the endpoints list contains
"router.huggingface.co" and does not contain the deprecated host.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@nemoclaw-blueprint/policies/presets/huggingface.yaml`:
- Line 27: Add a focused regression test that checks the "huggingface" preset's
endpoints include the hostname "router.huggingface.co" (and optionally assert it
does not include the deprecated "api-inference.huggingface.co"). Implement this
as a new unit test (e.g., TestHuggingFacePresetHost or add to
TestPresetsEndpoints) that loads the presets map or uses the existing helper
(e.g., presets["huggingface"] or GetPreset("huggingface")) and asserts the
endpoints list contains "router.huggingface.co" and does not contain the
deprecated host.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d1527bbb-960b-4b26-a0e4-1c0767e86471

📥 Commits

Reviewing files that changed from the base of the PR and between c99e3e8 and 8b73c4a.

📒 Files selected for processing (1)
  • nemoclaw-blueprint/policies/presets/huggingface.yaml

@wscurran

wscurran commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this fix, which proposes a way to update the HuggingFace policy preset from the deprecated api-inference.huggingface.co to the active router.huggingface.co endpoint.


Possibly related open issues:

1 similar comment
@wscurran

wscurran commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this fix, which proposes a way to update the HuggingFace policy preset from the deprecated api-inference.huggingface.co to the active router.huggingface.co endpoint.


Possibly related open issues:

@dknos
dknos force-pushed the fix/huggingface-endpoint-1453 branch from 8b73c4a to 870ad63 Compare April 8, 2026 06:03
The api-inference.huggingface.co endpoint returns HTTP 410 (Gone).
Updated to the current router.huggingface.co endpoint.

Fixes NVIDIA#1453

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: dknos <rneebo@gmail.com>
@dknos
dknos force-pushed the fix/huggingface-endpoint-1453 branch from 870ad63 to 9b165c2 Compare April 8, 2026 06:33
@wscurran

Copy link
Copy Markdown
Contributor

Thanks for the HuggingFace endpoint fix. This was addressed by 5da9f44c (fix(policy): update HuggingFace endpoint and restrict Discord DELETE method, #1540), which is on main — same fix as #1473. Closing as superseded.

@wscurran wscurran closed this Apr 14, 2026
@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality and removed enhancement: provider feature PR adds or expands user-visible functionality labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: policy Network policy, egress rules, presets, or sandbox policy area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(policy): HuggingFace preset references deprecated api-inference.huggingface.co endpoint

2 participants