You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Started getting error:
[cause]: Error: "https://api-inference.huggingface.co is no longer supported. Please use https://router.huggingface.co/hf-inference instead."
2025-11-03T20:03:28:802 |- at request (file:///usr/local/lib/node_modules/@alpic80/rivet-cli/node_modules/@huggingface/inference/dist/index.js:204:15)
Started getting error:
[cause]: Error: "https://api-inference.huggingface.co is no longer supported. Please use https://router.huggingface.co/hf-inference instead."
2025-11-03T20:03:28:802 |- at request (file:///usr/local/lib/node_modules/@alpic80/rivet-cli/node_modules/@huggingface/inference/dist/index.js:204:15)
The upgrade of the @huggingface/inference package from version ^2.6.4 to ^4.13.0 is a significant version jump. Verify that version 4.13.0 is fully compatible with your existing codebase, as major version bumps can introduce breaking changes.
The imports have been updated to replace HfInference and HfInferenceEndpoint with the single InferenceClient class, reflecting an API change in the new library version. This is correct, but ensure that all usages of the old classes throughout the codebase are updated accordingly to prevent inconsistencies.
Instantiation of the client has changed to use new InferenceClient(accessToken, {endpointUrl: endpoint}) when an endpoint is specified, and new InferenceClient(accessToken) otherwise. This is appropriate per the new API, but be sure the endpointUrl option is supported as shown.
In textGenerationStream() and textToImage() calls, the parameter structure has been adapted to the new client API, including returning a blob from textToImage() by specifying { outputType: \"blob\" }. This matches typical usage patterns in the latest SDK.
Consider adding error handling around the new InferenceClient usages, as new API versions often return different error types or messages.
To future-proof the code, add comments referencing the version upgrade and client change for maintainers to understand the context of the update.
Double-check if other Hugging Face SDK usages elsewhere in the project require similar refactors to maintain consistency.
Confirm through tests that streaming of generated text and image generation functionality operate correctly with the new client and version.
Since this is a major dependency upgrade, run thorough integration and regression tests to catch any subtle issues from the API changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Started getting error:
[cause]: Error: "https://api-inference.huggingface.co is no longer supported. Please use https://router.huggingface.co/hf-inference instead."
2025-11-03T20:03:28:802 |- at request (file:///usr/local/lib/node_modules/@alpic80/rivet-cli/node_modules/@huggingface/inference/dist/index.js:204:15)