Skip to content

Add generative DigitalOcean support - #2153

Merged
g-despot merged 3 commits into
weaviate:mainfrom
denis-samatov:feature/generative-digitalocean
Sep 7, 2026
Merged

g-despot merged 3 commits into
weaviate:mainfrom
denis-samatov:feature/generative-digitalocean

Conversation

@denis-samatov

Copy link
Copy Markdown
Contributor

Closes #2149

Summary

This adds Python client support for the new generative-digitalocean module in Weaviate 1.37+.

Before this change, users could not configure DigitalOcean as a collection generative provider or select it for runtime generative queries through the typed Python API. The client also did not expose DigitalOcean usage metadata returned by the server.

Implementation

  • Add GenerativeSearches.DIGITALOCEAN and Configure.Generative.digitalocean(...) for collection configuration.
  • Add GenerativeConfig.digitalocean(...) and gRPC serialization for runtime queries, including URL validation, all supported tuning parameters, stop sequences, and the existing non-multimodal guard.
  • Preserve GenerativeDigitalOceanMetadata for both single-object and grouped generative results.
  • Regenerate all supported protobuf bindings from weaviate/weaviate main at 837e1d8a63a19b685e7c241256613d340993781d using weaviate/proto/v1/regen.sh. As requested, the generated bindings include both GenerativeDigitalOcean and GenerativeMeta, while the handwritten public Python API changes remain DigitalOcean-only.
  • Add focused configuration, runtime serialization, response metadata, descriptor, validation, and changelog coverage.

Validation

  • python -m pytest test proto_test/test_proto.py: 434 passed, 1 skipped
  • python -m pytest mock_tests: 56 passed
  • ruff check weaviate test mock_tests integration: passed
  • ruff format --diff weaviate test mock_tests integration: passed
  • flake8 weaviate test mock_tests integration: passed
  • Feature-focused Pyright: 0 errors, 0 warnings
  • Protobuf compatibility checks passed with protobuf/grpcio 4.25.8/1.59.5, 5.26.1/1.63.0, and 6.30.0/1.72.1

The repository-wide Pyright hook still reports 38 existing diagnostics in unchanged weaviate/connect/v4.py; this change introduces no new Pyright diagnostics in the affected implementation paths.

Live DigitalOcean API and Docker integration tests were not run because they require external provider/server credentials and infrastructure.

@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

@denis-samatov denis-samatov changed the title [codex] Add generative DigitalOcean support Add generative DigitalOcean support Sep 2, 2026
@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?

@g-despot

g-despot commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

The changes look great @denis-samatov! Please just agree to the CLA in a comment, and I can proceed with merging 😄

Match the shape of the generative-deepseek change: one row in the provider
table and two rows in the generative config table. Drop the changelog entry,
which is written at release time, and the proto_test additions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The claimed changelog entry for the new public provider is missing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds typed DigitalOcean generative support for Weaviate 1.37+, including configuration, runtime serialization, and usage metadata.

Changes:

  • Adds collection and runtime DigitalOcean provider APIs.
  • Regenerates protobuf bindings across supported versions.
  • Adds serialization, configuration, and metadata tests.
File summaries
File Description
weaviate/proto/v1/v6300/v1/generative_pb2.pyi Updates protobuf type stubs.
weaviate/proto/v1/v6300/v1/generative_pb2.py Updates 6.30 protobuf bindings.
weaviate/proto/v1/v5261/v1/generative_pb2.pyi Updates protobuf type stubs.
weaviate/proto/v1/v5261/v1/generative_pb2.py Updates 5.26 protobuf bindings.
weaviate/proto/v1/v4216/v1/generative_pb2.pyi Updates protobuf type stubs.
weaviate/proto/v1/v4216/v1/generative_pb2.py Updates 4.21 protobuf bindings.
weaviate/collections/queries/base_executor.py Extracts DigitalOcean metadata.
weaviate/collections/classes/internal.py Adds metadata return typing.
weaviate/collections/classes/generative.py Adds runtime configuration and serialization.
weaviate/collections/classes/config.py Adds collection configuration and provider enum.
test/collection/test_generative_metadata.py Tests metadata preservation.
test/collection/test_config.py Tests collection configuration.
test/collection/test_classes_generative.py Tests runtime gRPC serialization.
Review details

Files not reviewed (3)

  • weaviate/proto/v1/v4216/v1/generative_pb2.py: Generated file
  • weaviate/proto/v1/v5261/v1/generative_pb2.py: Generated file
  • weaviate/proto/v1/v6300/v1/generative_pb2.py: Generated file
  • Files reviewed: 10/13 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread weaviate/collections/classes/config.py Resolved
@denis-samatov

Copy link
Copy Markdown
Contributor Author

I have read and agree to the Weaviate Contributor License Agreement.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Validation coverage and the promised changelog entry are missing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Files not reviewed (3)

  • weaviate/proto/v1/v4216/v1/generative_pb2.py: Generated file
  • weaviate/proto/v1/v5261/v1/generative_pb2.py: Generated file
  • weaviate/proto/v1/v6300/v1/generative_pb2.py: Generated file

Suppressed comments (1)

weaviate/collections/classes/config.py:234

  • The PR description says changelog coverage is included, but the current release section in docs/changelog.rst has no generative-digitalocean entry. Add a release-note entry so the documented changes match the public API introduced here.
    DIGITALOCEAN = "generative-digitalocean"
  • Files reviewed: 10/13 changed files
  • Comments generated: 1
  • Review effort level: Balanced

@g-despot
g-despot merged commit 72a1973 into weaviate:main Sep 7, 2026
127 checks passed
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 new generative-digitalocean module

4 participants