MEAI: Update Experimental / Preview Features#7235
Conversation
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the Microsoft.Extensions.AI.OpenAI package by removing its prerelease label and properly annotating experimental APIs. It removes the [Experimental] attribute from the IChatReducer interface while maintaining it on concrete implementations, allowing stable interface adoption. OpenAI-specific experimental APIs (Responses, Assistants, and Real-Time) are annotated with [Experimental] attributes that propagate the OpenAI package's diagnostic IDs (OPENAI001, OPENAI002) to avoid requiring consumers to suppress multiple diagnostics.
Changes:
- Removed
[Experimental]fromIChatReducerinterface in Abstractions library - Changed Microsoft.Extensions.AI.OpenAI package stage from "preview" to "normal" and increased code coverage requirements
- Applied
[Experimental]attributes with OpenAI diagnostic IDs to experimental OpenAI API wrappers - Updated API baseline manifests for both Abstractions and OpenAI libraries
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Shared/DiagnosticIds/DiagnosticIds.cs | Added diagnostic ID constants for reusing OpenAI package experimental diagnostics (OPENAI001, OPENAI002) |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIClientExtensions.cs | Applied experimental attributes to AsIChatClient methods for ResponsesClient and AssistantClient |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/MicrosoftExtensionsAIResponsesExtensions.cs | Applied experimental attribute to entire static class for Responses extensions |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/MicrosoftExtensionsAIRealtimeExtensions.cs | Applied experimental attribute to entire static class for Realtime extensions |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/MicrosoftExtensionsAIAssistantsExtensions.cs | Applied experimental attribute to entire static class for Assistants extensions |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/Microsoft.Extensions.AI.OpenAI.json | New API baseline manifest marking experimental and stable APIs correctly |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/Microsoft.Extensions.AI.OpenAI.csproj | Changed package stage to normal and increased code coverage/mutation thresholds |
| src/Libraries/Microsoft.Extensions.AI.Abstractions/Microsoft.Extensions.AI.Abstractions.json | Updated API baseline showing IChatReducer as stable with reordered/added APIs |
| src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatReduction/IChatReducer.cs | Removed experimental attribute and unused imports from interface |
| // These diagnostic IDs are defined by the OpenAI package for its experimental APIs. | ||
| // We use the same IDs so consumers do not need to suppress additional diagnostics | ||
| // when using the experimental OpenaI APIs. | ||
| internal const string AIOpenAI = "OPENAI001"; |
There was a problem hiding this comment.
Do we still suppress these assembly wide? We should stop doing that, to help ensure use of these types isn't in anything not annotated accordingly.
There was a problem hiding this comment.
There was a problem hiding this comment.
Thanks. Working on it. I'm going to remove the project-wide suppressions for OPENAI001, OPENAI002, and OPENAICUA001.
[Experimental]fromIChatReducerinterface, leaving the attribute on the concrete chat reducer implementations[Experimental]to the MEAI.OpenAI APIs that utilize experimental OpenAI APIs (Responses, Assistants, and Real-Time). Those attribute propagate theOPENAI001andOPENAI002diagnostic Ids rather than requiring consumers to suppress both andOPENAIdiagnostic and anMEAIdiagnostic.As part of changing API experimental annotations, API Chief was run to update the baselines for the MEAI.Abstractions and MEAI.OpenAI libraries. A lot of the differences in the MEAI.Abstractions baseline difference are ordering of the APIs or adding in APIs that were introduced as experimental earlier, getting the baseline up to date with what the tool generates.
Topics for expected discussion:
[Experimental]?OPENAI001andOPENAI002or useMEAI001.Microsoft Reviewers: Open in CodeFlow