feat: add Ollama Cloud as built-in provider#6038
Closed
kshitijk4poor wants to merge 1 commit into
Closed
Conversation
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama, ollama_cloud -> ollama-cloud - models.dev integration for 35+ models with accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in new providers.py system - CLI --provider choices, setup flow, config docs - 37 provider-specific tests Dynamic model discovery — no static model list to maintain: 1. Disk cache (< 1hr TTL, stale fallback on total failure) 2. Live /v1/models endpoint (primary — freshest source) 3. models.dev registry (secondary — fills gaps) 4. Merge: live models first, then models.dev additions (deduped) Closes NousResearch#3926
7974962 to
7b2059d
Compare
teknium1
pushed a commit
that referenced
this pull request
Apr 16, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR #6038 by kshitijk4poor. Closes #3926
teknium1
pushed a commit
that referenced
this pull request
Apr 16, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR #6038 by kshitijk4poor. Closes #3926
Contributor
This was referenced Apr 16, 2026
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR NousResearch#6038 by kshitijk4poor. Closes NousResearch#3926
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR NousResearch#6038 by kshitijk4poor. Closes NousResearch#3926
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR NousResearch#6038 by kshitijk4poor. Closes NousResearch#3926
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR NousResearch#6038 by kshitijk4poor. Closes NousResearch#3926
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
Add ollama-cloud as a first-class provider with full parity to existing API-key providers (gemini, zai, minimax, etc.): - PROVIDER_REGISTRY entry with OLLAMA_API_KEY env var - Provider aliases: ollama -> custom (local), ollama_cloud -> ollama-cloud - models.dev integration for accurate context lengths - URL-to-provider mapping (ollama.com -> ollama-cloud) - Passthrough model normalization (preserves Ollama model:tag format) - Default auxiliary model (nemotron-3-nano:30b) - HermesOverlay in providers.py - CLI --provider choices, CANONICAL_PROVIDERS entry - Dynamic model discovery with disk caching (1hr TTL) - 37 provider-specific tests Cherry-picked from PR NousResearch#6038 by kshitijk4poor. Closes NousResearch#3926
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
Add Ollama Cloud (
ollama.com) as a first-class built-in provider. Users can now use--provider ollama-cloud(or theollamaalias) instead of manually configuringprovider: "custom"+base_url.Before (workaround):
After:
Changes
Provider registration (13 files)
hermes_cli/auth.pyPROVIDER_REGISTRYentry + aliases (ollama→ollama-cloud)hermes_cli/config.pyOLLAMA_API_KEY+OLLAMA_BASE_URLinOPTIONAL_ENV_VARShermes_cli/models.pyfetch_ollama_cloud_models()hermes_cli/model_normalize.py_PASSTHROUGH_PROVIDERShermes_cli/providers.pyHermesOverlay+ label entrieshermes_cli/main.py--providerchoices, provider dispatchhermes_cli/setup.pyagent/model_metadata.py_PROVIDER_PREFIXES+_URL_TO_PROVIDERmappingagent/models_dev.pyPROVIDER_TO_MODELS_DEVmappingagent/auxiliary_client.pynemotron-3-nano:30b).env.examplecli-config.yaml.exampleDynamic model discovery
No static model list — models are discovered dynamically with merged sources and disk caching:
/v1/modelsendpoint (primary) — freshest sourceThis means Ollama Cloud model lists stay current as Ollama adds/removes models without any Hermes code changes.
Test coverage
37 tests in
tests/hermes_cli/test_ollama_cloud_provider.py:model:tagformat)chat_completionsmode)Test plan
python -m pytest tests/hermes_cli/test_ollama_cloud_provider.py -v— 37 passedpython -m pytest tests/hermes_cli/test_ollama_cloud_auth.py -v— 31 passed (pre-existing tests)python -m pytest tests/hermes_cli/test_gemini_provider.py -v— 42 passed (no regression)python -m pytest tests/ -qhermes setup model→ select ollama-cloud → models fetched dynamicallyhermes chat --provider ollama-cloudwithOLLAMA_API_KEYsetCloses #3926