Skip to content

fix(ollama): verify model after pull#146

Merged
bityodha merged 1 commit into
OpenAgentHQ:mainfrom
Sanjays2402:fix/verify-ollama-pull
Jul 17, 2026
Merged

fix(ollama): verify model after pull#146
bityodha merged 1 commit into
OpenAgentHQ:mainfrom
Sanjays2402:fix/verify-ollama-pull

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

Summary

Ollama pulls now report success only after the model appears in the installed-model list. The adapter retries the visibility check once after a short backoff and returns a failed PullResult if the model remains absent.

Closes #15

Changes

  • Verify post-pull model visibility before completing progress or reporting success.
  • Cover delayed visibility and permanent absence with deterministic unit tests.

Testing

  • pytest -q -m 'not integration' (91 passed)
  • Ruff check/format, Bandit, Mypy, and the integration skip path without Ollama

Checklist

  • Branch named per Git Workflow (feature/, fix/, docs/, refactor/, test/, chore/)
  • Not developed on main
  • Code follows AGENT.md coding standards (type hints, Pydantic v2, no generic Exception, no business logic in CLI)
  • domain/ and ports/ stay pure (no I/O, no framework imports)
  • Quality gates pass locally: ruff, mypy --strict, bandit, pytest
  • Docs updated if behavior changed (not needed; no public API or configuration changed)
  • pyproject.toml and src/modeldock/__init__.py versions match (not release-related)

Confirm a pulled model appears in Ollama before reporting success. Retry the listing once to cover the post-pull visibility race and return a failed result if it remains absent.

Add deterministic tests for delayed visibility and permanent absence.
@bityodha
bityodha merged commit ac30202 into OpenAgentHQ:main Jul 17, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @Sanjays2402!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

🌟 This is your first merged contribution to this repository.
Welcome to the OpenAgentHQ contributors family!

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.

Ollama: verify model pulled before marking installed

2 participants