Repository navigation
Add generative DigitalOcean support - #2153
Conversation
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 |
|
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. |
|
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.
There was a problem hiding this comment.
🟡 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.
|
I have read and agree to the Weaviate Contributor License Agreement. |
There was a problem hiding this comment.
🟡 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.rsthas nogenerative-digitaloceanentry. 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
Closes #2149
Summary
This adds Python client support for the new
generative-digitaloceanmodule 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
GenerativeSearches.DIGITALOCEANandConfigure.Generative.digitalocean(...)for collection configuration.GenerativeConfig.digitalocean(...)and gRPC serialization for runtime queries, including URL validation, all supported tuning parameters, stop sequences, and the existing non-multimodal guard.GenerativeDigitalOceanMetadatafor both single-object and grouped generative results.weaviate/weaviatemain at837e1d8a63a19b685e7c241256613d340993781dusingweaviate/proto/v1/regen.sh. As requested, the generated bindings include bothGenerativeDigitalOceanandGenerativeMeta, while the handwritten public Python API changes remain DigitalOcean-only.Validation
python -m pytest test proto_test/test_proto.py: 434 passed, 1 skippedpython -m pytest mock_tests: 56 passedruff check weaviate test mock_tests integration: passedruff format --diff weaviate test mock_tests integration: passedflake8 weaviate test mock_tests integration: passedThe 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.