Skip to content

Commit b24f972

Browse files
committed
fix: update config-manager test to match actual validation behavior
- Fixed failing test that expected invalid modelDimension to be preserved - Implementation correctly converts invalid dimension values to undefined - Added missing geminiOptions field to expected test output
1 parent a65a4ba commit b24f972

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/code-index/__tests__/config-manager.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,14 @@ describe("CodeIndexConfigManager", () => {
231231
isConfigured: true,
232232
embedderProvider: "openai-compatible",
233233
modelId: "custom-model",
234-
modelDimension: "invalid-dimension",
234+
modelDimension: undefined, // Invalid dimension is converted to undefined
235235
openAiOptions: { openAiNativeApiKey: "" },
236236
ollamaOptions: { ollamaBaseUrl: "" },
237237
openAiCompatibleOptions: {
238238
baseUrl: "https://api.example.com/v1",
239239
apiKey: "test-openai-compatible-key",
240240
},
241+
geminiOptions: undefined,
241242
qdrantUrl: "http://qdrant.local",
242243
qdrantApiKey: "test-qdrant-key",
243244
searchMinScore: 0.4,

0 commit comments

Comments
 (0)