test(kb): regression guard for BibTeX-KB local-embedding routing#23
Merged
Conversation
Locks the fix in 464a34c: bibtex_kb builders must route through create_embedding_provider so local models (e.g. all-MiniLM-L6-v2) use the SentenceTransformer provider instead of being sent to LiteLLM (which raised "LLM Provider NOT provided" and produced 0-chunk KBs). Test ported from the now-superseded #13. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Ports the regression test from the now-closed #13 (whose code fix already landed on
mainvia464a34c).Locks the local-first behaviour: both
bibtex_kbbuilders must route embeddings throughcreate_embedding_provider, so a local model (e.g. the defaultall-MiniLM-L6-v2) uses theSentenceTransformerEmbeddingProviderrather than being sent to LiteLLM (which raised "LLM Provider NOT provided" → 0-chunk KBs). Directly relevant to local-only setups.Test Plan
tests/unit/test_bibtex_kb_local_embeddings.py— 4 passed on currentmain(local→SentenceTransformer, api→LiteLLM, api+fallback→Fallback, and a source-inspection guard that neither builder hardcodesLiteLLMEmbeddingProvider)🤖 Generated with Claude Code