Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

This PR inventories all APIs marked as [Experimental("MEAI001")] and groups them by feature, assigning each group a specific diagnostic ID. The diagnostic IDs are defined in the shared DiagnosticIds.cs file, and all experimental API attributes have been updated to reference these constants.

Changes Made

MEAI Experimental Attributes

  • Updated all MEAI experimental attributes to use feature-specific diagnostic IDs
  • Format: [Experimental(DiagnosticIds.Experiments.*, UrlFormat = DiagnosticIds.UrlFormat)]

Project Files

  • Removed obsolete MEAI001 suppression from all project files (replaced with granular MEAI0001-MEAI0008)

Documentation

  • Added MEAI0001-MEAI0008 entries to docs/list-of-diagnostics.md

Diagnostic ID Assignments

MEAI0001 - Image Generation

  • Microsoft.Extensions.AI.IImageGenerator
  • Microsoft.Extensions.AI.DelegatingImageGenerator
  • Microsoft.Extensions.AI.ImageGenerationOptions
  • Microsoft.Extensions.AI.ImageGenerationResponseFormat
  • Microsoft.Extensions.AI.ImageGenerationRequest
  • Microsoft.Extensions.AI.ImageGenerationResponse
  • Microsoft.Extensions.AI.ImageGeneratorExtensions
  • Microsoft.Extensions.AI.ImageGeneratorMetadata
  • Microsoft.Extensions.AI.ImageGenerationToolCallContent
  • Microsoft.Extensions.AI.ImageGenerationToolResultContent
  • Microsoft.Extensions.AI.HostedImageGenerationTool
  • Microsoft.Extensions.AI.ImageGeneratingChatClient
  • Microsoft.Extensions.AI.ImageGeneratingChatClientBuilderExtensions
  • Microsoft.Extensions.AI.OpenTelemetryImageGenerator
  • Microsoft.Extensions.AI.OpenTelemetryImageGeneratorBuilderExtensions
  • Microsoft.Extensions.AI.ConfigureOptionsImageGenerator
  • Microsoft.Extensions.AI.ConfigureOptionsImageGeneratorBuilderExtensions
  • Microsoft.Extensions.AI.ImageGeneratorBuilder
  • Microsoft.Extensions.AI.ImageGeneratorBuilderImageGeneratorExtensions
  • Microsoft.Extensions.AI.LoggingImageGenerator
  • Microsoft.Extensions.AI.LoggingImageGeneratorBuilderExtensions
  • Microsoft.Extensions.DependencyInjection.ImageGeneratorBuilderServiceCollectionExtensions
  • Microsoft.Extensions.AI.OpenAIClientExtensions.AsIImageGenerator (extension method)

MEAI0002 - Speech to Text

  • Microsoft.Extensions.AI.ISpeechToTextClient
  • Microsoft.Extensions.AI.DelegatingSpeechToTextClient
  • Microsoft.Extensions.AI.SpeechToTextOptions
  • Microsoft.Extensions.AI.SpeechToTextResponse
  • Microsoft.Extensions.AI.SpeechToTextResponseUpdate
  • Microsoft.Extensions.AI.SpeechToTextResponseUpdateKind
  • Microsoft.Extensions.AI.SpeechToTextResponseUpdateExtensions
  • Microsoft.Extensions.AI.SpeechToTextClientExtensions
  • Microsoft.Extensions.AI.SpeechToTextClientMetadata
  • Microsoft.Extensions.AI.OpenAISpeechToTextClient
  • Microsoft.Extensions.AI.SpeechToTextClientBuilder
  • Microsoft.Extensions.AI.SpeechToTextClientBuilderSpeechToTextClientExtensions
  • Microsoft.Extensions.AI.ConfigureOptionsSpeechToTextClient
  • Microsoft.Extensions.AI.ConfigureOptionsSpeechToTextClientBuilderExtensions
  • Microsoft.Extensions.AI.LoggingSpeechToTextClient
  • Microsoft.Extensions.AI.LoggingSpeechToTextClientBuilderExtensions
  • Microsoft.Extensions.AI.OpenTelemetrySpeechToTextClient
  • Microsoft.Extensions.AI.OpenTelemetrySpeechToTextClientBuilderExtensions
  • Microsoft.Extensions.DependencyInjection.SpeechToTextClientBuilderServiceCollectionExtensions
  • Microsoft.Extensions.AI.OpenAIClientExtensions.AsISpeechToTextClient (extension method)

MEAI0003 - MCP Servers

  • Microsoft.Extensions.AI.HostedMcpServerTool
  • Microsoft.Extensions.AI.HostedMcpServerToolApprovalMode
  • Microsoft.Extensions.AI.HostedMcpServerToolAlwaysRequireApprovalMode
  • Microsoft.Extensions.AI.HostedMcpServerToolNeverRequireApprovalMode
  • Microsoft.Extensions.AI.HostedMcpServerToolRequireSpecificApprovalMode
  • Microsoft.Extensions.AI.McpServerToolCallContent
  • Microsoft.Extensions.AI.McpServerToolResultContent
  • Microsoft.Extensions.AI.McpServerToolApprovalRequestContent
  • Microsoft.Extensions.AI.McpServerToolApprovalResponseContent

MEAI0004 - Function Approvals

  • Microsoft.Extensions.AI.ApprovalRequiredAIFunction
  • Microsoft.Extensions.AI.FunctionApprovalRequestContent
  • Microsoft.Extensions.AI.FunctionApprovalResponseContent
  • Microsoft.Extensions.AI.UserInputRequestContent
  • Microsoft.Extensions.AI.UserInputResponseContent

MEAI0005 - Tool Reduction

  • Microsoft.Extensions.AI.IToolReductionStrategy
  • Microsoft.Extensions.AI.ToolReducingChatClient
  • Microsoft.Extensions.AI.ChatClientBuilderToolReductionExtensions
  • Microsoft.Extensions.AI.EmbeddingToolReductionStrategy

MEAI0006 - Chat Reduction

  • Microsoft.Extensions.AI.IChatReducer
  • Microsoft.Extensions.AI.MessageCountingChatReducer
  • Microsoft.Extensions.AI.SummarizingChatReducer
  • Microsoft.Extensions.AI.ReducingChatClient
  • Microsoft.Extensions.AI.ReducingChatClientBuilderExtensions

MEAI0007 - Response Continuations

  • Microsoft.Extensions.AI.ResponseContinuationToken
  • Microsoft.Extensions.AI.ChatOptions.AllowBackgroundResponses (property)
  • Microsoft.Extensions.AI.ChatOptions.ContinuationToken (property)
  • Microsoft.Extensions.AI.ChatResponse.ContinuationToken (property)
  • Microsoft.Extensions.AI.ChatResponseUpdate.ContinuationToken (property)

MEAI0008 - Code Interpreter

  • Microsoft.Extensions.AI.CodeInterpreterToolCallContent
  • Microsoft.Extensions.AI.CodeInterpreterToolResultContent

microsoft/agent-framework Usage

Function Approvals (MEAI0004) is used in agent-framework samples:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Catalog experimental APIs and group by feature Inventory MEAI001 experimental APIs into feature-specific diagnostic IDs (MEAI0001-MEAI0008) Dec 9, 2025
Copilot AI requested a review from jeffhandley December 9, 2025 07:47
@dotnet-policy-service dotnet-policy-service bot added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
…operty to MEAI experimental attributes

Co-authored-by: jeffhandley <[email protected]>
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
@jeffhandley jeffhandley added the breaking-change Issue or PR that represents a breaking API or functional change over a previous release. label Dec 9, 2025
@dotnet-policy-service dotnet-policy-service bot added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
@jeffhandley
Copy link
Member

@copilot Instead of a truncated Description column, update the PR description to provide a complete list of all fully-qualified APIs included in each of the Diagnostic ID Assignments. This is important as it will help us find callers of these APIs more easily.

@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
Copilot AI requested a review from jeffhandley December 9, 2025 09:42
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot Instead of a truncated Description column, update the PR description to provide a complete list of all fully-qualified APIs included in each of the Diagnostic ID Assignments. This is importan...

Updated the PR description with complete fully-qualified API names for all 8 diagnostic ID groups, including types (classes, interfaces, structs, enums), extension methods, and property-level experimental attributes.

@jeffhandley jeffhandley marked this pull request as ready for review December 9, 2025 09:52
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot There are build errors in Microsoft.AspNetCore.Diagnostics.Middleware because ExperimentalAttribute is found in 2 of its assembly references:

The type 'ExperimentalAttribute' exists in b...

Added InjectExperimentalAttributeOnLegacy=true and CS0436 suppression to Microsoft.AspNetCore.Diagnostics.Middleware.csproj in 30a7d72. This injects the internal ExperimentalAttribute polyfill, resolving the type ambiguity between Microsoft.Extensions.Telemetry and System.Runtime.

@jeffhandley
Copy link
Member

jeffhandley commented Dec 9, 2025

@copilot Additional projects are failing for the ambiguous ExperimentalAttribute problem. It might be best to inject the attribute into all projects. But we can start with the next batch of failures:

  • Microsoft.AspNetCore.Testing
  • Microsoft.Extensions.Compliance.Abstractions
  • Microsoft.Extensions.AmbientMetadata.Build

@jeffhandley
Copy link
Member

@copilot Address this comment

Copilot AI requested a review from a team as a code owner December 9, 2025 11:17
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot Additional projects are failing for the ambiguous ExperimentalAttribute problem. It might be best to inject the attribute into all projects. But we can start with the next batch of failures:
...

Added CS0436 suppression to the three projects in 6f6a6b8. They already had InjectExperimentalAttributeOnLegacy=true but were missing the warning suppression needed to allow the internal polyfill to override the BCL type.

@jeffhandley
Copy link
Member

@copilot The error is happening in more projects. We should probably just guard against it in all projects across the solution using the Directory.Build.props files.

Example:

##[error]artifacts\obj\Microsoft.Extensions.Diagnostics.Probes\Release\net9.0\Microsoft.Extensions.Diagnostics.Probes.AssemblyInfo.cs(13,44): error CS0436: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'ExperimentalAttribute' in 'D:\a_work\1\s\eng\MSBuild....\src\LegacySupport\ExperimentalAttribute\ExperimentalAttribute.cs' conflicts with the imported type 'ExperimentalAttribute' in 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Using the type defined in 'D:\a_work\1\s\eng\MSBuild....\src\LegacySupport\ExperimentalAttribute\ExperimentalAttribute.cs'.

#if !NET8_0_OR_GREATER
#if !NET10_0_OR_GREATER

#pragma warning disable CS0436 // Type conflicts with imported type
Copy link
Member

Choose a reason for hiding this comment

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

@copilot The changes needed to get ExperimentalAttribute flowing through everywhere are not worth it.

Revert the changes to the attribute, all places where the new type redefinition suppression was needed, remove the Message definitions for the new diagnostics, and do not inject the experimental attribute anywhere new that is no longer needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted the ExperimentalAttribute polyfill changes, removed Message definitions from DiagnosticIds.cs, and removed Message property from all Experimental attributes in cfb2285. The polyfill is now back to targeting !NET8_0_OR_GREATER without the Message property, and the MEAI experimental attributes use only the diagnostic ID and UrlFormat.

@dotnet-policy-service dotnet-policy-service bot added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot The error is happening in more projects. We should probably just guard against it in all projects across the solution using the Directory.Build.props files.

Example:
...

Moved the CS0436 suppression to LegacySupport.props for central handling in fe76059. The suppression is now automatically applied to all projects that use InjectExperimentalAttributeOnLegacy=true when targeting net8.0 or net9.0, eliminating the need for individual project-level suppressions.

@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 9, 2025
@stephentoub
Copy link
Member

@jeffhandley, why are we changing diagnostic id's? For all existing users, this only serves to introduce friction, as existing suppression will break for no benefit. And for new consumption, folks are going to need to suppress many diagnostics where previously they'd only need to suppress one. What benefit do we think we're providing by going more fine-grained here?

@jeffhandley jeffhandley marked this pull request as draft December 9, 2025 16:32
@ericstj
Copy link
Member

ericstj commented Dec 9, 2025

Using Agent Framework's consumption as a litmus test for an experimental API being ready to be marked as stab

I am not so sure Agent Framework usage is the only litmus test. That's just a single product using the API - a project which might even have a high tolerance for pain or only use a subset of the API surface. There are plenty of APIs we create that might not be designed for Agent Framework usage. We might have serious flaws in the surface area that Agent Framework happens not to use.

I think we need a better measure of usage/ship-readiness. We can look at NuGet ecosystem usage + internal usage + feedback signal (any signal - issues, blog engagement, docs view counts) + time available + adoption in 3rd party providers (when applicable).

@stephentoub stephentoub added the area-ai Microsoft.Extensions.AI libraries label Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai Microsoft.Extensions.AI libraries breaking-change Issue or PR that represents a breaking API or functional change over a previous release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants