Skip to content

[codex] Support Voyage contextual embeddings in pipelines - #572

Draft
williambarberjr wants to merge 5 commits into
feyninc:mainfrom
williambarberjr:codex/voyage-context-embeddings
Draft

[codex] Support Voyage contextual embeddings in pipelines#572
williambarberjr wants to merge 5 commits into
feyninc:mainfrom
williambarberjr:codex/voyage-context-embeddings

Conversation

@williambarberjr

@williambarberjr williambarberjr commented Apr 27, 2026

Copy link
Copy Markdown

Summary

  • add voyage-context-3 support through VoyageAIEmbeddings, backed by Catsu
  • add document-group embedding support to CatsuEmbeddings for contextual models
  • route opted-in pipeline handshakes through write_documents, and make Turbopuffer preserve document boundaries before embedding chunks

Dependency

Test plan

  • mocked Catsu and Voyage contextual embedding paths
  • Turbopuffer document-boundary write path
  • pipeline sync/async document-aware write routing
  • Ruff check and format check on touched files
  • live Voyage smoke: Catsu and Voyage wrappers returned three document vectors and 256-dim query vectors

Notes

@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d829f5ea-5d06-4193-9102-0396da877e64

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request transitions VoyageAI embeddings to the catsu provider and introduces support for contextualized models, specifically voyage-context-3. It adds embed_documents functionality to preserve document boundaries and updates the TurbopufferHandshake and Pipeline to support document-aware writing. Feedback suggests removing a redundant warning for the truncation parameter in VoyageAIEmbeddings and optimizing the hasattr check for contextualized embedding support in CatsuEmbeddings by moving it to the initialization phase.

Comment on lines +95 to +101
if truncation is not True:
warnings.warn(
"The `truncation` parameter is not supported for contextualized "
"Voyage embeddings and will be ignored.",
DeprecationWarning,
stacklevel=2,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This specific warning for contextualized models is redundant. A more general warning for the truncation parameter is already issued at line 112 for all models in this class. Since VoyageAIEmbeddings ignores the truncation parameter for all models (as it is not supported by the underlying CatsuEmbeddings), the general warning is sufficient and covers this case.

Comment on lines +194 to +198
if not hasattr(self.client, "contextualized_embed"):
raise RuntimeError(
"The installed catsu package does not support contextualized embeddings. "
"Install a catsu version with `contextualized_embed` support.",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Performing a hasattr check on every call to _contextualized_embed is inefficient. Since the availability of this method depends on the installed version of the catsu package, it should be checked once during the initialization of the CatsuEmbeddings class when _is_contextualized is true.

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.

1 participant