feat: add Hugging Face as a first-class inference provider - #1171
Closed
davanstrien wants to merge 2 commits into
Closed
feat: add Hugging Face as a first-class inference provider#1171davanstrien wants to merge 2 commits into
davanstrien wants to merge 2 commits into
Conversation
davanstrien
commented
Mar 13, 2026
| @@ -147,6 +148,14 @@ class ProviderConfig: | |||
| api_key_env_vars=("MINIMAX_CN_API_KEY",), | |||
| base_url_env_var="MINIMAX_CN_BASE_URL", | |||
| ), | |||
| "huggingface": ProviderConfig( | |||
| id="huggingface", | |||
| name="Hugging Face", | |||
Contributor
Author
There was a problem hiding this comment.
maybe HuggingFace Inference Providers
Register Hugging Face Inference Providers (https://router.huggingface.co/v1) as a named provider alongside existing ones like Z.AI, Kimi, and MiniMax. Users can now: - `hermes chat --provider huggingface` - Use `hf:model-name` syntax (e.g. `hf:Qwen/Qwen3-235B-A22B-Thinking-2507`) - Set HF_TOKEN in ~/.hermes/.env - Select from 18 curated models via `hermes model` picker Curated model list sourced from models.dev. Users can also type any model name manually — it validates against the live /v1/models endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
davanstrien
force-pushed
the
feat/huggingface-provider
branch
from
March 13, 2026 14:56
ce5223f to
f0a24cf
Compare
Contributor
Author
|
cc @hanouticelina @Wauplin for viz |
davanstrien
marked this pull request as ready for review
March 13, 2026 14:59
Per feedback from @Wauplin — HUGGING_FACE_HUB_TOKEN is outdated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
teknium1
pushed a commit
that referenced
this pull request
Mar 17, 2026
Register Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider alongside existing ones. Users can now: - hermes chat --provider huggingface - Use hf:model-name syntax (e.g. hf:Qwen/Qwen3-235B-A22B-Thinking-2507) - Set HF_TOKEN in ~/.hermes/.env - Select from 18 curated models via hermes model picker OpenAI-compatible endpoint with automatic failover across providers (Groq, Together, SambaNova, etc.), free tier included. Files changed: - hermes_cli/auth.py: ProviderConfig + aliases (hf, hugging-face, huggingface-hub) - hermes_cli/models.py: _PROVIDER_MODELS, _PROVIDER_LABELS, _PROVIDER_ALIASES, _PROVIDER_ORDER - hermes_cli/main.py: provider_labels, providers list, --provider choices, dispatch - hermes_cli/setup.py: provider_choices, setup flow with token prompt - hermes_cli/config.py: HF_TOKEN + HF_BASE_URL in OPTIONAL_ENV_VARS - agent/model_metadata.py: context window entries for all curated HF models - .env.example: HF_TOKEN documentation Based on PR #1171 by @davanstrien. Salvaged onto current main with additional completeness: setup.py flow, config.py env vars, auth.py aliases, model_metadata context windows, .env.example.
Contributor
Author
|
Closing as superseded by #1747 |
teknium1
added a commit
that referenced
this pull request
Mar 27, 2026
Salvage of PR #1747 (original PR #1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
Contributor
|
Merged via PR #3419. Your original contribution was cherry-picked onto current main with authorship preserved — thank you @davanstrien! |
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…rch#3419) Salvage of PR NousResearch#1747 (original PR NousResearch#1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 28, 2026
Register Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider alongside existing ones. Users can now: - hermes chat --provider huggingface - Use hf:model-name syntax (e.g. hf:Qwen/Qwen3-235B-A22B-Thinking-2507) - Set HF_TOKEN in ~/.hermes/.env - Select from 18 curated models via hermes model picker OpenAI-compatible endpoint with automatic failover across providers (Groq, Together, SambaNova, etc.), free tier included. Files changed: - hermes_cli/auth.py: ProviderConfig + aliases (hf, hugging-face, huggingface-hub) - hermes_cli/models.py: _PROVIDER_MODELS, _PROVIDER_LABELS, _PROVIDER_ALIASES, _PROVIDER_ORDER - hermes_cli/main.py: provider_labels, providers list, --provider choices, dispatch - hermes_cli/setup.py: provider_choices, setup flow with token prompt - hermes_cli/config.py: HF_TOKEN + HF_BASE_URL in OPTIONAL_ENV_VARS - agent/model_metadata.py: context window entries for all curated HF models - .env.example: HF_TOKEN documentation Based on PR NousResearch#1171 by @davanstrien. Salvaged onto current main with additional completeness: setup.py flow, config.py env vars, auth.py aliases, model_metadata context windows, .env.example.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…rch#3419) Salvage of PR NousResearch#1747 (original PR NousResearch#1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…rch#3419) Salvage of PR NousResearch#1747 (original PR NousResearch#1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…rch#3419) Salvage of PR NousResearch#1747 (original PR NousResearch#1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
nepenth
pushed a commit
to nepenth/hermes-agent
that referenced
this pull request
Aug 7, 2026
Register Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider alongside existing ones. Users can now: - hermes chat --provider huggingface - Use hf:model-name syntax (e.g. hf:Qwen/Qwen3-235B-A22B-Thinking-2507) - Set HF_TOKEN in ~/.hermes/.env - Select from 18 curated models via hermes model picker OpenAI-compatible endpoint with automatic failover across providers (Groq, Together, SambaNova, etc.), free tier included. Files changed: - hermes_cli/auth.py: ProviderConfig + aliases (hf, hugging-face, huggingface-hub) - hermes_cli/models.py: _PROVIDER_MODELS, _PROVIDER_LABELS, _PROVIDER_ALIASES, _PROVIDER_ORDER - hermes_cli/main.py: provider_labels, providers list, --provider choices, dispatch - hermes_cli/setup.py: provider_choices, setup flow with token prompt - hermes_cli/config.py: HF_TOKEN + HF_BASE_URL in OPTIONAL_ENV_VARS - agent/model_metadata.py: context window entries for all curated HF models - .env.example: HF_TOKEN documentation Based on PR NousResearch#1171 by @davanstrien. Salvaged onto current main with additional completeness: setup.py flow, config.py env vars, auth.py aliases, model_metadata context windows, .env.example.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…rch#3419) Salvage of PR NousResearch#1747 (original PR NousResearch#1171 by @davanstrien) onto current main. Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider: - hermes chat --provider huggingface (or --provider hf) - 18 curated open models via hermes model picker - HF_TOKEN in ~/.hermes/.env - OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.) Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests. Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Register Hugging Face Inference Providers (
https://router.huggingface.co/v1) as a named provider alongside existing ones like Z.AI, Kimi, and MiniMax.Users can now:
hermes chat --provider huggingfacehf:model-namesyntax (e.g.hf:Qwen/Qwen3-235B-A22B-Thinking-2507)HF_TOKENin~/.hermes/.envhermes modelpickerCurated model list sourced from models.dev. Users can also type any model name manually — it validates against the live
/v1/modelsendpoint (120+ models available).Type of Change
Changes Made
hermes_cli/auth.py— AddedhuggingfacetoPROVIDER_REGISTRYwithHF_TOKEN/HUGGING_FACE_HUB_TOKENenv vars andhttps://router.huggingface.co/v1base URLhermes_cli/models.py— Added curated model list (from models.dev), label,hfalias, and provider order entryhermes_cli/main.py— Added HF to provider menu, dispatch,--providerCLI choices, and curated model picker listHow to Test
HF_TOKENin~/.hermes/.env(get one at https://huggingface.co/settings/tokens)hermes model, select "Hugging Face Inference Providers"Qwen/Qwen3-235B-A22B-Thinking-2507)Or directly:
hermes chat --provider huggingface --model Qwen/Qwen3-235B-A22B-Thinking-2507Tested locally
validate_requested_model()accepts curated models against live APIrouter.huggingface.co/v1Checklist
Code
pytest tests/ -qand all tests passDocumentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — can addHF_TOKENexampleOnce merged, we'll add Hermes Agent to the HF Inference Providers integrations page as well.