You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ollama's /api/tags can include cloud-hosted models such as qwen3-coder:480b-cloud. The installed-model builder was inserting every tag and its family stem into the installed set, so a cloud tag could insert qwen3-coder and incorrectly mark unrelated HuggingFace Qwen3-Coder variants as locally installed.
Fix
Parse the optional Ollama size field from tag responses.
Centralize Ollama installed-set construction so detect_with_installed and installed_models_counted share the same behavior.
Skip cloud entries before inserting tag names or family stems when the tag suffix is -cloud or size == 0.
Keep local-model detection tolerant of older/missing size fields when the tag does not look like a cloud model.
cargo test -p llmfit-core test_ollama -- --nocapture
make test
make clippy currently fails on existing upstream main warnings outside this PR's scope, including llmfit-core/src/fit.rs, llmfit-core/src/hardware.rs, llmfit-core/src/models.rs, and llmfit-core/src/bench.rs.
Thanks for this, @snvtac 🙏 — flagging for you that #650 landed on main and closed the underlying issue (#619), so the cloud-model false-positive this targets is now fixed on main. That makes this PR a duplicate of merged work, so you may want to close it.
One thing your version did that's worth preserving: modelling the Ollama size field as Option<u64> (rather than #[serde(default)]), so older Ollama servers that omit size don't get every local model misclassified as cloud — with a test for it. If you're up for it, a small focused follow-up PR for just that tolerance would be a welcome hardening on top of what merged. Either way, appreciated the contribution.
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
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.
Fixes #619.
Problem
Ollama's
/api/tagscan include cloud-hosted models such asqwen3-coder:480b-cloud. The installed-model builder was inserting every tag and its family stem into the installed set, so a cloud tag could insertqwen3-coderand incorrectly mark unrelated HuggingFace Qwen3-Coder variants as locally installed.Fix
sizefield from tag responses.detect_with_installedandinstalled_models_countedshare the same behavior.-cloudorsize == 0.sizefields when the tag does not look like a cloud model.Validation
cargo fmt --all -- --checkgit diff --checkcargo test -p llmfit-core test_ollama -- --nocapturemake testmake clippycurrently fails on existing upstreammainwarnings outside this PR's scope, includingllmfit-core/src/fit.rs,llmfit-core/src/hardware.rs,llmfit-core/src/models.rs, andllmfit-core/src/bench.rs.