Add text2vec-digitalocean vectorizer module#431
Open
mpartipilo wants to merge 2 commits into
Open
Conversation
Adds support for the new text2vec-digitalocean vectorizer. The module shape mirrors text2vec-mistral exactly (model + baseURL + vectorizeClassName), so the existing serialization path is reused unchanged. Closes #430 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
The server requires `model` (e.g. `qwen3-embedding-0.6b`); the client should require it too rather than silently sending a payload the server will reject. - `Text2VecDigitalOceanConfig.model` is now `string` (was `string?`). - Both factory entries — the implementation in `legacyVectors` and the wrapper in the current `vectors` namespace — now require `opts` (was `opts?`). TypeScript will now flag missing `model` at the call site. - Defaults test renamed to "with only the required model" and updated to pass `model`; the original "with defaults" assertion (that `config` is undefined when nothing is provided) is no longer reachable now that `model` is mandatory. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text2vec-digitaloceanvectorizer moduletext2vec-mistral(shared shape:model+baseURL+vectorizeClassName)modelis required on the factory — the server requires it, so the client surface enforces it at compile timeAPI surface added
Text2VecDigitalOceanConfig— runtime config type withmodel: string(required) and optionalbaseURL/vectorizeCollectionName(src/collections/config/types/vectorizer.ts)Text2VecDigitalOceanConfigCreate— create-time alias (src/collections/configure/types/vectorizer.ts)configure.vectors.text2VecDigitalOcean(opts)— factory,optsrequired (calling without it is a TS error sincemodelmust be supplied)optsshape'text2vec-digitalocean'added to theVectorizerunion and bothVectorizerConfigType/VectorizerConfigCreateTypeconditional mapsTest plan
src/collections/configure/unit.test.ts:should create the correct Text2VecDigitalOceanConfig type with only the required model— minimum-required-input caseshould create the correct Text2VecDigitalOceanConfig type with all values— full-payload case assertingtext2vec-digitaloceankey withbaseURL+modelvitest run --project unit src/collections/configure/unit.test.ts)tsc --noEmitclean across the entire project — no new type errorsReview-feedback changes
Second commit (
c2fbd92) tightensmodelfrom optional to required, matching the Python sibling PR (weaviate/weaviate-python-client#2041) and the server contract.Closes #430
Sibling PR (Python): weaviate/weaviate-python-client#2041
🤖 Generated with Claude Code