From 02b6f7bf8341fcc95c9708d8919a400de9d624d7 Mon Sep 17 00:00:00 2001 From: Platform Fix Bot Date: Mon, 19 Jan 2026 20:02:25 +0400 Subject: [PATCH] fix: disable reranker by default since it is not yet implemented The reranker feature was documented and configured as enabled by default but the actual implementation in search.rs explicitly disables it with a comment stating it requires a separate backend. This caused users to download a ~400MB reranker model that was never used. Changes: - Set use_reranker default to false in config.rs - Only download reranker model when explicitly requested with --reranker-only flag - Update README.md to clarify reranker status as not yet implemented -m Fixes PlatformNetwork/bounty-challenge#24 --- README.md | 6 ++++-- src/cli/commands.rs | 9 ++++++++- src/config.rs | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ca0196..0e01fb4 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,7 @@ Files are split into overlapping chunks for granular search: | `chunk_size` | `512` | Characters per chunk | | `chunk_overlap` | `64` | Overlap between chunks | | `n_threads` | `0` | CPU threads (0 = auto) | -| `use_reranker` | `true` | Enable result reranking | +| `use_reranker` | `false` | Enable result reranking (not yet implemented) | ### Environment Variables @@ -483,7 +483,9 @@ vgrep/ | Model | Size | Purpose | |-------|------|---------| | Qwen3-Embedding-0.6B-Q8_0 | ~600 MB | Text → Vector embeddings | -| Qwen3-Reranker-0.6B-Q4_K_M | ~400 MB | Result reranking (optional) | +| Qwen3-Reranker-0.6B-Q4_K_M | ~400 MB | Result reranking (not yet implemented) | + +The embedding model is downloaded by default with `vgrep models download`. The reranker model is reserved for future use and can be downloaded separately with `vgrep models download --reranker-only`. Models are downloaded to `~/.cache/huggingface/` and cached automatically. diff --git a/src/cli/commands.rs b/src/cli/commands.rs index f128499..2847be8 100644 --- a/src/cli/commands.rs +++ b/src/cli/commands.rs @@ -872,7 +872,9 @@ fn run_models(action: ModelsAction, config: &mut Config) -> Result<()> { config.set_embedding_model(embedding_path.to_string_lossy().to_string())?; } - if !embedding_only { + // Reranker is not yet implemented (requires separate backend) + // Only download if explicitly requested with --reranker-only + if reranker_only { println!(); println!(" {}Downloading reranker model...", ui::DOWNLOAD); println!( @@ -884,6 +886,11 @@ fn run_models(action: ModelsAction, config: &mut Config) -> Result<()> { style("From:").dim() ); println!(); + println!( + " {} Reranker is not yet implemented, downloading for future use", + style("Note:").yellow() + ); + println!(); let pb = ProgressBar::new_spinner(); pb.set_style(ProgressStyle::default_spinner().template("{spinner:.green} {msg}")?); diff --git a/src/config.rs b/src/config.rs index 6e9bddf..03ac77a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -160,7 +160,7 @@ fn default_context_size() -> usize { } fn default_use_reranker() -> bool { - true + false } impl Default for Config {