Skip to content

feat(config): add multi2vec-twelvelabs vectorizer support (#2113) - #2117

Open
Anai-Guo wants to merge 1 commit into
weaviate:mainfrom
Anai-Guo:feat/multi2vec-twelvelabs
Open

feat(config): add multi2vec-twelvelabs vectorizer support (#2113)#2117
Anai-Guo wants to merge 1 commit into
weaviate:mainfrom
Anai-Guo:feat/multi2vec-twelvelabs

Conversation

@Anai-Guo

@Anai-Guo Anai-Guo commented Aug 3, 2026

Copy link
Copy Markdown

Closes #2113.

Adds client-side support for the multi2vec-twelvelabs vectorizer shipping with Weaviate v1.37+.

What's here

  • Vectorizers.MULTI2VEC_TWELVELABS enum member (+ docstring entry)
  • _Multi2VecTwelvelabsConfig in config_vectorizers.pybaseURL / model on top of _Multi2VecBase, with the usual AnyHttpUrl → string coercion in _to_dict()
  • Configure.Vectors.multi2vec_twelvelabs(...) in config_vectors.py
  • A test_config.py case asserting the serialized payload

The settings surface matches the issue (model, default marengo3.0; baseURL) and the server module's class_settings.go, which registers exactly textFields and imageFields as its multimodal fields — so no video/audio field parameters are exposed here.

Serialized payload for multi2vec_twelvelabs(name="t", model="marengo3.0", base_url="https://api.twelvelabs.io/v1.3", image_fields=[Multi2VecField(name="img", weight=0.7)], text_fields=["txt"]):

{
  "vectorizer": {
    "multi2vec-twelvelabs": {
      "imageFields": ["img"],
      "textFields": ["txt"],
      "baseURL": "https://api.twelvelabs.io/v1.3",
      "model": "marengo3.0",
      "weights": {"imageFields": [0.7]}
    }
  },
  "vectorIndexType": "hnsw"
}

Scope notes

Following the precedent of #1977 (multi2vec_google_gemini), this only adds the module to the current Configure.Vectors surface — not to the deprecated Configure.Vectorizer / Configure.NamedVectors surfaces. Happy to add those, an docs/changelog.rst entry, or an integration/test_vectors.py case if you'd like them in this PR.

Verification

Ran the unit suite locally against this branch (Python 3.12, Windows):

  • test/collection/test_config.py: 191 passed on main192 passed with this change (the new case).
  • Full test/: 373 passed / 13 failed on main374 passed / 13 failed with this change — the same 13 pre-existing failures (test_util.py b64 image/file fixtures, test_timeout.py, and two input-validation cases), all unrelated to this change and unaffected by it.
  • With the source left unpatched, the new test case fails as expected: AttributeError: type object '_Vectors' has no attribute 'multi2vec_twelvelabs'.
  • ruff==0.14.7 (repo ruff.toml): format --check reports 3 files already formatted; check passes.
  • flake8==7.3.0 with the pre-commit plugin set (bugbear / comprehensions / builtins / docstrings / pydoclint): clean on both changed source files.

🤖 Generated with Claude Code

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@Anai-Guo

Anai-Guo commented Aug 4, 2026

Copy link
Copy Markdown
Author

I agree with the Weaviate Contributor License Agreement.

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.

Add support for multi2vec-twelvelabs module

2 participants