feat(auth): add Ollama Cloud, Google/Gemini, xAI, and Ollama Local as built-in providers#3709
Closed
simplenamebox-ops wants to merge 1 commit into
Closed
Conversation
… built-in providers
|
when im using the google model's trough their API (custom API mode in hermes), specially the gemma models the thinking tokens are viable to the telegram. as a block its not hidden. will this fix that? |
Contributor
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.
Summary
Adds 4 inference providers to
PROVIDER_REGISTRYand corresponding aliases. These are popular providers that currently require manual patching after every update.Motivation
Hermes already supports 16 built-in providers (nous, openai-codex, anthropic, minimax, huggingface, etc.). Four widely-used providers are missing:
ollama.com) — Cloud-hosted open models (GLM-5, Qwen3.5, DeepSeek, MiniMax, etc.). Ollama launched cloud hosting in late 2025 and has a growing user base. Uses API keys, OpenAI-compatible endpoint.generativelanguage.googleapis.com/v1beta/openai) — Google's Gemini models via their OpenAI-compatible endpoint. Many users have free Gemini API credits.api.x.ai/v1) — Grok models. Standard OpenAI-compatible API with API key auth.localhost:11434/v1) — Local Ollama instance. Many users run Ollama locally for development/testing.Without these in the registry, users must either:
auth.pyafter everyhermes update(fragile, breaks on each update)Changes
hermes_cli/auth.pyAdd to
PROVIDER_REGISTRY:googlexaiollama-cloudollama-localAdd aliases:
gemini→googlegoogle-ai→googlegoogleai→googlegrok→xaiollama_cloud→ollama-cloudollama-cloud-api→ollama-cloudNo other files changed
The provider registry is self-contained. Model validation, provider selection, and API routing already read from
PROVIDER_REGISTRYautomatically.Test plan
python3 -m py_compile hermes_cli/auth.pygit diff --checkhermes_cli/auth.pychangedhermes config set model.provider ollama-cloud→ resolves to Ollama Cloudhermes config set model.provider google→ resolves to Googlehermes config set model.provider xai→ resolves to xAIhermes config set model.provider ollama-local→ resolves to local Ollamagemini→ google,grok→ xai,ollama_cloud→ ollama-cloudOLLAMA_CLOUD_API_KEY,GEMINI_API_KEY,XAI_API_KEY,OLLAMA_API_KEYContext
These providers have been running via local patches in a multi-agent setup for months. The provider configs are stable and tested in daily use. Adding them upstream would eliminate a recurring post-update patch requirement.