Skip to content

feat: add voyage-4 model series and remove unused method#306

Open
BeamNawapat wants to merge 1 commit intozilliztech:masterfrom
BeamNawapat:feat/voyage-4-models
Open

feat: add voyage-4 model series and remove unused method#306
BeamNawapat wants to merge 1 commit intozilliztech:masterfrom
BeamNawapat:feat/voyage-4-models

Conversation

@BeamNawapat
Copy link
Copy Markdown
Contributor

Summary

  • Add voyage-4-large, voyage-4, voyage-4-lite, and voyage-4-nano to the VoyageAI supported models list (released January 2026)
  • Remove unused updateDimensionForModel() which duplicated logic from updateModelSettings()

Changes

  • packages/core/src/embedding/voyageai-embedding.ts — Add 4 voyage-4 models, remove dead method

Test plan

  • pnpm build passes
  • Existing VoyageAI models still work (no regression)

Add voyage-4-large, voyage-4, voyage-4-lite, and voyage-4-nano to the
VoyageAI supported models list (released January 2026).

Remove unused updateDimensionForModel() which duplicated logic from
updateModelSettings().
Copilot AI review requested due to automatic review settings April 21, 2026 03:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the core VoyageAI embedding provider to recognize the newly released Voyage 4 model series and removes a redundant, unused dimension update helper.

Changes:

  • Added voyage-4-large, voyage-4, voyage-4-lite, and voyage-4-nano to VoyageAIEmbedding.getSupportedModels().
  • Removed the unused updateDimensionForModel() method (logic is already covered by updateModelSettings()).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +150 to +153
'voyage-4-nano': {
dimension: '512 (default), 128, 256',
contextLength: 32000,
description: 'Open-weight model, smallest and fastest'
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

voyage-4-nano lists a default dimension of 512, but updateModelSettings() currently hard-codes this.dimension = 1024 whenever modelInfo.dimension is a string. This will report the wrong dimension for voyage-4-nano (and can break downstream vector DB inserts if the embedding length is 512 but metadata says 1024). Consider representing the default dimension as a number (e.g., 512) or parsing the default from the dimension string (e.g., extracting the (... default) value) so per-model defaults are respected.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@zc277584121 zc277584121 left a comment

Choose a reason for hiding this comment

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

Clean split from #305 — exactly what was needed. The voyage-4 model data looks correct, and removing the duplicate updateDimensionForModel is a good cleanup since updateModelSettings already covers the same logic.

LGTM.

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