Skip to content

Commit dbaaca2

Browse files
rudrankriyamclaude
andcommitted
Fix dimension mismatch test for potion-base-4M model
The test was using dimension 128 which may match or exceed the 4M model's dimension (256). Changed to 64 to ensure the dimension mismatch is detected. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a13f66b commit dbaaca2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Tests/VecturaKitTests/VecturaKitTests.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@ struct VecturaKitTests {
217217
guard #available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *) else {
218218
return
219219
}
220-
// Use config with dimension 128, even though embedder has different dimension
220+
// Use config with dimension 64, even though embedder has different dimension
221+
// (potion-base-4M has 256 dimensions)
221222
let (configWithDim, cleanup) = try makeVecturaConfig(
222223
name: "custom-dim-db-\(UUID().uuidString)",
223-
dimension: 128
224+
dimension: 64
224225
)
225226
defer { cleanup() }
226227
let vectura = try await VecturaKit(config: configWithDim, embedder: makeEmbedder())
@@ -233,8 +234,8 @@ struct VecturaKitTests {
233234
} catch let error as VecturaError {
234235
switch error {
235236
case .dimensionMismatch(let expected, let got):
236-
#expect(expected == 128) // config dimension
237-
#expect(got > 128) // embedder's actual dimension
237+
#expect(expected == 64) // config dimension
238+
#expect(got != 64) // embedder's actual dimension differs
238239
default:
239240
Issue.record("Wrong error type: \(error)")
240241
}

0 commit comments

Comments
 (0)