fix(ollama): preserve cloud model suffixes in picker - #52613
Open
deranaz wants to merge 1 commit into
Open
Conversation
deranaz
force-pushed
the
fix/ollama-cloud-model-picker-suffix
branch
from
June 25, 2026 18:07
6205ecf to
ec19ec7
Compare
teknium1
reviewed
Jul 15, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused regression coverage. The current merge does still normalize models.dev-only IDs, but this patch reverses a documented compatibility decision that needs endpoint-specific handling.
Problems
hermes_cli/models.py:3615changes the saved/returned models.dev ID globally. Current main deliberately stores the normalized ID athermes_cli/models.py:3767-3772; commiteadf34633e038c595dcf615845b992a45443e380records that the hosted Ollama Cloud API uses clean IDs and rejected suffixed ones with 400/404 responses.- The patch has no
base_urldistinction. The related local-proxy report in #59819 identifies routing through a local Ollama daemon as the case where tags may be required, which is different from the hosted default athermes_cli/models.py:3742.
Suggested changes
- Preserve the hosted-endpoint normalization, and make any tag preservation/retagging conditional on a verified endpoint mode.
- Cover hosted and local-proxy merge/cache results separately.
Automated hermes-sweeper review.
| if normalized and normalized not in seen: | ||
| seen.add(normalized) | ||
| merged.append(normalized) | ||
| merged.append(m) |
Contributor
There was a problem hiding this comment.
This globally changes the cached picker ID, but current main intentionally appends the normalized value because commit eadf346 documents hosted Ollama Cloud rejecting suffixed IDs. Please scope tag preservation to a verified endpoint mode (for example, a local daemon proxy) rather than applying it to every models.dev fallback.
This was referenced Aug 3, 2026
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.
What does this PR do?
Preserves Ollama Cloud model IDs from models.dev in the model picker output while still using suffix-stripped IDs only for deduplication. This prevents cloud-only IDs such as
qwen3-coder:480b-cloudfrom being shown as local-looking IDs likeqwen3-coder:480b.Related Issue
Fixes #52599
Type of Change
Changes Made
hermes_cli/models.py: keep the original Ollama Cloud model ID when adding merged entries, but dedupe by the normalized suffix-stripped key.tests/hermes_cli/test_ollama_cloud_provider.py: update suffix tests to assert cloud IDs are preserved when models.dev is the source, and add coverage for live/API dedupe with suffixed IDs.tests/hermes_cli/test_ollama_cloud_provider.py: add explicit UTF-8 encodings in cache test file I/O to satisfy the Windows compatibility checker.How to Test
uv run --extra dev pytest tests/hermes_cli/test_ollama_cloud_provider.py tests/hermes_cli/test_setup_ollama_cloud_force_refresh.py -q.uv run python scripts/check-windows-footguns.py --diff upstream/main.git diff --check.Checklist
Code
fix(ollama): preserve cloud model suffixes in picker.Documentation & Housekeeping
cli-config.yaml.example: N/A, no config keys changed.CONTRIBUTING.md/AGENTS.md: N/A, no architecture/workflow changed.scripts/check-windows-footguns.py --diff upstream/mainpasses.Screenshots / Logs