Repository navigation
fix: preserve the default HTTP BGE reranking strategy - #2628
Merged
endxxxx merged 1 commit intoNov 18, 2026
Merged
Conversation
endxxxx
approved these changes
Nov 18, 2026
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.
Description
Fixes #2627.
RerankerFactory.from_configfails withValueError: Invalid backend: Nonefor a minimalhttp_bge_strategy/bge_strategyconfiguration that omitsreranker_strategy. Both the HTTP strategy constructor andRerankerStrategyFactory.from_configalready default tosingle_turn, but the outer factory unconditionally overrides that default withNone.Preserve
single_turnwhen the configuration key is absent. Explicit selections and invalid-strategy errors are unchanged. No dependencies, signatures or schemas change.This is independent of #2626: the omitted default fails during construction, before any HTTP request; this PR changes no authentication behavior.
Type of change
How Has This Been Tested?
poetry run pytest tests/reranker/ -q— 30 passed.3a16e5fe3048a209f722806f4123fa2e533588fd, the 2 omitted-strategy cases fail and 4 explicit-strategy/rejection controls pass. All 6 pass with the one-line correction.make format— passed (643 files).HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 make test— 1,011 passed, 9 skipped, 38 warnings. Full optional dependencies were already installed from this baseline's Poetry lockfile. A task-owned environment is reused by this isolated worktree; the tests import this worktree's source. Offline flags avoid the unrelated Qwen example-model download.The tests exercise public configuration, factory and rerank calls, actual single-turn document preparation/reconstruction, Requests serialization and response handling. Only the external HTTP service response is supplied through
Session.send; no hosted reranker/model was called.Checklist
Reviewer Checklist
Left for the reviewer; upstream checks and maintainer acceptance are pending.
AI assistance was used for investigation, implementation and local verification.