Skip to content

.Net: [MEVD] Validate that the collection generic key parameter corresponds to the model #11355

Closed

Description

@roji

We currently have validation for the TKey generic type parameter passed to the collection type, and we have validation for the key property type on the model (i.e. on the .NET type and VectorStoreRecordDefinition), but we don't validate that the two actually correspond. That is, somehow could construct e.g. a Qdrant collection with a VectorStoreRecordDefinition with key type Guid, but with a TKey of ulong. We can centralize this validation in the model builder as well, along with the rest.

Noet that Cosmos NoSQL is one partial exception. By default, the provider simply configures the document ID as the partition key; in this scenario the provider behaves just like any other provider (there's only one key). However, if the partition key is (explicitly) configured to be different than the document ID (or possibly multiple properties), then the TKey type parameter is a CosmosNoSqlKey, though the key property in the model is still just the document ID (e.g. a single string). There's already some validation in place for this - make sure everything is correct.

Activity

  1. changed the title [-][MEVD] Validate that the collection generic key parameter corresponds to the model[/-] [+].Net: [MEVD] Validate that the collection generic key parameter corresponds to the model[/+] on Apr 3, 2025
  2. moved this to Backlog: Planned in Semantic Kernelon Jun 17, 2025
  3. moved this from Backlog: Planned to Sprint: In Progress in Semantic Kernelon Feb 25, 2026
  4. added 2 commits that reference this issue on Feb 25, 2026
    3775756
    2c02bb3
  5. added a commit that references this issue on Feb 25, 2026
    16e3d1f
  6. added a commit that references this issue on Feb 26, 2026
    f077655
  7. moved this from Sprint: In Progress to Sprint: Done in Semantic Kernelon Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions