Add text2vec-digitalocean vectorizer module#2041
Merged
Merged
Conversation
Adds `text2vec-digitalocean` to the `Vectorizers` enum and exposes factory methods on `Configure.Vectorizer`, `Configure.NamedVectors`, and `Configure.Vectors`. The module accepts an optional `base_url` (server default `https://inference.do-ai.run`) and a `model` (required by the server, e.g. `qwen3-embedding-0.6b`). The shape mirrors `text2vec-mistral` exactly (model + baseURL + vectorizeClassName), so serialization, URL normalization, and the existing _to_dict baseURL-stripping path are reused unchanged. Closes #2038 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 |
This was referenced May 18, 2026
dirkkul
reviewed
May 18, 2026
…nd make model required
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2041 +/- ##
==========================================
- Coverage 87.95% 86.72% -1.23%
==========================================
Files 280 299 +19
Lines 21664 22928 +1264
==========================================
+ Hits 19054 19884 +830
- Misses 2610 3044 +434 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dirkkul
approved these changes
May 18, 2026
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
Adds support for the new
text2vec-digitaloceanvectorizer module exposed by Weaviate server. The shape mirrorstext2vec-mistral(model+baseURL+vectorizeClassName), so the existing serialization path and Pydantic URL normalization are reused unchanged.Following review, only the supported
Configure.VectorsAPI surface is extended (matching the precedent set bytext2vec-morphand other recent additions).Configure.VectorizerandConfigure.NamedVectorsare not touched — they're the deprecated paths.API surface added
Vectorizers.TEXT2VEC_DIGITALOCEANenum entry_Text2VecDigitalOceanConfigPydantic config classConfigure.Vectors.text2vec_digitalocean(name=..., model=..., ...)— the only factory entry pointParameters
modelmodelbase_urlbaseURLhttps://inference.do-ai.runvectorize_collection_namevectorizeClassNameTrueTest plan
test/collection/test_config.py(inTEST_CONFIG_WITH_VECTORS_PARAMETERS) asserting wire-format serialization, including the trailing-slash URL normalization PydanticAnyHttpUrlappliespytest test/collection/test_config.py— 185 passruff check+ruff format --checkclean on all 4 changed filesmodel=raisesTypeErrorfrom PydanticReview-feedback changes
Second commit (
22aa8fce) addresses @dirkkul's review:modelrequired on the Pydantic class and on the factory parameterConfigure.Vectorizer.text2vec_digitaloceanfactory (deprecated API surface; not extended for new modules)Configure.NamedVectors.text2vec_digitaloceanfactory (same reason)_Text2VecDigitalOceanConfigimport fromconfig_named_vectors.pyVectorstest to pass the requiredmodelCloses #2038
Sibling PRs (same feature, fanned out across SDKs):
🤖 Generated with Claude Code