Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9b922fb
Initial plan
Copilot Dec 9, 2025
e0138fc
Update Image Generation APIs (MEAI0001) to use DiagnosticIds constants
Copilot Dec 9, 2025
52d92a2
Update Speech to Text APIs (MEAI0002) to use DiagnosticIds constants
Copilot Dec 9, 2025
8c652dd
Update remaining experimental API groups (MEAI0003-MEAI0008) to use D…
Copilot Dec 9, 2025
8dfcae2
Update test projects to suppress new MEAI experimental diagnostic IDs
Copilot Dec 9, 2025
6d87e94
Update ExperimentalAttribute polyfill for .NET 8/9 and add Message pr…
Copilot Dec 9, 2025
7be2da7
Reorder Experimental attribute properties - Message before UrlFormat
Copilot Dec 9, 2025
51fe0dc
Add explanatory comments for CS0436 suppression in project files
Copilot Dec 9, 2025
a5c2780
Remove MEAI001 suppression, add MEAI diagnostic IDs to docs, cleanup …
Copilot Dec 9, 2025
30a7d72
Fix build error in AspNetCore.Diagnostics.Middleware by injecting Exp…
Copilot Dec 9, 2025
6f6a6b8
Add CS0436 suppression to additional projects for ExperimentalAttribu…
Copilot Dec 9, 2025
83c2927
Add CS0436 suppression to all remaining projects with ExperimentalAtt…
Copilot Dec 9, 2025
fe76059
Move CS0436 suppression to LegacySupport.props for central handling
Copilot Dec 9, 2025
cfb2285
Revert ExperimentalAttribute polyfill changes and remove Message defi…
Copilot Dec 9, 2025
69d2535
Keep a single diagnostic ID (MEAI001) for all AI experiments
jeffhandley Jan 15, 2026
88ebbf1
Merge branch 'main' into copilot/inventory-experimental-apis
jeffhandley Jan 15, 2026
0aa5188
Use a string const for the diagnostic id; remove unnecessary suppression
jeffhandley Jan 15, 2026
7a53a00
Revert stale changes for injecting ExperimentAlattribute
jeffhandley Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions docs/list-of-diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ if desired.

| Diagnostic ID | Description |
| :---------------- | :---------- |
| `EXTEXP0001` | Resilience experiments |
| `EXTEXP0002` | Compliance experiments |
| `EXTEXP0003` | Telemetry experiments |
| `EXTEXP0004` | TimeProvider experiments |
| `EXTEXP0006` | AsyncState experiments |
| `EXTEXP0007` | Health check experiments |
| `EXTEXP0008` | Resource monitoring experiments |
| `EXTEXP0009` | Hosting experiments |
| `EXTEXP0010` | Object pool experiments |
| `EXTEXP0011` | Document database experiments |
| `EXTEXP0012` | Auto-activation experiments |
| `EXTEXP0013` | HttpLogging middleware experiments |
| `EXTEXP0014` | ASP.NET Core integration testing experiments |
| `EXTEXP0015` | Environmental probes experiments |
| `EXTEXP0016` | Hosting integration testing experiments |
| `EXTEXP0017` | Contextual options experiments |
| `EXTEXP0018` | HybridCache experiments |
| `EXTEXP0001` | Resilience experiments |
| `EXTEXP0002` | Compliance experiments |
| `EXTEXP0003` | Telemetry experiments |
| `EXTEXP0004` | TimeProvider experiments |
| `EXTEXP0006` | AsyncState experiments |
| `EXTEXP0007` | Health check experiments |
| `EXTEXP0008` | Resource monitoring experiments |
| `EXTEXP0009` | Hosting experiments |
| `EXTEXP0010` | Object pool experiments |
| `EXTEXP0011` | Document database experiments |
| `EXTEXP0012` | Auto-activation experiments |
| `EXTEXP0013` | HttpLogging middleware experiments |
| `EXTEXP0014` | ASP.NET Core integration testing experiments |
| `EXTEXP0015` | Environmental probes experiments |
| `EXTEXP0016` | Hosting integration testing experiments |
| `EXTEXP0017` | Contextual options experiments |
| `EXTEXP0018` | HybridCache experiments |
| `MEAI001` | AI experiments |

# Obsoletions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand Down Expand Up @@ -180,7 +181,7 @@ protected ChatOptions(ChatOptions? other)
/// If the implementation does not support background responses, this property will be ignored.
/// </para>
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIResponseContinuations, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonIgnore]
public bool? AllowBackgroundResponses { get; set; }

Expand All @@ -195,7 +196,7 @@ protected ChatOptions(ChatOptions? other)
/// can be polled for completion by obtaining the token from the <see cref="ChatResponse.ContinuationToken"/> property
/// and passing it to this property on subsequent calls to <see cref="IChatClient.GetResponseAsync"/>.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIResponseContinuations, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonIgnore]
public ResponseContinuationToken? ContinuationToken { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;
Expand Down Expand Up @@ -100,7 +101,7 @@ public IList<ChatMessage> Messages
/// to poll for completion.
/// </para>
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIResponseContinuations, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonIgnore]
public ResponseContinuationToken? ContinuationToken { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand Down Expand Up @@ -170,7 +171,7 @@ public IList<AIContent> Contents
/// to resume streaming from the point of interruption.
/// </para>
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIResponseContinuations, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonIgnore]
public ResponseContinuationToken? ContinuationToken { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a reducer capable of shrinking the size of a list of chat messages.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIChatReduction, UrlFormat = DiagnosticIds.UrlFormat)]
public interface IChatReducer
{
/// <summary>Reduces the size of a list of chat messages.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -13,7 +14,7 @@ namespace Microsoft.Extensions.AI;
/// This content type represents when a hosted AI service invokes a code interpreter tool.
/// It is informational only and represents the call itself, not the result.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AICodeInterpreter, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class CodeInterpreterToolCallContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents the result of a code interpreter tool invocation by a hosted service.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AICodeInterpreter, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class CodeInterpreterToolResultContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a request for user approval of a function call.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIFunctionApprovals, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class FunctionApprovalRequestContent : UserInputRequestContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a response to a function approval request.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIFunctionApprovals, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class FunctionApprovalResponseContent : UserInputResponseContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents the invocation of an image generation tool call by a hosted service.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIImageGeneration, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class ImageGenerationToolCallContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -13,7 +14,7 @@ namespace Microsoft.Extensions.AI;
/// This content type represents when a hosted AI service invokes an image generation tool.
/// It is informational only and represents the call itself, not the result.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIImageGeneration, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class ImageGenerationToolResultContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a request for user approval of an MCP server tool call.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class McpServerToolApprovalRequestContent : UserInputRequestContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a response to an MCP server tool approval request.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class McpServerToolApprovalResponseContent : UserInputResponseContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;
Expand All @@ -15,7 +16,7 @@ namespace Microsoft.Extensions.AI;
/// This content type is used to represent an invocation of an MCP server tool by a hosted service.
/// It is informational only.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class McpServerToolCallContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;
Expand All @@ -15,7 +16,7 @@ namespace Microsoft.Extensions.AI;
/// This content type is used to represent the result of an invocation of an MCP server tool by a hosted service.
/// It is informational only.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class McpServerToolResultContent : AIContent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents a request for user input.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIFunctionApprovals, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
[JsonDerivedType(typeof(FunctionApprovalRequestContent), "functionApprovalRequest")]
[JsonDerivedType(typeof(McpServerToolApprovalRequestContent), "mcpServerToolApprovalRequest")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents the response to a request for user input.
/// </summary>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIFunctionApprovals, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
[JsonDerivedType(typeof(FunctionApprovalResponseContent), "functionApprovalResponse")]
[JsonDerivedType(typeof(McpServerToolApprovalResponseContent), "mcpServerToolApprovalResponse")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -14,7 +15,7 @@ namespace Microsoft.Extensions.AI;
/// This class simply augments an <see cref="AIFunction"/> with an indication that approval is required before invocation.
/// It does not enforce the requirement for user approval; it is the responsibility of the invoker to obtain that approval before invoking the function.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIFunctionApprovals, UrlFormat = DiagnosticIds.UrlFormat)]
public sealed class ApprovalRequiredAIFunction : DelegatingAIFunction
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -12,7 +13,7 @@ namespace Microsoft.Extensions.AI;
/// <remarks>
/// Use <see cref="HostedMcpServerToolApprovalMode.AlwaysRequire"/> to get an instance of <see cref="HostedMcpServerToolAlwaysRequireApprovalMode"/>.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
[DebuggerDisplay(nameof(AlwaysRequire))]
public sealed class HostedMcpServerToolAlwaysRequireApprovalMode : HostedMcpServerToolApprovalMode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -14,7 +15,7 @@ namespace Microsoft.Extensions.AI;
/// The predefined values <see cref="AlwaysRequire" />, and <see cref="NeverRequire"/> are provided to specify handling for all tools.
/// To specify approval behavior for individual tool names, use <see cref="RequireSpecific(IList{string}, IList{string})"/>.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
[JsonDerivedType(typeof(HostedMcpServerToolNeverRequireApprovalMode), typeDiscriminator: "never")]
[JsonDerivedType(typeof(HostedMcpServerToolAlwaysRequireApprovalMode), typeDiscriminator: "always")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

Expand All @@ -12,7 +13,7 @@ namespace Microsoft.Extensions.AI;
/// <remarks>
/// Use <see cref="HostedMcpServerToolApprovalMode.NeverRequire"/> to get an instance of <see cref="HostedMcpServerToolNeverRequireApprovalMode"/>.
/// </remarks>
[Experimental("MEAI001")]
[Experimental(DiagnosticIds.Experiments.AIMcpServers, UrlFormat = DiagnosticIds.UrlFormat)]
[DebuggerDisplay(nameof(NeverRequire))]
public sealed class HostedMcpServerToolNeverRequireApprovalMode : HostedMcpServerToolApprovalMode
{
Expand Down
Loading
Loading