- 
                Notifications
    You must be signed in to change notification settings 
- Fork 715
[release/9.4] Add GitHub Models integration (#10170) #10313
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
Conversation
* 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 <eric.erhardt@microsoft.com> * 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 <midenn@microsoft.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
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
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, andGitHubModelsHealthCheckin 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 | IHealthCheckimplementation 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 _resultfield is accessed without synchronization and could be set concurrently on multiple threads. Consider making access thread-safe (e.g., using a lock orInterlocked.CompareExchange).
    private HealthCheckResult? _result;
Co-authored-by: Dan Moseley <danmose@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
<remarks />and<code />elements on your triple slash comments?