feat: add endpoint setting for text2vec-openai/morph and location for generative-google#359
Open
g-despot wants to merge 2 commits into
Open
feat: add endpoint setting for text2vec-openai/morph and location for generative-google#359g-despot wants to merge 2 commits into
g-despot wants to merge 2 commits into
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 |
Summary - Weaviate C# Client CoverageSummary
CoverageWeaviate.Client - 49.6%
Weaviate.Client.Analyzers - 0%
Weaviate.Client.VectorData - 50.3%
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client-side support for new/optional module configuration fields so users can configure non-default service routing for embeddings (REST) and Vertex AI location (REST + gRPC generative provider).
Changes:
- Add optional
endpointtotext2vec-openaiandtext2vec-morphvectorizer configs + factory methods. - Add optional
locationtogenerative-google(collection module config + query-timeProviders.GoogleVertex) and wire through gRPC. - Vendor proto update for
GenerativeGoogle.locationand add unit tests + PublicAPI updates.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Weaviate.Client/PublicAPI.Unshipped.txt | Tracks public API signature additions for new optional parameters/properties. |
| src/Weaviate.Client/Models/Vectorizer.cs | Adds Endpoint property to Morph/OpenAI vectorizer model configs. |
| src/Weaviate.Client/Models/GenerativeConfig.cs | Adds Location to collection-level Google Vertex generative config. |
| src/Weaviate.Client/Models/Generative/Providers.cs | Adds Location to query-time Google Vertex provider model. |
| src/Weaviate.Client/gRPC/Search.Builders.cs | Wires provider Location into gRPC request building. |
| src/Weaviate.Client/gRPC/proto/v1/generative.proto | Adds optional string location = 15 to GenerativeGoogle. |
| src/Weaviate.Client/Configure/VectorizerFactory.cs | Extends Morph/OpenAI factory methods to accept endpoint. |
| src/Weaviate.Client/Configure/GenerativeConfig.cs | Extends GoogleVertex generative config factory to accept location. |
| src/Weaviate.Client.Tests/Unit/TestVectorizers.cs | Adds serialization tests for endpoint set/unset behavior. |
| src/Weaviate.Client.Tests/Unit/TestGenerativeShortcuts.cs | Adds gRPC request mapping tests for provider Location. |
| src/Weaviate.Client.Tests/Unit/TestCollection.cs | Adds REST roundtrip/serialization tests for generative GoogleVertex location. |
Comment on lines
371
to
+375
| ApiEndpoint = a.ApiEndpoint ?? string.Empty, | ||
| ProjectId = a.ProjectId ?? string.Empty, | ||
| EndpointId = a.EndpointId ?? string.Empty, | ||
| Region = a.Region ?? string.Empty, | ||
| Location = a.Location ?? string.Empty, |
Comment on lines
+401
to
+403
| // Location (Vertex AI region) is not applicable to the Gemini | ||
| // (generative-language) API; left empty like Region above. | ||
| Location = string.Empty, |
Comment on lines
+118
to
+121
| Assert.NotNull(providerQuery.Google); | ||
| Assert.Equal("gemini-1.5-pro", providerQuery.Google.Model); | ||
| Assert.Equal("us-east4", providerQuery.Google.Location); | ||
| } |
Comment on lines
+146
to
+149
| var providerQuery = capturedRequest!.Generative!.Single!.Queries[0]; | ||
| Assert.NotNull(providerQuery.Google); | ||
| Assert.Equal(string.Empty, providerQuery.Google.Location); | ||
| } |
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.
endpointto text2vec-openai and text2vec-morph module configs, serialized asendpointand omitted when unset (server default/v1/embeddings). Closes Add support forendpointsetting intext2vec-openaiandtext2vec-morphmodules #350. Matches the open Python implementation (weaviate-python-client#2090).locationto generative-google on both surfaces: collectionmoduleConfig(GoogleVertex) and the query-time generative provider (Providers.GoogleVertex), serialized aslocation(server defaultus-central1). Closes Add support forlocationsetting ingenerative-googlemodule #351. Python's twin (weaviate-python-client#2073) is still open, so key names were taken from core (class_settings.go) and the proto.generative.proto: addsoptional string location = 15toGenerativeGoogle, verbatim from the server v1.38.4 tag (the field was missing from the vendored proto).