fix: model discovery install - #60
Conversation
SummaryThe following content is AI-generated and provides a summary of the pull request: Fix: Model Discovery Module Filtering and
|
There was a problem hiding this comment.
The PR contains a genuine correctness concern in the module filtering logic (unknown modules interleaved between supported ones are silently accepted), a missing semicolon, several TODO comments that don't belong in a bug-fix PR, and the package.json reordering lacks any stated justification. The core bug fix for fetchImpl extraction order appears correct, but the semantics change in readSentenceTransformerSemantics needs careful scrutiny before merging.
PR Bot Information
Version: 1.29.54
- File Content Strategy: Full file content
- LLM:
anthropic--claude-4.6-sonnet - Correlation ID:
41742bf0-a24d-11f1-800d-4e78073e98ce - Event Trigger:
pull_request.ready_for_review
|
I compared this PR with #61 in detail. Both branches start from the same merge base and overlap primarily in Most of this PR is superseded by #61:
The meaningful semantic difference is the handling of Sentence Transformers modules. This PR filters unknown modules out and validates the remaining Transformer → Pooling → optional Normalize sequence. #61 intentionally rejects unknown modules. Silently filtering them is unsafe because Recommendation: merge #61 and close this PR as superseded. If a concrete model rejected because of an additional module should be supported, that module should be implemented explicitly—with position/contract validation and tests—rather than removed through a generic filter. Merging this first would also require manually resolving the conflicting model-discovery implementation when rebasing or merging #61, without providing a useful prerequisite for it. |
|
Closed in favor of #61 |
Fix: Model Discovery Module Filtering and Config Ordering
This PR fixes two issues in the model discovery logic for vector embeddings.
Changes
lib/vector_embedding/model-discovery.jsFix module filtering logic: The Sentence Transformers module validation previously rejected models containing unsupported/unknown module types (e.g., custom or future modules). It now filters the modules list to only consider supported types before validating the pipeline, allowing models with additional unknown modules to be processed correctly.
modules(raw list) in the semantics logic are replaced withsupported(filtered list) for length checks, index access, and normalization detection.Fix
fetchImplextraction order: Reorders thefetchImplandcreateContextinitialization indiscoverModelto correctly extractfetchImplbefore using it to create the context. Previously,createContextwas called beforefetchImplwas defined, which would cause a runtime error.Minor code quality: Adds several TODO comments for future cleanup and improves whitespace/formatting throughout the file.
Category
🐛 Bug Fix
Have you...