Summary
Microsoft.Agents.AI.Foundry.Hosting is inconsistent in which [Experimental(...)] diagnostic id it applies to its public APIs. Most types use DiagnosticIds.Experiments.AIOpenAIResponses (OPENAI001), while a few MAF-specific types use DiagnosticIds.Experiments.AgentsAIExperiments (MAAI001) — e.g. FoundryToolboxHealthCheck, FoundryToolboxStartupStatus, and (added in #6718) UserToolboxConsent / FoundryToolboxService.GetUserToolboxConsents.
The MAF-specific public surface should consistently use MAAI001, not OPENAI001.
Rationale
OPENAI001 exists to mirror the OpenAI package's experimental diagnostic, so consumers using experimental OpenAI APIs don't need an extra suppression (per the comments in dotnet/src/Shared/DiagnosticIds/DiagnosticsIds.cs). It is appropriate only for APIs that surface OpenAI experimental types.
- The AgentServer base types this package builds on —
Azure.AI.AgentServer.Responses.ResponseHandler and ResponseContext — are not marked [Experimental] (verified against Azure.AI.AgentServer.Responses 1.0.0-beta.5).
- None of the package's public types expose OpenAI experimental types in their signatures; they are MAF hosting/agent abstractions. So
OPENAI001 is a legacy/copy-paste inconsistency and MAAI001 is the correct id.
Proposed change
Switch the remaining MAF-specific [Experimental(DiagnosticIds.Experiments.AIOpenAIResponses)] usages in Microsoft.Agents.AI.Foundry.Hosting to DiagnosticIds.Experiments.AgentsAIExperiments (MAAI001):
AgentFrameworkResponseHandler.cs
AgentSessionStore.cs
FileSystemAgentSessionStore.cs
InMemoryAgentSessionStore.cs
FoundryAIToolExtensions.cs
FoundryToolboxService.cs (class-level)
FoundryToolboxOptions.cs
HostedSessionContext.cs
HostedSessionContextExtensions.cs
HostedSessionIsolationKeyProvider.cs
PlatformHostedSessionIsolationKeyProvider.cs
HostedSessionJsonUtilities.cs (2 usages)
HostedFoundryMemoryProviderScopes.cs
HostedFoundryMemoryProviderServiceCollectionExtensions.cs
ServiceCollectionExtensions.cs
Audit each public type before flipping: keep OPENAI001 only where a type genuinely exposes an OpenAI experimental type in its public surface (none found so far).
Notes / risk
- Build-safe.
MAAI001 is already globally suppressed in dotnet/tests/Directory.Build.props and dotnet/samples/Directory.Build.props, so consuming tests and samples keep compiling.
- The package is pre-release (
VersionSuffix=preview, package validation disabled), so changing experimental diagnostic ids carries no compatibility concern.
Acceptance criteria
Context
Discovered during review of #6718 (Foundry hosted-agent toolbox OAuth consent). The new consent API was already corrected to MAAI001 in that PR; this issue tracks the broader package alignment as a separate change.
Summary
Microsoft.Agents.AI.Foundry.Hostingis inconsistent in which[Experimental(...)]diagnostic id it applies to its public APIs. Most types useDiagnosticIds.Experiments.AIOpenAIResponses(OPENAI001), while a few MAF-specific types useDiagnosticIds.Experiments.AgentsAIExperiments(MAAI001) — e.g.FoundryToolboxHealthCheck,FoundryToolboxStartupStatus, and (added in #6718)UserToolboxConsent/FoundryToolboxService.GetUserToolboxConsents.The MAF-specific public surface should consistently use
MAAI001, notOPENAI001.Rationale
OPENAI001exists to mirror the OpenAI package's experimental diagnostic, so consumers using experimental OpenAI APIs don't need an extra suppression (per the comments indotnet/src/Shared/DiagnosticIds/DiagnosticsIds.cs). It is appropriate only for APIs that surface OpenAI experimental types.Azure.AI.AgentServer.Responses.ResponseHandlerandResponseContext— are not marked[Experimental](verified againstAzure.AI.AgentServer.Responses1.0.0-beta.5).OPENAI001is a legacy/copy-paste inconsistency andMAAI001is the correct id.Proposed change
Switch the remaining MAF-specific
[Experimental(DiagnosticIds.Experiments.AIOpenAIResponses)]usages inMicrosoft.Agents.AI.Foundry.HostingtoDiagnosticIds.Experiments.AgentsAIExperiments(MAAI001):AgentFrameworkResponseHandler.csAgentSessionStore.csFileSystemAgentSessionStore.csInMemoryAgentSessionStore.csFoundryAIToolExtensions.csFoundryToolboxService.cs(class-level)FoundryToolboxOptions.csHostedSessionContext.csHostedSessionContextExtensions.csHostedSessionIsolationKeyProvider.csPlatformHostedSessionIsolationKeyProvider.csHostedSessionJsonUtilities.cs(2 usages)HostedFoundryMemoryProviderScopes.csHostedFoundryMemoryProviderServiceCollectionExtensions.csServiceCollectionExtensions.csAudit each public type before flipping: keep
OPENAI001only where a type genuinely exposes an OpenAI experimental type in its public surface (none found so far).Notes / risk
MAAI001is already globally suppressed indotnet/tests/Directory.Build.propsanddotnet/samples/Directory.Build.props, so consuming tests and samples keep compiling.VersionSuffix=preview, package validation disabled), so changing experimental diagnostic ids carries no compatibility concern.Acceptance criteria
Microsoft.Agents.AI.Foundry.HostinguseMAAI001(or a justifiedOPENAI001/MEAI001where an external experimental type is genuinely surfaced).dotnet buildand unit tests pass for the package and its consumers (tests, samples, integration test container).Context
Discovered during review of #6718 (Foundry hosted-agent toolbox OAuth consent). The new consent API was already corrected to
MAAI001in that PR; this issue tracks the broader package alignment as a separate change.