feat: give local model metadata a shared service owner - #6683
Merged
atomantic merged 1 commit intoSep 9, 2026
Merged
Conversation
atomantic
deleted the
cos/app-improve-portos-default-module-hygiene-mttjug8g/agent-42b955c0
branch
September 9, 2026 03:51
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
MTPLX needed repository ages but imported
huggingFaceCatalog.js, pulling in GGUF/MLX selection, Ollama registry enrichment and music rendering. Move the existing Hub reads and shared request/cache state intoserver/services/huggingFaceMetadata.js; both consumers now use that owner. MTPLX's static import closure drops from 57 modules to 36.Audit evidence and scope
server/services/mtplxModelManager.js:31imported dates from the catalog;server/services/huggingFaceCatalog.js:11imported music rendering, while lines 711–871 owned transport/cache and line 1347 exposed generic age enrichment.server/services/huggingFaceMetadata.js:120(raw search),:162(cached repo reads),:210(bounded dates). Authentication, retry, concurrency, single-flight and memory-cache state move together. Model ranking, variants, measured fit and installability remain in the catalog. Persistence remains inhuggingFaceRepoCache.js.server/lib/README.md, its barrel,docs/ARCHITECTURE.md, Hub/repo metadata/cache terms, and importers ofhuggingfaceModel.js,huggingfaceLora.js,huggingFaceRepoCache.jsandollamaRegistryCatalog.js. The image/LoRA adapters have different projection, error and cache contracts; the existing disk cache is reused unchanged. No second fetch implementation or broad services catalog was added. The architecture map documents placement for future consumers.fetchRepoPublishedDatesexport, return values, cache paths/formats, auth-denial handling, budgets and lazy request behavior. No migration or provider calls at import time. Moved function bodies are identical apart from export declarations.Test plan
huggingFaceCatalog,huggingFaceRepoCache,mtplxModelManager,routes/localLlmandlib/importScopingusing the server Vitest command.git diff --checkpassed.