Skip to content

Commit aa86547

Browse files
committed
feat(search): pass pro_user flag through indexer search_v3 method
Enables Cohere reranking for pro users only
1 parent 6989b31 commit aa86547

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

backend/services/indexer_optimized.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,14 +574,18 @@ async def search_v3(
574574
top_k: int = 10,
575575
include_tests: bool = False,
576576
use_reranking: bool = True,
577+
pro_user: bool = False,
577578
) -> List[Dict]:
578579
"""
579580
Search V3 - "Project Brain" search with:
580581
- Voyage AI code-optimized embeddings (if available)
581582
- Query understanding & intent classification
582583
- Code graph importance ranking
583584
- Test file filtering
584-
- Cohere reranking
585+
- Cohere reranking (pro users only)
586+
587+
Args:
588+
pro_user: Enable Cohere reranking (costs money, pro tier only)
585589
"""
586590
from services.search_v3.integration import get_search_v3
587591

@@ -609,7 +613,8 @@ async def search_v3(
609613
file_dependencies=file_dependencies,
610614
include_tests=include_tests,
611615
top_k=top_k,
612-
use_reranking=use_reranking
616+
use_reranking=use_reranking,
617+
pro_user=pro_user
613618
)
614619

615620
elapsed = time.time() - start_time

0 commit comments

Comments
 (0)