-
Notifications
You must be signed in to change notification settings - Fork 715
Improve AI models enum #12107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve AI models enum #12107
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12107Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12107" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the GitHub Models and AI Foundry enumerations by refactoring the generation logic to produce consistent PascalCase method names and adding implicit usings for better developer experience.
Key Changes:
- Updated the GitHubModel enumeration generator to use consistent PascalCase naming conventions
- Added implicit usings for both GitHub Models and AI Foundry models
- Refactored obsolete model references to use new naming conventions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting.GitHub.Models/tools/GenModel.cs | Replaces ToId method with ToPascalCase using regex patterns for better naming consistency |
| src/Aspire.Hosting.GitHub.Models/build/Aspire.Hosting.GitHub.Models.props | Adds implicit using for GitHubModel with alias |
| src/Aspire.Hosting.GitHub.Models/GitHubModel.Obsolete.cs | Creates obsolete wrapper properties for backward compatibility |
| src/Aspire.Hosting.GitHub.Models/GitHubModel.Generated.cs | Updates generated code with new PascalCase naming and partial classes |
| src/Aspire.Hosting.Azure.AIFoundry/build/Aspire.Hosting.Azure.AIFoundry.props | Adds implicit using for AIFoundryModel with alias |
| playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.AppHost/Program.cs | Updates reference to use new PascalCase property name |
| playground/AzureAIFoundryEndToEnd/AzureAIFoundryEndToEnd.AppHost/Program.cs | Removes unused variable declaration |
| { | ||
| /// <inheritdoc cref="Jais30bChat"/> | ||
| [Obsolete("Use Jais30bChat instead.")] | ||
| public static readonly GitHubModel JAIS30bChat = new() { Id = "core42/jais-30b-chat" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add [EditorBrowsable(EditorBrowsableState.Never)] to these fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will also do it for foundry.
Description
Fixes #11742
Checklist
<remarks />and<code />elements on your triple slash comments?