microsoft / microsoft/aspire

Aspire provisioning hangs silently when changing Foundry model deployment (e.g., Gpt4oMini to Gpt5Mini)

Open
#16,750 0 comments 1 reaction 0 assignees View on GitHub
needs-area-label
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Description

When changing the configured model in an Aspire + Foundry app (e.g., changing from `Gpt4oMini` to `Gpt5Mini` in `AddDeployment()`), Aspire provisioning enters an infinite hang with no error output and no progress indication.

## Root Cause

Aspire's **checksum-based caching state machine** appears to believe the resource is unchanged, causing provisioning to never complete or restart correctly. This state machine is **completely undocumented**.

## Impact

- Simple configuration edits (changing a model name) cause multi-hour debugging sessions
- Developers cannot diagnose, recover from, or understand the hang

## Steps to Reproduce

1. Create an Aspire app with Foundry integration using `AddFoundry()` and `AddDeployment("chat", FoundryModel.OpenAI.Gpt4oMini)`
2. Successfully provision the app
3. Change the model: `AddDeployment("chat", FoundryModel.OpenAI.Gpt5Mini)`
4. Run provisioning again
5. Observe: provisioning hangs indefinitely with no output

## Expected Behavior

Aspire should detect the model change and re-provision the deployment, or provide a clear error/instruction if manual intervention is needed.

## Actual Behavior

Silent infinite hang. No error, no progress, no indication of what's wrong.

## Workarounds

`RunAsExisting()` can be used to tell Aspire the resource already exists, but this method is **undocumented** and was discovered only by scanning Aspire NuGet package DLLs for method names.

## Suggestions

1. Document the checksum-based caching state machine behavior
2. Document `RunAsExisting()` as a supported API
3. Detect model changes and handle re-provisioning, or surface a clear diagnostic message

## Environment

- .NET SDK: 10.0.300-preview
- Aspire: 13.3.0-preview.1.26201.14
- Aspire.Hosting.Foundry (version used during investigation)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the hang through AddFoundry() and AddDeployment() after changing the model, then compare the behavior with the documented workaround entry point RunAsExisting(). Trace the checksum-based caching state machine mentioned in the report and determine whether model changes are detected or a diagnostic is surfaced; done means provisioning completes or gives a clear recovery instruction.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.