.NET: [BREAKING] Update type names and source generator to reduce conflicts#4903
Merged
.NET: [BREAKING] Update type names and source generator to reduce conflicts#4903
Conversation
Make the Config name less likely to collide with other classes by renaming to ExecutorConfig. Makes Configured and related classes internal as they do not need to be part of the public surface.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses type-name conflicts in the .NET Workflows surface area (notably RouteBuilder ambiguity with ASP.NET Core) by renaming configuration types, tightening visibility of implementation details, and adjusting generated source to avoid ambiguous references.
Changes:
- Renames
Config/Config<TOptions>toExecutorConfig/ExecutorConfig<TOptions>and updates relevant binding APIs. - Makes
Configuredand related configuration extension classesinternalto reduce public API surface and naming collisions. - Updates the workflow source generator output to add a
RouteBuilderusing-alias to disambiguate against ASP.NET Core.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorConfig.cs | Renames Config types to ExecutorConfig variants. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs | Updates executor binding extension signatures to use ExecutorConfig<TOptions>. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs | Makes Configured* types internal and updates factories to use ExecutorConfig. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs | Makes configuration extension class internal (implementation detail). |
| dotnet/src/Microsoft.Agents.AI.Workflows.Generators/Generation/SourceBuilder.cs | Adds RouteBuilder alias in generated code to prevent ambiguous reference errors. |
Comments suppressed due to low confidence (1)
dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorConfig.cs:10
ExecutorConfigwas renamed to reduce naming conflicts and is described in the PR as being used for executor factory binding, but the XML summary still describes a generic "configuration for an object". Consider updating the XML docs to describe the executor-factory scenario (and the intended semantics of the requiredidparameter) so the public API docs match the new type name.
dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.Workflows.Generators/Generation/SourceBuilder.cs
Show resolved
Hide resolved
ef02db7 to
fbb7601
Compare
westey-m
approved these changes
Mar 25, 2026
peibekwe
reviewed
Mar 25, 2026
peibekwe
approved these changes
Mar 25, 2026
Merged
This was referenced Apr 3, 2026
This was referenced Apr 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Some of the names of types used by workflows are likely to be conflicting (or are conflicting) with other types from, e.g. ASPNetCore.WebAPI. (#4174).
Description
ConfigtoExecutorConfig, as it is only used when binding to anExecutorfactory function.Configuredand relevant extension method classes internal (this is implementation details)RouteBuilder: fixes .NET: [Bug]: [Workflow Generator] 'RouteBuilder' is an ambiguous reference between 'Microsoft.AspNetCore.Routing.RouteBuilder' and 'Microsoft.Agents.AI.Workflows.RouteBuilder' #4174Explicitly not changing
Edge, orRunfor now unless we see actual conflicts.Contribution Checklist