Sunset the GitHub Models integration - #18405
Conversation
GitHub Models is no longer available to new customers, so the Aspire.Hosting.GitHub.Models integration is being sunset. - Mark the public API surface [Obsolete] (AddGitHubModel overloads, AddGitHubModelById, WithApiKey, WithHealthCheck, GitHubModel, GitHubModelResource) with a message linking #18402. The ATS exporter keeps these capabilities and only flags them deprecated, so polyglot export coverage is unchanged. - Stop the daily model auto-update workflow and remove the now-dead GenModel generator tooling. - Add a deprecation banner to the integration README. - Suppress CS0618 in the test project and the playground AppHost, which intentionally exercise the deprecated integration. Fixes #18402 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mirror the Aspire.Hosting.Dapr / Aspire.Hosting.NodeJs deprecation precedent by adding Aspire.Hosting.GitHub.Models to the CLI DeprecatedPackages list so it no longer appears in 'aspire add' integration listings (unless the ShowDeprecatedPackages feature flag is set). Update the CLI deprecation tests accordingly and strengthen the README to state the GitHub Models service is no longer supported. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18405Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18405" |
There was a problem hiding this comment.
Pull request overview
This PR soft-sunsets the Aspire.Hosting.GitHub.Models hosting integration because the GitHub Models service is no longer available to new customers (#18402). Rather than deleting the shipped stable package outright, it ships one final release with the entire public surface marked [Obsolete] and hides the integration from aspire add, mirroring the prior Dapr/NodeJs sunset path. It also removes the daily model-refresh workflow and the in-package generator tooling.
I verified the deprecation is applied consistently across the public surface, the CLI deprecation list is the single source of truth that gates all three integration-listing paths (and the matching CLI tests were updated), the removed tools/ folder is fully gone (so dropping the Compile Remove is safe), and there are no dangling references to the deleted workflow/GenModel.cs. External consumers (test project, playground) suppress CS0618 via NoWarn, while in-package references self-suppress (obsolete-within-obsolete). No concrete defects were found.
Changes:
- Marks all public GitHub Models APIs
[Obsolete]via a sharedGitHubModelsDeprecation.Messageconst pointing at #18402. - Adds
Aspire.Hosting.GitHub.Modelsto the CLIDeprecatedPackagesallow-list (with corresponding test updates) and updates the README with a deprecation warning. - Removes the
update-github-models.ymlworkflow and thetools/model-generator tooling.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Aspire.Hosting.GitHub.Models/GitHubModelsDeprecation.cs |
New internal const holding the shared deprecation message. |
src/Aspire.Hosting.GitHub.Models/GitHubModelsExtensions.cs |
Marks both public/internal AddGitHubModel*, WithApiKey, WithHealthCheck overloads [Obsolete]. |
src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs |
Marks the resource type [Obsolete]. |
src/Aspire.Hosting.GitHub.Models/GithubModel.cs |
Marks the GitHubModel descriptor type [Obsolete] and adds the required using. |
src/Aspire.Hosting.GitHub.Models/Aspire.Hosting.GitHub.Models.csproj |
Removes the now-unneeded Compile Remove="tools\**\*.cs". |
src/Aspire.Hosting.GitHub.Models/README.md |
Adds a deprecation/sunset warning admonition. |
src/Aspire.Hosting.GitHub.Models/tools/* |
Deletes generator tooling (GenModel.cs, empty Directory.Build.*). |
src/Aspire.Cli/NuGet/NuGetPackageCache.cs |
Adds the package to the DeprecatedPackages set. |
tests/Aspire.Cli.Tests/NuGet/NuGetPackageCacheTests.cs |
Updates filter assertions to include GitHub.Models. |
tests/Aspire.Cli.Tests/Packaging/PackageChannelTests.cs |
Adds GitHub.Models to the dropped-deprecated-package case. |
tests/Aspire.Hosting.GitHub.Models.Tests/*.csproj |
Suppresses CS0618 for the deprecated-API tests. |
playground/GitHubModelsEndToEnd/.../GitHubModelsEndToEnd.AppHost.csproj |
Suppresses CS0618 for the demo AppHost. |
.github/workflows/update-github-models.yml |
Removes the daily model-refresh automation. |
This comment has been minimized.
This comment has been minimized.
PR Testing ReportPR Information
Artifact Version Verification
Changes Analyzed
Test Scenarios ExecutedScenario 1: Artifact provenanceObjective: Confirm the dogfood CLI matches the PR head and the package still ships.
Scenario 2:
|
| Probe | Command (non-interactive, exact id + --version) |
Result |
|---|---|---|
| Deprecated | aspire add Aspire.Hosting.GitHub.Models |
❌ "No exact match was found" — filtered out of candidate set (safe, explicit failure; no silent wrong package) |
| Control | aspire add Aspire.Hosting.Redis |
✅ "added successfully" → #:package Aspire.Hosting.Redis@... written |
Both invocations were identical and ran against the same PR hive (which contains both packages), so the only difference is the deprecation gate.
Scenario 3: features.showDeprecatedPackages re-enables the package (boundary)
Objective: Prove the filtering is specifically the deprecation flag, not a missing package.
Coverage Type: Boundary
Status: ✅ Passed
aspire config set features.showDeprecatedPackages true(local), thenaspire add Aspire.Hosting.GitHub.Models→ ✅ "added successfully" →#:package Aspire.Hosting.GitHub.Models@...written.
Scenario 4: [Obsolete] produces CS0618 when the API is used
Objective: Verify consumers using the hosting API get deprecation warnings but still build.
Coverage Type: Happy path
Status: ✅ Passed
- A file-based AppHost calling
builder.AddGitHubModel("chat", GitHubModel.OpenAI.OpenAIGpt4oMini)was built withdotnet build apphost.cs. - Emitted two
warning CS0618(onGitHubModelandAddGitHubModel) with the exact message:
GitHub Models is no longer available to new customers, so the Aspire GitHub Models integration is deprecated and will be removed in a future release. See https://github.com/microsoft/aspire/issues/18402 for details. - Build succeeded (warnings, not errors) — existing apps keep compiling.
CI Infrastructure Validation
- Deleted workflow
update-github-models.yml: a deletion cannot be dispatched/run; verified there are no dangling references (the AI Foundry workflow uses its own separatesrc/Aspire.Hosting.Foundry/tools/GenModel.cs). Nothing else to run for this change.
Investigation of the failing PR check
- Failing check:
Tests / Cli.EndToEnd-TypeScriptCodegenValidationTests (ubuntu-latest). - Failing case:
RestoreGeneratesSdkFiles_WithConfiguredToolchain(toolchain: "yarn"). - Nature: The test hung for 10 minutes (hang dump, process exit code 7,
No failed tests in .trx) — a timeout, not an assertion failure. - Relevance to PR: Unrelated. This test exercises TypeScript SDK codegen for Redis + SqlServer only; GitHub Models is never added. The
yarntoolchain variant performs network-heavy restore and hung; the PR's additive[Obsolete]attributes on GitHub Models cannot affect Redis/SqlServer codegen or a yarn restore. Classic transient/flaky timeout; a rerun should clear it. All native CLI archive builds passed.
Summary
| Scenario | Status | Notes |
|---|---|---|
| 1. Artifact provenance | ✅ Passed | Version matches head; package still ships |
2. aspire add filters deprecated package |
✅ Passed | GitHub Models filtered; Redis control adds |
| 3. Feature flag re-enables package | ✅ Passed | showDeprecatedPackages=true → addable |
4. [Obsolete] emits CS0618 |
✅ Passed | Warnings (not errors); exact #18402 message |
| Failing CI check | Transient yarn-restore hang in Redis/SqlServer codegen test |
Overall Result
✅ PR VERIFIED
The sunset behaves exactly as intended end-to-end: the package still builds and ships, it is hidden from aspire add by default (recoverable via features.showDeprecatedPackages), and using the API surfaces a clear CS0618 deprecation pointing at #18402 without breaking existing builds. The one red CI check is an unrelated transient timeout in a TypeScript-codegen test that does not involve GitHub Models.
Capture the full soft-sunset process for retiring a shipped Aspire hosting integration (mark API [Obsolete], README warning banner, hide from aspire add, remove integration-specific automation, suppress CS0618 in first-party consumers, keep the package publishable) as a reusable skill, derived from the GitHub Models sunset (#18402). Also list it in AGENTS.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Verification with a fresh agent surfaced two over-application risks the original wording invited: decorating every nested per-item member of an already-obsolete type, and overwriting pre-existing, more-specific [Obsolete] messages. Clarify Step 2 to mark each public type/extension method once (the enclosing type covers its members), to leave generated files and existing obsolete messages alone, and generalize the CLI test step to update every DeprecatedPackages test case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The integration is still a work in progress; presenting it as the canonical Phase 1 reference won't make sense once the skill is applied to other integrations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The obsolete message and banner depend on a clear reason; any issue link is optional supporting context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 48 / 97 test projects · 5 jobs, from 19 changed files. Selected test projects (48 / 97)
Selected jobs (5)
How these were chosen — grouped by what changed
🧪 show 30
🔧 🔧 📦 affected project 📦 affected project 📄 📄 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
David Fowler (@davidfowl) I asked the agent to revert all changes and use a sub agent to run the skill, so it should be a good validation. |
|
sweet! |
The GitHub Models service is no longer available to new customers. Aspire.Hosting.GitHub.Models is sunset in 13.5 — all public APIs are marked [Obsolete] and the package is hidden from aspire add. Add a :::caution callout to all three GitHub Models documentation pages to surface this to existing users. Documents changes from microsoft/aspire#18405. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pull request created: #1279
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1279 targeting Added a
Note This draft PR needs human review before merging. |
* Add deprecation notices to GitHub Models integration docs The GitHub Models service is no longer available to new customers. Aspire.Hosting.GitHub.Models is sunset in 13.5 — all public APIs are marked [Obsolete] and the package is hidden from aspire add. Add a :::caution callout to all three GitHub Models documentation pages to surface this to existing users. Documents changes from microsoft/aspire#18405. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: add GitHub Models sunset to 13.5 breaking changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: recommend Azure AI Foundry integration as GitHub Models replacement Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: David Pine <david.pine@microsoft.com> --------- Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Sebastien Ros <sebastienros@gmail.com> Co-authored-by: David Pine <david.pine@microsoft.com>
Address review findings on the failure-issue automation: - The monitor watch list still named refresh-typescript-sdks.yml and update-github-models.yml, but both workflows were removed on main (microsoft#18288 and microsoft#18405). monitor-scheduled-workflows.js looks each entry up via listWorkflowRuns({ workflow_id }), so every 2-hour run would 404 on these two and log a warning while monitoring nothing. Remove both from the config and from the watch-list prose in the doc. - monitor-scheduled-workflows.md linked internal-build-failure- notifications.md, which does not exist in the repo. Drop the dangling link, keep the sentence. - specialized-test-failure-issues.md described extractionFailed as true "only when every .trx was unreadable". The implementation is readErrors > 0 && failedTests.Count == 0 (at least one unreadable trx with no failures collected); the partial case is also flagged. Match the markdown to the code and its in-code comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
The GitHub Models service is no longer available to new customers, so
Aspire.Hosting.GitHub.Modelsneeds to be retired. Rather than deleting it outright (which would break existing consumers of a shipped stable package), this PR does a soft sunset: it ships one final release with the entire public surface marked[Obsolete]and the integration hidden fromaspire add, following the same path previously used forAspire.Hosting.DaprandAspire.Hosting.NodeJs. A later release can then remove the project entirely.What changed:
[Obsolete]. BothAddGitHubModeloverloads, the internal helpers,WithApiKey,WithHealthCheck, and theGitHubModel/GitHubModelResourcetypes now carry a shared deprecation message (newGitHubModelsDeprecation.Messageconst) pointing at Sunset Github Models integration #18402. Existing apps keep compiling, just with deprecation warnings.aspire add. Added the package to the CLIDeprecatedPackagesallow-list so it no longer shows up in integration listings unless theShowDeprecatedPackagesfeature flag is set, mirroring the Dapr/NodeJs precedent.update-github-models.ymlworkflow and the in-package model generator tooling, since the model list will no longer be refreshed.Notes for reviewers:
IsPackable=truewith noSuppressFinalPackageVersion, so the next release still publishes a final obsolete version to NuGet. Full deletion of the project, tests, and playground is intended as a follow-up after that release.[Obsolete](the scanner still emits the capability, now flagged@deprecatedin TS codegen), so the polyglot apphosts remain valid and were intentionally left untouched.NoWarn;CS0618was added only to the external consumers (test project, playground) sinceTreatWarningsAsErrorsis on repo-wide; obsolete-within-obsolete references self-suppress.Fixes: #18402
Checklist
<remarks />and<code />elements on your triple slash comments?