feat: add Google Gemini and Hugging Face as inference providers#995
Open
teyrebaz33 wants to merge 1 commit intoNousResearch:mainfrom
Open
feat: add Google Gemini and Hugging Face as inference providers#995teyrebaz33 wants to merge 1 commit intoNousResearch:mainfrom
teyrebaz33 wants to merge 1 commit intoNousResearch:mainfrom
Conversation
Closes NousResearch#982 Add two new providers to PROVIDER_REGISTRY and setup wizard: Google Gemini: - Base URL: generativelanguage.googleapis.com/v1beta/openai (OpenAI-compatible) - Env vars: GEMINI_API_KEY, GOOGLE_API_KEY (fallback) - Free tier available at aistudio.google.com Hugging Face Inference API: - Base URL: api-inference.huggingface.co/v1 (OpenAI-compatible) - Env vars: HUGGINGFACE_API_KEY, HF_TOKEN (fallback) - Free tier available for many models Both follow the existing api_key auth pattern (Z.AI, Kimi, MiniMax). OAuth support is out of scope for this PR. Tests: 5 new tests in TestGeminiHuggingFaceProviders, 34 passed total.
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.
Closes #982
What
Adds Google Gemini and Hugging Face Inference API as selectable providers in the setup wizard — both offer free tiers and are OpenAI-compatible.
Changes
hermes_cli/auth.py— two new entries inPROVIDER_REGISTRY:geminigenerativelanguage.googleapis.com/v1beta/openaiGEMINI_API_KEY,GOOGLE_API_KEYhuggingfaceapi-inference.huggingface.co/v1HUGGINGFACE_API_KEY,HF_TOKENhermes_cli/setup.py— setup wizard now shows:Google Gemini (free tier available)→ prompts forGEMINI_API_KEY, links to aistudio.google.comHugging Face Inference API (free tier available)→ prompts forHUGGINGFACE_API_KEY, links to huggingface.co/settings/tokensBoth follow the same
api_keyauth pattern as Z.AI, Kimi, and MiniMax.Out of scope
OAuth authentication — requested as "if possible" in the issue. Can follow in a separate PR.
Tests
5 new tests in
TestGeminiHuggingFaceProviders, 34 passed total.