Skip to content

fix(ollama): probe the requested model directly - #128

Merged
tt-a1i merged 1 commit into
mco-org:mainfrom
imharjot:fix/ollama-model-detection
Oct 4, 2026
Merged

tt-a1i merged 1 commit into
mco-org:mainfrom
imharjot:fix/ollama-model-detection

Conversation

@imharjot

@imharjot imharjot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An Ollama agent can be reported ready when only a different model is installed. For example, the list entry codellama:7b-instruct satisfies the current substring check for codellama: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, so codellama still works for an installed codellama:latest. A missing model now gives model_not_found instead of a false ready result.

Scope

  • Adapters

Validation

  • python3 -m unittest discover -s tests -p 'test_*.py': 471 tests, 4 platform skips
  • ./scripts/run_runtime_gate_tests.sh: PASS
  • npm test: 19 passed, 1 platform skip

The 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 --json and confirms ready: false for an unavailable model.

Artifacts

  • Gate report: 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.

@imharjot
imharjot requested a review from tt-a1i as a code owner October 4, 2026 14:33
@tt-a1i
tt-a1i merged commit 30c48f3 into mco-org:main Oct 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants