Skip to content

fix(models): prioritize Ollama Cloud models - #25174

Open
farena-ai wants to merge 1 commit into
NousResearch:mainfrom
farena-ai:fix/ollama-cloud-model-ordering
Open

fix(models): prioritize Ollama Cloud models#25174
farena-ai wants to merge 1 commit into
NousResearch:mainfrom
farena-ai:fix/ollama-cloud-model-ordering

Conversation

@farena-ai

Copy link
Copy Markdown

Summary

  • Prioritizes Ollama Cloud models in model listing/selection behavior.
  • Updates focused tests for Ollama Cloud provider ordering.

Files changed

  • hermes_cli/models.py
  • tests/hermes_cli/test_ollama_cloud_provider.py

Test commands/results

python3 -m py_compile hermes_cli/models.py tests/hermes_cli/test_ollama_cloud_provider.py
venv/bin/python -m pytest tests/hermes_cli/test_ollama_cloud_provider.py -q

Result:

46 passed

Live impact

  • Affects Hermes CLI/runtime model listing and selection paths when running updated code.
  • No gateway platform behavior changed.
  • No running service was restarted or modified.

Restart/reload needed

  • CLI use picks this up when run from the updated checkout/install.
  • Existing long-running processes need restart/relaunch only if they rely on this model-listing code path.
  • No gateway restart is specifically required unless the gateway process itself must refresh this code.

Known caveats

  • Targeted Ollama Cloud tests passed.
  • Optional broader sweep before merge:
venv/bin/python -m pytest tests/hermes_cli/test_models.py tests/hermes_cli/test_ollama_cloud_provider.py -q

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/ollama Ollama / local models labels May 13, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the Ollama Cloud picker. The requested behavior is still absent on current main: fetch_ollama_cloud_models() preserves live/models.dev order at hermes_cli/models.py:3746-3761.

Problems

  • The new priority call in this PR only handles a newly merged result. Current fresh-cache returns at hermes_cli/models.py:3720-3724 and stale-cache fallback at hermes_cli/models.py:3763-3766 return stored order verbatim, so existing caches and offline fallback do not receive the requested prioritization.

Suggested changes

  • Apply the helper on both cache-return paths, or centralize it before every return from fetch_ollama_cloud_models().
  • Add tests for fresh-cache and stale-cache ordering alongside the new merge test.

Automated hermes-sweeper review.

Comment thread hermes_cli/models.py
@@ -3146,6 +3180,7 @@ def fetch_ollama_cloud_models(
seen.add(normalized)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reorders only newly merged results. Fresh-cache and stale-cache paths return their stored lists verbatim on current main (hermes_cli/models.py:3720-3724, 3763-3766), so please apply the helper to those return paths too and cover them with tests.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/ollama Ollama / local models sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants