Skip to content

Commit 3d9edf6

Browse files
pmbrullclaude
andcommitted
feat(schema): remove embedding fields from naturalLanguageSearch (moved to llmConfiguration.embeddings)
Remove dead embeddingProvider, maxConcurrentRequests, bedrock, openai, google, djl properties from naturalLanguageSearch in elasticSearchConfiguration.json — these moved to llmConfiguration.embeddings in prior commits and OSS code no longer reads them from the old location. Regenerate NaturalLanguageSearchConfiguration POJO, drop the no-longer-generated Bedrock/Djl/Openai/Google inner classes, and remove two leftover test references (stale mock setup in SystemRepositoryEmbeddingsValidationTest, dead withEmbeddingProvider() call in SearchRepositoryBehaviorTest). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c13b352 commit 3d9edf6

3 files changed

Lines changed: 1 addition & 110 deletions

File tree

openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/SystemRepositoryEmbeddingsValidationTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.junit.jupiter.api.BeforeEach;
1313
import org.junit.jupiter.api.Test;
1414
import org.mockito.MockedStatic;
15-
import org.openmetadata.schema.service.configuration.elasticsearch.Bedrock;
1615
import org.openmetadata.schema.service.configuration.elasticsearch.ElasticSearchConfiguration;
1716
import org.openmetadata.schema.service.configuration.elasticsearch.NaturalLanguageSearchConfiguration;
1817
import org.openmetadata.schema.system.StepValidation;
@@ -53,9 +52,6 @@ void setup() {
5352
NaturalLanguageSearchConfiguration nlpConfig = mock(NaturalLanguageSearchConfiguration.class);
5453
when(appConfig.getElasticSearchConfiguration()).thenReturn(esConfig);
5554
when(esConfig.getNaturalLanguageSearch()).thenReturn(nlpConfig);
56-
when(nlpConfig.getEmbeddingProvider()).thenReturn("bedrock");
57-
Bedrock bedrockConfig = mock(Bedrock.class);
58-
when(nlpConfig.getBedrock()).thenReturn(bedrockConfig);
5955

6056
when(searchRepository.getSearchType())
6157
.thenReturn(ElasticSearchConfiguration.SearchType.OPENSEARCH);

openmetadata-service/src/test/java/org/openmetadata/service/search/SearchRepositoryBehaviorTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,8 +2543,7 @@ void initializeVectorSearchServiceSkipsWhenEmbeddingsAreDisabled() {
25432543

25442544
@Test
25452545
void initializeVectorSearchServiceInitializesOpenSearchVectorSupport() throws Exception {
2546-
NaturalLanguageSearchConfiguration nlConfig =
2547-
new NaturalLanguageSearchConfiguration().withEmbeddingProvider("openai");
2546+
NaturalLanguageSearchConfiguration nlConfig = new NaturalLanguageSearchConfiguration();
25482547
SearchRepository openSearchRepository =
25492548
newRepository(
25502549
Map.of(Entity.TABLE, TABLE_MAPPING),

openmetadata-spec/src/main/resources/json/schema/configuration/elasticSearchConfiguration.json

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -148,89 +148,11 @@
148148
"type": "number",
149149
"default": 0.6
150150
},
151-
"embeddingProvider": {
152-
"description": "The provider to use for generating vector embeddings (e.g., bedrock, openai, google, djl).",
153-
"type": "string",
154-
"default": "bedrock"
155-
},
156-
"maxConcurrentRequests": {
157-
"description": "Maximum number of concurrent embedding and NLQ provider requests. Controls the semaphore used to throttle calls to the providers and prevent overwhelming HTTP/2 connection limits.",
158-
"type": "integer",
159-
"default": 10,
160-
"minimum": 1
161-
},
162151
"providerClass": {
163152
"description": "Fully qualified class name of the NLQService implementation to use",
164153
"type": "string",
165154
"default": "org.openmetadata.service.search.nlq.NoOpNLQService"
166155
},
167-
"bedrock": {
168-
"description": "AWS Bedrock configuration for natural language processing",
169-
"type": "object",
170-
"properties": {
171-
"awsConfig": {
172-
"description": "AWS credentials configuration for Bedrock service",
173-
"$ref": "../security/credentials/awsBaseConfig.json"
174-
},
175-
"embeddingModelId": {
176-
"description": "Bedrock embedding model identifier to use for vector search",
177-
"type": "string",
178-
"default": "amazon.titan-embed-text-v2:0"
179-
},
180-
"embeddingDimension": {
181-
"description": "Dimension of the embedding vector",
182-
"type": "integer",
183-
"default": 512
184-
}
185-
},
186-
"additionalProperties": false
187-
},
188-
"djl": {
189-
"description": "Embedding generation using Deep Java Library (DJL)",
190-
"type": "object",
191-
"properties": {
192-
"embeddingModel": {
193-
"description": "DJL model name for embedding generation",
194-
"type": "string"
195-
}
196-
},
197-
"additionalProperties": false
198-
},
199-
"openai": {
200-
"description": "OpenAI configuration for embedding generation. Supports both OpenAI and Azure OpenAI endpoints.",
201-
"type": "object",
202-
"javaType": "org.openmetadata.schema.service.configuration.elasticsearch.Openai",
203-
"properties": {
204-
"apiKey": {
205-
"description": "API key for authenticating with OpenAI or Azure OpenAI.",
206-
"type": "string"
207-
},
208-
"embeddingModelId": {
209-
"description": "OpenAI embedding model identifier (e.g., text-embedding-3-small, text-embedding-ada-002).",
210-
"type": "string",
211-
"default": "text-embedding-3-small"
212-
},
213-
"embeddingDimension": {
214-
"description": "Dimension of the embedding vector. Default is 1536 for text-embedding-3-small.",
215-
"type": "integer",
216-
"default": 1536
217-
},
218-
"endpoint": {
219-
"description": "Custom endpoint URL. For Azure OpenAI, use the Azure resource endpoint (e.g., https://your-resource.openai.azure.com). Leave empty for standard OpenAI API.",
220-
"type": "string"
221-
},
222-
"deploymentName": {
223-
"description": "Azure OpenAI deployment name. Required when using Azure OpenAI.",
224-
"type": "string"
225-
},
226-
"apiVersion": {
227-
"description": "Azure OpenAI API version. Only used with Azure OpenAI.",
228-
"type": "string",
229-
"default": "2024-02-01"
230-
}
231-
},
232-
"additionalProperties": false
233-
},
234156
"filterExtractor": {
235157
"description": "NLQ filter extractor cache and prompt tuning.",
236158
"type": "object",
@@ -317,32 +239,6 @@
317239
}
318240
},
319241
"additionalProperties": false
320-
},
321-
"google": {
322-
"description": "Google Gemini configuration for embedding generation via the Generative Language API.",
323-
"type": "object",
324-
"javaType": "org.openmetadata.schema.service.configuration.elasticsearch.Google",
325-
"properties": {
326-
"apiKey": {
327-
"description": "API key from Google AI Studio for authenticating with the Generative Language API.",
328-
"type": "string"
329-
},
330-
"embeddingModelId": {
331-
"description": "Gemini embedding model identifier (e.g., gemini-embedding-001, text-embedding-004).",
332-
"type": "string",
333-
"default": "gemini-embedding-001"
334-
},
335-
"embeddingDimension": {
336-
"description": "Dimension of the embedding vector, sent to Google as `outputDimensionality`. For `gemini-embedding-001` valid values are 768, 1536, or 3072. For `text-embedding-004` use 768.",
337-
"type": "integer",
338-
"default": 768
339-
},
340-
"endpoint": {
341-
"description": "Optional override for the full embedding endpoint URL. Must be the complete URL including the model and `:embedContent` action (e.g. `https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:embedContent`), not just a base URL. Leave empty to use the default Generative Language API endpoint, which is constructed from `embeddingModelId`. The `key` query parameter is appended automatically.",
342-
"type": "string"
343-
}
344-
},
345-
"additionalProperties": false
346242
}
347243
},
348244
"additionalProperties": false

0 commit comments

Comments
 (0)