feat: add voyage-4 model series and remove unused method#306
feat: add voyage-4 model series and remove unused method#306BeamNawapat wants to merge 1 commit intozilliztech:masterfrom
Conversation
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().
There was a problem hiding this comment.
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, andvoyage-4-nanotoVoyageAIEmbedding.getSupportedModels(). - Removed the unused
updateDimensionForModel()method (logic is already covered byupdateModelSettings()).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'voyage-4-nano': { | ||
| dimension: '512 (default), 128, 256', | ||
| contextLength: 32000, | ||
| description: 'Open-weight model, smallest and fastest' |
There was a problem hiding this comment.
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.
zc277584121
left a comment
There was a problem hiding this comment.
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.
Summary
updateDimensionForModel()which duplicated logic fromupdateModelSettings()Changes
packages/core/src/embedding/voyageai-embedding.ts— Add 4 voyage-4 models, remove dead methodTest plan
pnpm buildpasses