fix(ollama): catalog fallback for load/info/install + real cache.path (issue #156 B1-B2)#158
Merged
Conversation
… (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>
|
🎉 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! ❤️ |
This was referenced Jul 19, 2026
Merged
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
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 toModelSpec.from_ref(ref)when the catalog lookup misses.ModelManager.info()falls back toModelInfo.from_ref(ref, installed_tags)for installed-but-uncatalogued models, and still raisesModelNotFoundErrorfor truly-unknown models.ModelManager.install()allows locally-installed, uncatalogued models instead of rejecting them.Added
ModelSpec.from_refandModelInfo.from_refindomain/model.py.B2 — Real
cache.path()CacheService.path()returned the literal string"<cache>". Addedpath()toCachePortandFilesystemCache;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 --strictclean. Verified live against Ollama:info('mistral:latest')→installed: True,load('mistral:latest')returns a client without re-downloading,cache.path()returns a real path.