Skip to content

Use shared DiagnosticIds constants for MEVD experimental APIs#7462

Open
jeffhandley wants to merge 3 commits intodotnet:mainfrom
jeffhandley:jeffhandley/mevd-experimentals
Open

Use shared DiagnosticIds constants for MEVD experimental APIs#7462
jeffhandley wants to merge 3 commits intodotnet:mainfrom
jeffhandley:jeffhandley/mevd-experimentals

Conversation

@jeffhandley
Copy link
Copy Markdown
Member

@jeffhandley jeffhandley commented Apr 10, 2026

Replace hard-coded [Experimental("MEVD9001")] attributes in Microsoft.Extensions.VectorData.Abstractions with constants from the shared DiagnosticIds class, matching the pattern used by MEAI.

This pattern provides the benefit that it's easier for us to inventory and track different experiments that share a diagnostic, ensuring it's clear which APIs are part of which experiments. @roji please validate that you agree with the distinct experiments that were identified here.

  • Add VectorDataCollectionModel, VectorDataPropertyModel, VectorDataFilterTranslation, and VectorDataEmbeddingGeneration experiment constants to src/Shared/DiagnosticIds/DiagnosticIds.cs
  • Add InjectSharedDiagnosticIds to the MEVD.Abstractions csproj
  • Update all 17 [Experimental] usages to reference constants with UrlFormat
  • Add MEVD9001 suppression to Directory.Build.targets
  • Add MEVD9001 to docs/list-of-diagnostics.md
Microsoft Reviewers: Open in CodeFlow

Replace hard-coded [Experimental("MEVD9001")] attributes in
Microsoft.Extensions.VectorData.Abstractions with constants from
the shared DiagnosticIds class, matching the pattern used by MEAI.

- Add VectorDataCollectionModel, VectorDataPropertyModel,
  VectorDataFilterTranslation, and VectorDataEmbeddingGeneration
  experiment constants to src/Shared/DiagnosticIds/DiagnosticIds.cs
- Add InjectSharedDiagnosticIds to the MEVD.Abstractions csproj
- Update all 17 [Experimental] usages to reference constants with
  UrlFormat
- Add MEVD9001 suppression to Directory.Build.targets
- Add MEVD9001 to docs/list-of-diagnostics.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeffhandley jeffhandley requested a review from roji April 10, 2026 05:00
@jeffhandley jeffhandley self-assigned this Apr 10, 2026
@jeffhandley jeffhandley requested review from a team as code owners April 10, 2026 05:00
Copilot AI review requested due to automatic review settings April 10, 2026 05:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes how experimental diagnostics are declared in Microsoft.Extensions.VectorData.Abstractions by replacing hard-coded "MEVD9001" strings with shared DiagnosticIds experiment constants (including UrlFormat), aligning with the pattern already used by Microsoft.Extensions.AI.

Changes:

  • Added Vector Data experiment constants to the shared Microsoft.Shared.DiagnosticIds.DiagnosticIds.Experiments list (all mapping to MEVD9001).
  • Enabled shared DiagnosticIds injection for Microsoft.Extensions.VectorData.Abstractions and updated all [Experimental] usages to reference the new constants with UrlFormat.
  • Documented/suppressed the new MEVD9001 experimental diagnostic in repo-wide build configuration and docs.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Shared/DiagnosticIds/DiagnosticIds.cs Adds Vector Data experiment constants backed by MEVD9001 in the shared DiagnosticIds catalog.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/RecordDefinition/VectorStoreVectorProperty{TInput}.cs Replaces hard-coded Experimental ID with DiagnosticIds.Experiments.VectorDataPropertyModel + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/RecordDefinition/VectorStoreVectorProperty.cs Replaces hard-coded Experimental ID with shared Vector Data experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/VectorPropertyModel{TInput}.cs Uses shared Vector Data experiment constant for Experimental attribute + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/VectorPropertyModel.cs Uses shared Vector Data experiment constant for Experimental attribute + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/VectorDataStrings.cs Uses shared Vector Data experiment constant for Experimental attribute + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/PropertyModel.cs Uses shared Vector Data experiment constant for Experimental attribute + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/KeyPropertyModel.cs Uses shared Vector Data experiment constant for Experimental attribute + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/Filter/QueryParameterExpression.cs Uses shared Vector Data filter translation experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/Filter/FilterTranslatorBase.cs Uses shared Vector Data filter translation experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/Filter/FilterPreprocessingOptions.cs Uses shared Vector Data filter translation experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/EmbeddingGenerationDispatcher{TEmbedding}.cs Uses shared Vector Data embedding generation experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/EmbeddingGenerationDispatcher.cs Uses shared Vector Data embedding generation experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/DataPropertyModel.cs Uses shared Vector Data property model experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/CollectionModelBuildingOptions.cs Uses shared Vector Data collection model experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/CollectionModelBuilder.cs Uses shared Vector Data collection model experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/CollectionModel.cs Uses shared Vector Data collection model experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/ProviderServices/CollectionJsonModelBuilder.cs Uses shared Vector Data collection model experiment constant + UrlFormat.
src/Libraries/Microsoft.Extensions.VectorData.Abstractions/Microsoft.Extensions.VectorData.Abstractions.csproj Enables <InjectSharedDiagnosticIds> so the project can reference shared DiagnosticIds.
docs/list-of-diagnostics.md Documents MEVD9001 as “Vector Data experiments”.
Directory.Build.targets Suppresses MEVD9001 warnings when building this repo (consistent with other experimental-warning suppressions).

Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @jeffhandley.

So MEVD9001 is meant to be a single diagnostic signifying "this is a provider-facing API", which means that (a) end users are never supposed to call these APIs (and this helps make that clear if they accidentally do), and (b) providers who do use these APIs are aware that it doesn't have strict breaking change guarantees and may change.

This PR seems to add sub-categories into this "provider-facing API" sub-category - I'm not sure that's useful... Pretty much every provider will always use all four of these API categories (collection model, property model, filter translation, embedding generation), so I think it makes sense to keep them as a single, simple "provider-facing API" category.

Of course it still makes sense to me to use the shared diagnostics!

jeffhandley and others added 2 commits April 9, 2026 23:06
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ervices

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeffhandley
Copy link
Copy Markdown
Member Author

Perfect; thanks, @roji. I wasn't sure if they were distinct areas for the providers to potentially implement or not. I collapsed them all into one.

Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants