fix(index): pass index_provider to apply_code_rag_retriever#3240
Merged
fix(index): pass index_provider to apply_code_rag_retriever#3240
Conversation
apply_code_rag_retriever was receiving provider.clone() (the main chat provider) instead of index_provider (the dedicated embed provider resolved from config.index.embed_provider). When the two providers use different embedding dimensions this caused a Qdrant dimension mismatch on every code RAG retrieval attempt, silently falling back to no code context injection. index_provider is now cloned before apply_code_indexer so both the indexer and the retriever share the same embed provider — consistent with how the index collection was originally populated. Closes #3239
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
apply_code_rag_retrieverinsrc/runner.rswas receivingprovider.clone()(main chat provider) instead ofindex_provider(the dedicated embed provider fromconfig.index.embed_provider)index_providerbefore passing it toapply_code_indexer, then passindex_provider.clone()toapply_code_rag_retriever— both now share the same embed provider, consistent with how the index collection was populatedTest plan
cargo buildsucceedscargo +nightly fmt --checkpassescargo clippy --workspace -- -D warningspassescargo nextest run -p zeph --bins)index.embed_provider = "ollama-embed"and main provider OpenAI — verify no dimension mismatch errors in logsCloses #3239