microsoft/aspire · error · InvalidOperationException
The Microsoft Foundry model catalog response included…
Error message
The Microsoft Foundry model catalog response included partial failure data in {string.Join(", ", partialFailureFields)}. Refusing to overwrite the generated model descriptors with a partial catalog. Response: {GetResponseSnippet(content)} What it means
GetModelsAsync detects 'partial failure' fields in the Foundry catalog response (fields indicating some catalog data failed to load). After exhausting retries it throws, refusing to let a partially populated catalog overwrite the generated model descriptors. This keeps generated code complete and consistent.
Solutions
- Wait and re-run later — partial catalog data on the service side usually resolves on its own.
- Read the listed partial-failure fields and response snippet; if the fields are false positives after an API change, update GetPartialFailureFields.
- Check the Foundry service status/region health for ongoing incidents.
- Retry from a different region/endpoint if the specific index is degraded.
Defensive patterns
Strategy: retry
Try / catch
try
{
await RunGenModelAsync();
}
catch (InvalidOperationException ex) when (ex.Message.Contains("partial failure data"))
{
// upstream partial catalog: schedule a retry; never overwrite generated files
} Prevention
- Run codegen outside of known Foundry incident windows
- Check Foundry health endpoints before regenerating
- Keep GetPartialFailureFields aligned with the live API schema
- Schedule regeneration with automatic delayed retry
When it happens
Trigger: The catalog HTTP response contains partial-failure indicators (per GetPartialFailureFields) on every attempt up to MaxRequestAttempts, so the retry loop falls through to the final throw in GetModelsAsync.
Common situations: Foundry backend incident where the index is served with partial data; regional degradation; aggressive polling during an ongoing service migration; responses consistently flagged partial due to a new/renamed field tripping GetPartialFailureFields after an API update.
Related errors
- Microsoft Foundry model catalog request failed with HTTP
- The Microsoft Foundry model catalog response included…
- ADC request ' ' failed with HTTP ( ).
- ADC request ' ' returned an empty response.
- BrowserMessageStrings.BrowserLogsResourceMissingHttpEndpoint
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/72d9b1f8f4bcdb43.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting.Foundry/tools/GenModel.cs:938
// after the catalog API throttles us: the observed sequence is HTTP 429 -> 200 with
// populated error/skip fields, i.e. a transient symptom of load/rate-limiting rather
// than a stable catalog state. Retry it within the same budget as 429/5xx instead of
// hard-aborting, so a single throttled page doesn't fail the whole run. Only once the
// retry budget is exhausted do we refuse, preserving the "never overwrite the generated
// descriptors with a partial catalog" guarantee. See
// https://github.com/microsoft/aspire/issues/18285.
var partialFailureFields = TryGetPartialFailureFields(content);
if (partialFailureFields is { Count: > 0 })
{
if (attempt < MaxRequestAttempts)
{
var partialDelay = GetRetryDelay(response, content, attempt);
Console.WriteLine($"Microsoft Foundry model catalog request returned a partial catalog (populated {string.Join(", ", partialFailureFields)}). Retrying in {partialDelay.TotalSeconds:N0}s (attempt {attempt + 1}/{MaxRequestAttempts}).");
await Task.Delay(partialDelay).ConfigureAwait(false);
continue;
}
throw new InvalidOperationException($"The Microsoft Foundry model catalog response included partial failure data in {string.Join(", ", partialFailureFields)}. Refusing to overwrite the generated model descriptors with a partial catalog. Response: {GetResponseSnippet(content)}");
}
return content;
}
if (IsTransientStatusCode(response.StatusCode) && attempt < MaxRequestAttempts)
{
var delay = GetRetryDelay(response, content, attempt);
Console.WriteLine($"Microsoft Foundry model catalog request failed with HTTP {(int)response.StatusCode} ({response.StatusCode}). Retrying in {delay.TotalSeconds:N0}s (attempt {attempt + 1}/{MaxRequestAttempts}).");
await Task.Delay(delay).ConfigureAwait(false);
continue;
}
throw new HttpRequestException($"Microsoft Foundry model catalog request failed with HTTP {(int)response.StatusCode} ({response.StatusCode}). Response: {GetResponseSnippet(content)}", inner: null, response.StatusCode);
}
throw new InvalidOperationException("The Microsoft Foundry model catalog request loop completed without returning or throwing.");
}View on GitHub (pinned to 25830f84bd)