Skip to content

Conversation

@eerhardt
Copy link
Member

Backport of #10170 to release/9.4

/cc @sebastienros

Customer Impact

Customers can use GitHub models easily in their Aspire applications.

Testing

Manual and new unit tests added.

Risk

Almost none. Just a new integration - no product changes outside of the new integration.

Regression?

No

Description

Adds a new hosting integration for GitHub Models.

Fixes #9569 #7649

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

* Add GitHub Models integration

* Fix parameters and doc

* Add package logo

* Support GITHUB_TOKEN env

* Fix test

* Rename to GithubModel

* Remove iisexpress in launch

* Update playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.AppHost/GitHubModelsEndToEnd.AppHost.csproj

Co-authored-by: Eric Erhardt <[email protected]>

* Define running state on github models

* Add organization

* Add tests

* Add health checks

* Add manifest files

* Make health checks opt-in

* Feedback

* Fix test

---------

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
Copilot AI review requested due to automatic review settings July 10, 2025 20:25
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Jul 10, 2025
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

Backports the GitHub Models hosting integration to release/9.4, enabling Aspire applications to configure and use GitHub Models resources via a new extension, resource type, health check, and accompanying tests.

  • Introduces GitHubModelsExtensions, GitHubModelResource, and GitHubModelsHealthCheck in the hosting library
  • Adds comprehensive unit tests in Aspire.Hosting.GitHub.Models.Tests
  • Updates README and playground projects to demonstrate end-to-end usage

Reviewed Changes

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

File Description
src/Aspire.Hosting.GitHub.Models/GitHubModelsExtensions.cs Extension methods to add/configure GitHub Models resources and health checks
src/Aspire.Hosting.GitHub.Models/GitHubModelsHealthCheck.cs IHealthCheck implementation querying the GitHub Models API
src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs Resource class exposing model, organization, key, and connection string
tests/Aspire.Hosting.GitHub.Models.Tests/GitHubModelsExtensionTests.cs Unit tests covering endpoints, API key, organization, and health check annotation
Comments suppressed due to low confidence (2)

src/Aspire.Hosting.GitHub.Models/GitHubModelsExtensions.cs:40

  • For consistency with official branding, consider updating "Github Models" to "GitHub Models".
                        new(CustomResourceKnownProperties.Source, "Github Models")

src/Aspire.Hosting.GitHub.Models/GitHubModelsHealthCheck.cs:19

  • The _result field is accessed without synchronization and could be set concurrently on multiple threads. Consider making access thread-safe (e.g., using a lock or Interlocked.CompareExchange).
    private HealthCheckResult? _result;

Co-authored-by: Dan Moseley <[email protected]>
Co-authored-by: Copilot <[email protected]>
@joperezr joperezr added the Servicing-approved Approved for servicing release label Jul 10, 2025
@danmoseley danmoseley merged commit cfbc4e6 into dotnet:release/9.4 Jul 10, 2025
255 checks passed
danmoseley pushed a commit to danmoseley/aspire that referenced this pull request Jul 10, 2025
@eerhardt eerhardt deleted the BackportGithubModels branch July 10, 2025 23:56
eerhardt added a commit that referenced this pull request Jul 10, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants