Bug: [MEVD] SQL server Connector broken in 1.67.0-preview / 1.67.1-preview
Describe the bug
When upgrading Microsoft.SemanticKernel.Connectors.SqlServer from version 1.66.0 to 1.67.0 or higher, code without any other modifications fails to do the following
Embedding<float>? embedding;
embedding = await embeddingGenerator.GenerateAsync(searchQuery, cancellationToken: cancellationToken);
VectorSearchOptions<VectorEntity> vectorSearchOptions = new()
{
IncludeVectors = false
};
vectorSearchOptions.Filter = x => x.SourceCollectionId == "a" && x.SourceKind == "b" && x.SourceId == "c";
List<VectorSearchResult<VectorEntity>> result = [];
await foreach (VectorSearchResult<VectorEntity> searchResult in collection.SearchAsync(embedding, 10, vectorSearchOptions, cancellationToken))
{
result.Add(searchResult);
}
Exception:
Microsoft.Extensions.VectorData.VectorStoreException: 'Call to vector store failed.'
Inner Exception:
SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 3 ("@vector"): Data type 0xF5 is unknown.
The Vector Object
public class VectorEntity
{
[VectorStoreKey]
public required string Id { get; set; }
[VectorStoreData]
public required string Content { get; set; }
[VectorStoreData(IsIndexed = true)]
public required string SourceId { get; set; }
[VectorStoreData(IsIndexed = true)]
public required string SourceKind { get; set; }
[VectorStoreData(IsIndexed = true)]
public required string SourceCollectionId { get; set; }
[VectorStoreData(IsIndexed = true)]
public required string? ContentKind { get; init; }
[VectorStoreData]
public required string? ContentId { get; init; }
[VectorStoreData]
public required string? ContentParent { get; init; }
[VectorStoreData(IsIndexed = true)]
public required string? ContentParentKind { get; init; }
[VectorStoreData]
public required string? ContentName { get; set; }
[VectorStoreData]
public required string? ContentDependencies { get; set; }
[VectorStoreData]
public required string? ContentDescription { get; set; }
[VectorStoreData]
public required string? ContentReferences { get; set; }
[VectorStoreData(IsIndexed = true)]
public required string? ContentNamespace { get; init; }
[VectorStoreData]
public required string SourcePath { get; init; }
[VectorStoreVector(1536)]
public string Vector => Content;
Expected behavior No Exception, just like in version 1.66.0
Screenshots
Platform
- Language: C#
- Source: Microsoft.SemanticKernel.Connectors.SqlServer 1.67.0 / 1.67.1
- AI model: ada02
- IDE: Visual Studio 2026
- OS: Windows
Update: I've just updated to the latest SQL Server 2025 Preview release (17.0.700.9 >> 17.0.925.4), and that seems to resolve the issue 👍 (so guess the new way you define Vector Columns in the code was not supported in the older previews) ... So OK for this to be closed, but FYI