Skip to content

fix(ollama): catalog fallback for load/info/install + real cache.path (issue #156 B1-B2)#158

Merged
himanshu231204 merged 1 commit into
mainfrom
fix/156-b1-b2
Jul 19, 2026
Merged

fix(ollama): catalog fallback for load/info/install + real cache.path (issue #156 B1-B2)#158
himanshu231204 merged 1 commit into
mainfrom
fix/156-b1-b2

Conversation

@himanshu231204

Copy link
Copy Markdown
Member

Summary

Fixes issue #156 blockers B1 and B2 for the 0.1.1 release.

B1 — Catalog fallback for load/info/install

A model installed locally but absent from the bundled catalog (e.g. pulled outside ModelDock) could not be loaded, inspected, or installed — every path raised ModelNotFoundError. Now:

  • LifecycleOrchestrator.load() falls back to ModelSpec.from_ref(ref) when the catalog lookup misses.
  • ModelManager.info() falls back to ModelInfo.from_ref(ref, installed_tags) for installed-but-uncatalogued models, and still raises ModelNotFoundError for truly-unknown models.
  • ModelManager.install() allows locally-installed, uncatalogued models instead of rejecting them.

Added ModelSpec.from_ref and ModelInfo.from_ref in domain/model.py.

B2 — Real cache.path()

CacheService.path() returned the literal string "<cache>". Added path() to CachePort and FilesystemCache; CacheService.path() now returns the real cache directory.

Tests

  • tests/unit/test_sdk_api.py: info/load/install fallback for installed uncatalogued models; unknown-not-installed still raises.
  • tests/unit/test_cache.py: path() returns the real cache dir.

Verification

Unit 115 passed, integration (excl. slow pull) 3 passed, e2e 16 passed. ruff, ruff format, mypy --strict clean. Verified live against Ollama: info('mistral:latest')installed: True, load('mistral:latest') returns a client without re-downloading, cache.path() returns a real path.

… (issue #156 B1-B2)

B1: ModelManager.info/install and LifecycleOrchestrator.load now fall back to a local ModelRef when a model is installed but absent from the bundled catalog, instead of raising ModelNotFoundError. info() still raises for truly-unknown models. Added ModelSpec.from_ref and ModelInfo.from_ref.

B2: Added path() to CachePort and FilesystemCache; CacheService.path() now returns the real cache directory instead of the literal '<cache>'.

Co-Authored-By: Claude <noreply@anthropic.com>
@himanshu231204
himanshu231204 merged commit 0d794c9 into main Jul 19, 2026
29 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @himanshu231204!

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! ❤️

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.

1 participant