Skip to content

Add VoyageRerankerClient for cross-encoder reranking#1194

Open
payk24 wants to merge 2 commits intogetzep:mainfrom
qoxi-cloud:feature/voyage-reranker-client
Open

Add VoyageRerankerClient for cross-encoder reranking#1194
payk24 wants to merge 2 commits intogetzep:mainfrom
qoxi-cloud:feature/voyage-reranker-client

Conversation

@payk24
Copy link
Copy Markdown

@payk24 payk24 commented Feb 3, 2026

Summary

  • Add VoyageRerankerClient using Voyage AI rerank API for cross-encoder reranking
  • Add VoyageRerankerConfig for configuration (model, top_k, truncation)
  • Add VoyageRateLimitError for rate limit handling with retry-after support
  • Add lazy imports in cross_encoder/__init__.py to avoid import errors when voyageai is not installed
  • Add RerankerFactory and RerankerConfig for MCP server to support configurable reranker backends
  • Update Graphiti to support cross_encoder=None (disables reranking)
  • Add comprehensive tests following project patterns

Test plan

  • Unit tests for VoyageRerankerClient
  • Tests for error handling (rate limits, API errors)
  • Tests for configuration validation
  • Manual testing with Voyage AI API

- Add VoyageRerankerClient using Voyage AI rerank API
- Add VoyageRerankerConfig for configuration (model, top_k, truncation)
- Add VoyageRateLimitError for rate limit handling
- Add lazy imports in cross_encoder/__init__.py
- Add RerankerFactory and RerankerConfig for MCP server
- Update Graphiti to support cross_encoder=None (disables reranking)
- Add comprehensive tests following project patterns
@danielchalef
Copy link
Copy Markdown
Member

danielchalef commented Feb 3, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@payk24
Copy link
Copy Markdown
Author

payk24 commented Feb 3, 2026

I have read the CLA Document and I hereby sign the CLA

Copy link
Copy Markdown
Collaborator

@prasmussen15 prasmussen15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you address the linter errors?

- Add TYPE_CHECKING imports in __init__.py for VoyageReranker exports
- Use TYPE_CHECKING pattern in voyage_reranker_client.py to match voyage.py
- Replace sentinel pattern with use_default_cross_encoder bool param in Graphiti
- Update search functions to accept CrossEncoderClient | None
- Add null checks before cross_encoder.rank() calls with SearchRerankerError
- Add noqa comment for optional VoyageRerankerClient import in factories.py
@payk24
Copy link
Copy Markdown
Author

payk24 commented Feb 3, 2026

Can you address the linter errors?

Done

@payk24 payk24 requested a review from prasmussen15 February 3, 2026 21:08
lehcode pushed a commit to lehcode/reactive-graphiti that referenced this pull request Feb 8, 2026
maskshell pushed a commit to maskshell/graphiti that referenced this pull request Feb 9, 2026
maskshell pushed a commit to maskshell/graphiti that referenced this pull request Feb 9, 2026
maskshell pushed a commit to maskshell/graphiti that referenced this pull request Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants