Skip to content

Exclude customer-facing Deprecated AI models from default extension framework model selection#8842

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/exclude-deprecated-ai-models
Draft

Exclude customer-facing Deprecated AI models from default extension framework model selection#8842
Copilot wants to merge 2 commits into
mainfrom
copilot/exclude-deprecated-ai-models

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The AI model service filtered out retired versions but still returned ARM lifecycleStatus: "Deprecating" models by default. Per the ARM Models lifecycle mapping, Deprecating is the customer-facing Deprecated stage (existing customers only, new deployments blocked), so it should not be offered as an available/recommended choice for new deployments.

Changes (cli/azd/pkg/ai)

  • Default exclusionconvertToAiModelsAt now excludes versions whose lifecycle status is ARM Deprecating (Deprecated) or Deprecated (Retired) in the default view, in addition to the existing inference-expired and SKU-level filtering.
  • Opt-in preservedFilterOptions.Statuses is the opt-in path: callers requesting ["Deprecating"] (e.g. existing-customer management) get exactly those statuses. This also fixes a latent bug where Deprecated versions were dropped before the status filter could match them.
  • Retired always excluded — versions with deprecation.inference <= now (410 Gone) are excluded unconditionally, regardless of requested statuses, matching the docs' guidance to treat past inference dates as retired regardless of lifecycle lag.
  • Helper renames to avoid colliding with ARM terminology: modelLifecycleDeprecatedmodelLifecycleExcluded, modelDeprecationReachedmodelInferenceRetired, modelVersionDeprecatedmodelVersionExcluded.
  • Docs/proto — updated FilterOptions.Statuses (Go + ai_model.proto) to document default exclusion and opt-in semantics.

Check ordering in convertToAiModelsAt:

// Always drop retired inference endpoints (410 Gone), regardless of requested statuses.
if modelInferenceRetired(m.Model.Deprecation, now) {
    continue
}
if len(statuses) > 0 {
    // Opt-in: return only requested lifecycle statuses (incl. Deprecating/Deprecated).
    if !slices.Contains(statuses, modelLifecycleStatusValue(m.Model.LifecycleStatus)) {
        continue
    }
} else if modelLifecycleExcluded(m.Model.LifecycleStatus) {
    // Default view excludes customer-facing Deprecated (Deprecating) and Retired (Deprecated).
    continue
}

Tests

  • Updated existing aggregation/helper tests to reflect that Deprecating is excluded by default.
  • Added TestConvertToAiModels_ExcludesDeprecatingByDefaultButAllowsOptIn using the issue's gpt-4.1-mini data (Deprecating + future inference): excluded by default, returned when Statuses: ["Deprecating"] is requested.

…ault

By default, AI model listing and deployment resolution now exclude model
versions whose ARM lifecycleStatus is "Deprecating" (customer-facing
Deprecated) or "Deprecated" (Retired), in addition to versions whose
inference endpoint has retired. Callers can opt back into excluded lifecycle
statuses via FilterOptions.Statuses for existing-customer management.

Renames helpers to Excluded/Retired terminology to avoid confusion with ARM's
lifecycle status names and adds regression coverage for gpt-4.1-mini-style
data (Deprecating with a future inference date).

Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Copilot AI changed the title [WIP] Exclude deprecated AI models from default extension framework selection Exclude customer-facing Deprecated AI models from default extension framework model selection Jun 26, 2026
Copilot AI requested a review from JeffreyCA June 26, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants