Skip to content

feat: add Google Gemini and Hugging Face as inference providers#995

Open
teyrebaz33 wants to merge 1 commit intoNousResearch:mainfrom
teyrebaz33:feat/982-gemini-huggingface-providers
Open

feat: add Google Gemini and Hugging Face as inference providers#995
teyrebaz33 wants to merge 1 commit intoNousResearch:mainfrom
teyrebaz33:feat/982-gemini-huggingface-providers

Conversation

@teyrebaz33
Copy link
Contributor

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 in PROVIDER_REGISTRY:

Provider Base URL Env vars
gemini generativelanguage.googleapis.com/v1beta/openai GEMINI_API_KEY, GOOGLE_API_KEY
huggingface api-inference.huggingface.co/v1 HUGGINGFACE_API_KEY, HF_TOKEN

hermes_cli/setup.py — setup wizard now shows:

  • Google Gemini (free tier available) → prompts for GEMINI_API_KEY, links to aistudio.google.com
  • Hugging Face Inference API (free tier available) → prompts for HUGGINGFACE_API_KEY, links to huggingface.co/settings/tokens

Both follow the same api_key auth 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Using other LLM providers than Openrouter; using LLM providers' OAuth instead of API key

1 participant