Skip to content

Conversation

@ramonpzg
Copy link
Contributor

@ramonpzg ramonpzg commented Jul 1, 2025

Add Hugging Face Inference Endpoints as Model Provider

This PR begins scaffolding proper integration with HF Inference Enpoints following issue #5281.

What's Added

  • Hugging Face provider in model providers list with proper branding
  • Manual endpoint configuration via Settings → Model Providers → Hugging Face
  • API key and endpoint URL settings with clear instructions
  • OpenAI-compatible API integration for seamless model communication
  • Comprehensive documentation with step-by-step setup guide
  • Empty models list requiring manual model configuration

Current Limitation

As noted by the HF team, the HF model router is not fully functioning yet due to an internal fix needed to proxy to the correct provider. This implementation provides a manual but functional approach that sets the foundation for a more streamlined experience once HF's auto-routing is ready.

Docs

Complete setup guide available at /docs/remote-models/huggingface showing users how to:

  1. Deploy models via HF Inference Endpoints
  2. Configure Jan with endpoint URLs and API keys
  3. Add custom models manually
  4. Troubleshoot common issues

Fixes: #5281


Important

Adds Hugging Face as a model provider with manual endpoint configuration and OpenAI-compatible API integration, including documentation and UI updates.

  • Behavior:
    • Adds Hugging Face as a model provider with manual endpoint configuration in predefinedProviders in data.ts.
    • Supports OpenAI-compatible API integration for model communication.
    • Requires manual model configuration due to empty models list in huggingface.json.
  • Documentation:
    • New setup guide in huggingface.mdx for integrating Hugging Face Inference Endpoints.
    • Updates _meta.json to include Hugging Face documentation link.
  • Engine Management:
    • Adds huggingface.json to engines.mjs for engine and model management.
    • Defines Hugging Face engine metadata in resources/huggingface.json.
  • UI Updates:
    • Adds Hugging Face logo and title handling in utils.ts.

This description was created by Ellipsis for 216399d. You can customize this summary. It will automatically update as commits are pushed.

@ramonpzg ramonpzg requested review from louis-jan and urmauur July 1, 2025 05:34
@ramonpzg ramonpzg self-assigned this Jul 1, 2025
@ramonpzg ramonpzg added this to Jan Jul 1, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 216399d in 1 minute and 52 seconds. Click for details.
  • Reviewed 301 lines of code in 8 files
  • Skipped 12 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/src/pages/docs/remote-models/_meta.json:30
  • Draft comment:
    New Hugging Face entry added; verify href matches the documentation URL.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. extensions/engine-management-extension/engines.mjs:11
  • Draft comment:
    Hugging Face provider imported and integrated into engines and models arrays correctly.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 50% None
3. extensions/engine-management-extension/models/huggingface.json:1
  • Draft comment:
    Empty model list is intentional; ensure users know to add models manually.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 50% None
4. extensions/engine-management-extension/resources/huggingface.json:11
  • Draft comment:
    The transform_req template is quite verbose; consider refactoring or externalizing the list of keys for maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. web-app/src/lib/utils.ts:34
  • Draft comment:
    Hugging Face provider logo and title added; ensure the SVG asset '/images/model-provider/hugging-face.svg' exists.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 50% None
6. web-app/src/mock/data.ts:287
  • Draft comment:
    Hugging Face provider settings added with correct placeholders; verify the base URL always ends with '/v1' per API requirements.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 50% None
7. docs/src/pages/docs/remote-models/huggingface.mdx:45
  • Draft comment:
    Typo: "cick on Create Endpoint" should be "click on Create Endpoint".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While this is technically correct - there is a typo - the rules state we should not make purely informative comments. Typos in documentation, while worth fixing, are minor issues that don't affect functionality. The meaning is still clear despite the typo. The typo could potentially confuse non-native English speakers following the documentation. Documentation quality is important for user experience. While documentation quality matters, this particular typo is extremely minor and the meaning is obvious from context. This type of minor editorial feedback creates noise in the PR review process. Delete this comment as it's a minor documentation typo that doesn't affect functionality or comprehension significantly.
8. docs/src/pages/docs/remote-models/huggingface.mdx:64
  • Draft comment:
    Typo: "alongside you endpoint URL" should be "alongside your endpoint URL".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While this is a real typo, typo fixes in documentation are very minor issues. The meaning is still clear despite the typo. Documentation typos don't affect functionality. However, since this is a new file being added, catching typos before they make it to production could improve quality. Documentation quality and correctness matters for user experience. Typos can make documentation look unprofessional. While documentation quality matters, this particular typo is extremely minor and obvious. The PR author will likely catch it in their own review. This comment, while technically correct, is too minor to be worth keeping in the PR review. It adds noise without significant value.

Workflow ID: wflow_CTRBK99NHyf2QnoC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

<br/>

This will take you to the deployment set up page. For this example, we will leave the default settings
as they are under the GPU tab and cick on **Create Endpoint**.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo alert: 'cick' should be 'click'.

Suggested change
as they are under the GPU tab and cick on **Create Endpoint**.
as they are under the GPU tab and click on **Create Endpoint**.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

Preview URL: https://e4c09b01.docs-9ba.pages.dev

@LazyYuuki LazyYuuki added this to the v0.6.5 milestone Jul 4, 2025
@LazyYuuki LazyYuuki moved this to Todo in Jan Jul 4, 2025
@LazyYuuki LazyYuuki moved this from Todo to In Progress in Jan Jul 4, 2025
@dan-menlo dan-menlo moved this from In Progress to Blocked in Jan Jul 4, 2025
@LazyYuuki LazyYuuki removed this from the v0.6.5 milestone Jul 5, 2025
@ramonpzg ramonpzg marked this pull request as draft July 7, 2025 13:31
@LazyYuuki
Copy link
Contributor

LazyYuuki commented Jul 19, 2025

The objective has changed from Inference Endpoint to Inference Provider as HF team has expressed that on cost basis it is not suitable for casual user which is the main group of user for Jan right now.

That being said, we can still cherry pick the example from the docs for and add it as instruction to create Custom Provider with Inference Endpoint instead.

Refer to here for the current implementation in discussion: #5808

@LazyYuuki LazyYuuki closed this Jul 19, 2025
@github-project-automation github-project-automation bot moved this from Blocked to Done in Jan Jul 19, 2025
@louis-jan louis-jan deleted the feature/hf-model-provider branch August 19, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants