Byow command aliasing#8095
Conversation
- Add top-level azd ai models create/list/show/delete commands - Deprecate 'custom' subgroup with warning message - Add --weight-type flag to create command (default: FullWeight) - Add --source-job-id filter to list command for training job lineage - Make --publisher optional (only sent when explicitly provided) - Send pendingUploadType in startPendingUpload request body - Add new response fields: weightType, baseModel, source, artifactProfile, provisioningState - Display new fields in show command output - Update extension.yaml to 0.0.6-preview with updated examples - Update CHANGELOG.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the azure.ai.models azd extension to make custom model CRUD commands available directly under azd ai models (with the existing custom subgroup deprecated) and expands model payload/outputs to support newer service fields like weight type and source lineage.
Changes:
- Added top-level
create/list/show/deletecommands (aliases of the existingcustomsubcommands) and markedcustomas deprecated. - Added
--weight-typeto create and--source-job-idfiltering to list; enhancedshowoutput with additional model metadata. - Updated the Foundry client to support list filtering and to send an explicit
pendingUploadTypeinstartPendingUpload.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.models/pkg/models/register_model.go | Adds weightType to the register model request payload. |
| cli/azd/extensions/azure.ai.models/pkg/models/custom_model.go | Expands the model response schema (weight type, base model, source, artifact profile, provisioning state). |
| cli/azd/extensions/azure.ai.models/internal/cmd/root.go | Registers top-level CRUD commands and wires up endpoint resolution in PreRunE. |
| cli/azd/extensions/azure.ai.models/internal/cmd/custom.go | Deprecates the custom subgroup in favor of top-level commands. |
| cli/azd/extensions/azure.ai.models/internal/cmd/custom_show.go | Displays additional model fields (weight type, status, base model, source, artifact profile). |
| cli/azd/extensions/azure.ai.models/internal/cmd/custom_list.go | Adds --source-job-id and plumbs it to the client as a list option. |
| cli/azd/extensions/azure.ai.models/internal/cmd/custom_create.go | Adds --weight-type; makes --publisher optional and only sends catalog info when provided. |
| cli/azd/extensions/azure.ai.models/internal/client/foundry_client.go | Adds ListModels options + query param; updates startPendingUpload body to include pendingUploadType. |
| cli/azd/extensions/azure.ai.models/extension.yaml | Bumps extension version and updates examples to the new top-level command surface. |
| cli/azd/extensions/azure.ai.models/CHANGELOG.md | Documents new command surface, flags, output improvements, and client request change for 0.0.6-preview. |
Copilot's findings
- Files reviewed: 10/10 changed files
- Comments generated: 1
jongio
left a comment
There was a problem hiding this comment.
Several user-facing error/hint messages still reference the deprecated custom subgroup. Users running the new top-level commands will see recovery hints pointing to the deprecated path:
custom.go:123- the "azd not available" error saysazd ai models custom list --project-endpoint ...custom_create.go:155-157- the "already exists" recovery hints sayazd ai models custom showandazd ai models custom createinit.go:85-86- post-init next-steps sayazd ai models custom listandazd ai models custom create
These should use azd ai models show, azd ai models create, azd ai models list, etc.
Same issue in installation-guide.md and design-spec.md - those could be a follow-up, but worth tracking so the docs don't contradict the deprecation.
Fixes #8105
Summary
Enhancements to the \�zure.ai.models\ azd extension:
Changes