Repository navigation
fix(ollama): treat model names as positional probe arguments - #129
Merged
Merged
Conversation
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
A configured model named
--helpor-hcurrently makesollama showprint 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 positionalMODELargument. Normal model names still reach the same show handler. This is a follow-up to #128.Scope
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 --helpandshow -hexit zero without calling the handler. Withshow -- MODEL, the handler receives the exact configured string and its error propagates to MCO asmodel_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
reports/adapter-contract/2026-10-04/runtime-gh-report.md.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.