Skip to content

GitHubModel enum cannot use implicit using while builder method can #11742

@maddymontaquila

Description

@maddymontaquila

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using the GitHubModel enum, it cannot be referenced with an implicit using, even though the AddGitHubModel builder method itself works with an implicit using. This inconsistency forces explicit namespace usage for the enum.

Example (fails without explicit using):

Code sample with error

Example (works with explicit using):

Code sample with explicit using

Expected Behavior

I expect the GitHubModel enum to be usable with an implicit using, just like the AddGitHubModel builder method, so that explicit namespace imports are not required.

Steps To Reproduce

  1. In a project with Aspire and GitHubModel, attempt to use the enum in a file relying on implicit usings.
  2. Observe that AddGitHubModel works, but referencing GitHubModel.OpenAI.OpenAIGPT4oMini requires an explicit using.
  3. See screenshots for reference.

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions