Skip to content

Remove Obsolete models from AIFoundry and GitHub.Models#12755

Merged
eerhardt merged 1 commit intodotnet:mainfrom
eerhardt:RemoveObsoleteAPIs
Nov 6, 2025
Merged

Remove Obsolete models from AIFoundry and GitHub.Models#12755
eerhardt merged 1 commit intodotnet:mainfrom
eerhardt:RemoveObsoleteAPIs

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Nov 6, 2025

Description

We don't want to ship with these new Obsolete APIs. These libraries haven't shipped stable yet, so backwards compatibility isn't a concern.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12755

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12755"

Copy link
Contributor

Copilot AI left a 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 removes obsolete API members from two model definition files, simplifying the codebase by cleaning up deprecated aliases that have been superseded by properly-named equivalents in the generated model files.

Key Changes:

  • Removed all obsolete model property definitions from AIFoundryModel.Obsolete.cs and GitHubModel.Obsolete.cs
  • Replaced actual obsolete code with commented-out examples showing the pattern for future reference
  • Removed the using System.ComponentModel; directive that is no longer needed

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Aspire.Hosting.GitHub.Models/GitHubModel.Obsolete.cs Removed obsolete model aliases (e.g., OpenAIGPT41OpenAIGpt41) and replaced with example template
src/Aspire.Hosting.Azure.AIFoundry/AIFoundryModel.Obsolete.cs Removed obsolete model aliases and an entire obsolete class (MistralAi), replaced with example template

/// <inheritdoc cref="MistralAI.Codestral2501"/>
public static readonly AIFoundryModel MistralSmall2503 = new() { Name = "mistral-small-2503", Version = "1", Format = "Mistral AI" };
}
// example
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment 'example' should be capitalized to 'Example' for consistency with standard documentation practices.

Suggested change
// example
// Example

Copilot uses AI. Check for mistakes.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly GitHubModel OpenAIGPT4oMini = new() { Id = "openai/gpt-4o-mini" };
}
// example
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment 'example' should be capitalized to 'Example' for consistency with standard documentation practices.

Suggested change
// example
// Example

Copilot uses AI. Check for mistakes.
@eerhardt
Copy link
Member Author

eerhardt commented Nov 6, 2025

/backport to release/13.0

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19145650769

@eerhardt eerhardt merged commit d9ecbac into dotnet:main Nov 6, 2025
588 of 592 checks passed
@eerhardt eerhardt deleted the RemoveObsoleteAPIs branch November 6, 2025 20:39
@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants