Repository navigation
fix(ollama): probe the requested model directly - #128
Merged
Merged
Conversation
4 of 8 tasks
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
An Ollama agent can be reported ready when only a different model is installed. For example, the list entry
codellama:7b-instructsatisfies the current substring check forcodellama:7b; model names and namespaces can collide the same way.Use
ollama show <model>and its exit status to check the requested model. Ollama resolves omitted tags itself, socodellamastill works for an installedcodellama:latest. A missing model now givesmodel_not_foundinstead of a false ready result.Scope
Validation
python3 -m unittest discover -s tests -p 'test_*.py': 471 tests, 4 platform skips./scripts/run_runtime_gate_tests.sh: PASSnpm test: 19 passed, 1 platform skipThe new regression fails on main for three model-name collisions and passes with this change. A local executable fixture also exercises
mco agent check local-coder --jsonand confirmsready: falsefor an unavailable model.Artifacts
reports/adapter-contract/2026-10-04/runtime-gh-report.md(generated locally)Risk and Rollback
Low risk: the command changes only the model-presence probe, and does not pull or run a model. Revert this commit to restore the previous probe.
All checks above ran locally with Python 3.14.