Exclude customer-facing Deprecated AI models from default extension framework model selection#8842
Exclude customer-facing Deprecated AI models from default extension framework model selection#8842Copilot wants to merge 4 commits into
Conversation
…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>
There was a problem hiding this comment.
Pull request overview
Updates the AI model catalog aggregation in cli/azd/pkg/ai so the default “new deployment” model listing no longer includes ARM lifecycleStatus=Deprecating (customer-facing Deprecated) models, while documenting an opt-in path via Statuses and expanding test coverage around the new lifecycle semantics.
Changes:
- Exclude ARM
DeprecatingandDeprecatedlifecycle statuses from the default aggregated model list; always exclude versions with retired inference endpoints (deprecation.inference <= now). - Preserve an opt-in mechanism via
FilterOptions.Statuses/AiModelFilterOptions.statuses(plus helper renames) and update docs/comments accordingly. - Update and add tests to reflect default exclusion and explicit opt-in behavior.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/pkg/azdext/ai_model.pb.go | Updates generated Go proto comments to describe default exclusion + opt-in semantics for statuses. |
| cli/azd/pkg/ai/types.go | Documents the updated default exclusion and opt-in behavior on FilterOptions.Statuses. |
| cli/azd/pkg/ai/model_service.go | Implements lifecycle/inference-retirement filtering order in convertToAiModelsAt and renames helper functions. |
| cli/azd/pkg/ai/model_service_test.go | Updates existing tests for default exclusion and adds an explicit opt-in test for Deprecating. |
| cli/azd/pkg/ai/deprecation_helpers_test.go | Renames/expands helper tests for new lifecycle/inference retirement helpers. |
| cli/azd/grpc/proto/ai_model.proto | Updates proto comments for statuses to describe default exclusion and opt-in behavior. |
Review details
Files not reviewed (1)
- cli/azd/pkg/azdext/ai_model.pb.go: Generated file
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Low
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
jongio
left a comment
There was a problem hiding this comment.
The filtering logic in convertToAiModelsAt is well-structured with clear precedence:
- Inference-retired (410 Gone) always excluded regardless of opt-in
- Explicit statuses opt-in returns only requested lifecycle stages
- Default view excludes both "Deprecating" and "Deprecated"
This correctly fixes the reported issue (Deprecating models showing up) and also fixes the latent bug where Deprecated models couldn't be opted back into via the Statuses filter.
The helper renames (Excluded/Retired terminology) improve clarity over the ARM-overloaded naming. Tests cover both the default exclusion and the opt-in path well.
One minor note: modelVersionExcluded still calls modelInferenceRetired internally, but in its only production call site the inference check already ran. This is defensively correct (the helper remains self-contained for tests and potential future callers) so no action needed.
Fixes #8840
The AI model service filtered out retired versions but still returned ARM
lifecycleStatus: "Deprecating"models by default. Per the ARM Models lifecycle mapping,Deprecatingis 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.Without changes
With changes
Changes (
cli/azd/pkg/ai)convertToAiModelsAtnow excludes versions whose lifecycle status is ARMDeprecating(Deprecated) orDeprecated(Retired) in the default view, in addition to the existing inference-expired and SKU-level filtering.FilterOptions.Statusesis the opt-in path: callers requesting["Deprecating"](e.g. existing-customer management) get exactly those statuses. This also fixes a latent bug whereDeprecatedversions were dropped before the status filter could match them.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.modelLifecycleDeprecated→modelLifecycleExcluded,modelDeprecationReached→modelInferenceRetired,modelVersionDeprecated→modelVersionExcluded.FilterOptions.Statuses(Go +ai_model.proto) to document default exclusion and opt-in semantics.Check ordering in
convertToAiModelsAt:Tests
Deprecatingis excluded by default.TestConvertToAiModels_ExcludesDeprecatingByDefaultButAllowsOptInusing the issue'sgpt-4.1-minidata (Deprecating+ futureinference): excluded by default, returned whenStatuses: ["Deprecating"]is requested.