Skip to content

fix(ollama): treat model names as positional probe arguments - #129

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

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

Conversation

@imharjot

@imharjot imharjot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

A configured model named --help or -h currently makes ollama show print help and exit successfully. The readiness probe interprets that exit code as an available model, even though Ollama never checks the model.

Pass the model after -- so it reaches the positional MODEL argument. Normal model names still reach the same show handler. This is a follow-up to #128.

Scope

  • Runtime
  • Adapters
  • Parsing/Normalize
  • CI/Workflow
  • Docs

Validation

  • python3 -m unittest discover -s tests -p 'test_*.py'
  • ./scripts/run_runtime_gate_tests.sh
  • ./scripts/run_step5_parallel_benchmark.sh — not applicable to this probe change.

The unchanged current-main suite runs 480 tests with four existing skips. The final runtime gate runs 481 tests with the same four skips; all remaining tests pass. The 20 agent-registry tests pass, including a real stdlib CLI-parser regression for flag-like models and normal argument propagation. The existing resolved-model control also checks the complete probe command. Node tests pass 19 cases with one existing platform skip; skill-format, package-version and diff checks pass.

A separate local executable using Cobra 1.7.0 and pflag 1.0.5, matching Ollama's current dependencies, reproduces the help bypass: show --help and show -h exit zero without calling the handler. With show -- MODEL, the handler receives the exact configured string and its error propagates to MCO as model_not_found. The fixture deliberately has no model service and returns an error for every model. No real Ollama binary, daemon or installed model was used.

Artifacts

  • Local gate report: reports/adapter-contract/2026-10-04/runtime-gh-report.md.
  • Benchmark report: not applicable.
  • CI generates and uploads its own runtime-gate artifacts.

Risk and Rollback

Low risk: only the model-readiness probe arguments change, with no dependency or model-name validation changes. Rollback is a revert of this commit.

@imharjot
imharjot requested a review from tt-a1i as a code owner October 4, 2026 16:52
@tt-a1i
tt-a1i merged commit c274b93 into mco-org:main Oct 7, 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