fix: reconcile run_vector_search defaults with CLI defaults#4
Merged
Conversation
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.
What
The
run_vector_searchsignature defaults had drifted from the canonical CLI defaults incli.py.main.pypasses every argument explicitly, so the CLI path was unaffected — but any library/test caller relying on the defaults got different (and in one case broken) behavior.Drift fixed:
pool_size20100epoch_diversity0.100.0vision_model"ensemble"google/siglip-so400m-patch14-384llm_rate0.2min(2/workers, 0.2)"ensemble"was especially wrong:get_scorerforwardsvision_modelstraight toVisionScoreras an HF repo id, so the stale default would have failed to load a model.How
Rather than duplicate literals, the runner now imports the defaults from
cli.py(the single source of truth). The import is acyclic —cli.pydepends only onscore/search/argparse.llm_ratedefaults toNoneand is derived fromworkersvia the same_default_llm_ratehelper the CLI uses.Tests
Added
test_runner_defaults_match_cli_defaults, which introspects the signature and asserts each default tracks its CLI counterpart, so this can't silently drift again. Full suite: 357 passed.