diff --git a/cli/azd/extensions/azure.ai.finetune/CHANGELOG.md b/cli/azd/extensions/azure.ai.finetune/CHANGELOG.md index 46e9978bd29..85f69dfb953 100644 --- a/cli/azd/extensions/azure.ai.finetune/CHANGELOG.md +++ b/cli/azd/extensions/azure.ai.finetune/CHANGELOG.md @@ -10,7 +10,7 @@ ## 0.0.16-preview (2026-02-03) - Simplified init flow: reduced prompts from 4 to 2 for faster setup -- Added implicit init to all job commands: use `--subscription` (`-s`) and `--project-endpoint` (`-e`) flags to configure and run in a single command +- Added implicit init to all job commands: use `--subscription` (`-s`) and `--project-endpoint` flags to configure and run in a single command ## 0.0.14-preview (2026-01-28) diff --git a/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go b/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go index f59b934456f..179f85e397e 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go @@ -148,6 +148,8 @@ func newInitCommand(rootFlags rootFlagsDefinition) *cobra.Command { cmd.Flags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") + cmd.Flags().Lookup("project-endpoint").ShorthandDeprecated = + "use --project-endpoint instead; -e will be removed in a future release" cmd.Flags().StringVarP(&flags.src, "working-directory", "w", "", "Local path for project output") diff --git a/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go b/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go index b1c54c68321..8d58df95bcd 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go @@ -43,6 +43,8 @@ func newOperationCommand() *cobra.Command { "Azure subscription ID (enables implicit init if environment not configured)") cmd.PersistentFlags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") + cmd.PersistentFlags().Lookup("project-endpoint").ShorthandDeprecated = + "use --project-endpoint instead; -e will be removed in a future release" cmd.AddCommand(newOperationSubmitCommand()) cmd.AddCommand(newOperationShowCommand()) diff --git a/cli/azd/extensions/azure.ai.finetune/internal/cmd/validation.go b/cli/azd/extensions/azure.ai.finetune/internal/cmd/validation.go index db0fd4677be..d5a578e3297 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/validation.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/validation.go @@ -170,7 +170,7 @@ func validateOrInitEnvironment(ctx context.Context, subscriptionId, projectEndpo // Environment not configured - check if we have flags for implicit init if projectEndpoint == "" || subscriptionId == "" { - return fmt.Errorf("required environment variables not set. Either run 'azd ai finetuning init' or provide both --subscription (-s) and --project-endpoint (-e) flags") + return fmt.Errorf("required environment variables not set. Either run 'azd ai finetuning init' or provide both --subscription (-s) and --project-endpoint flags") } // Perform implicit initialization diff --git a/cli/azd/extensions/azure.ai.models/CHANGELOG.md b/cli/azd/extensions/azure.ai.models/CHANGELOG.md index 0cce502766e..4fc6f5dfbf7 100644 --- a/cli/azd/extensions/azure.ai.models/CHANGELOG.md +++ b/cli/azd/extensions/azure.ai.models/CHANGELOG.md @@ -3,6 +3,7 @@ ## 0.0.5-preview (2026-03-24) +- Deprecated `-e` shorthand for `--project-endpoint`; use the full flag name instead - Improved error handling for 403 (Forbidden) during `custom create` upload, with guidance on required roles and links to prerequisites and RBAC documentation (#7278) ## 0.0.4-preview (2026-03-17) diff --git a/cli/azd/extensions/azure.ai.models/design/design-spec.md b/cli/azd/extensions/azure.ai.models/design/design-spec.md index 747e5d8a842..823a51a7c8b 100644 --- a/cli/azd/extensions/azure.ai.models/design/design-spec.md +++ b/cli/azd/extensions/azure.ai.models/design/design-spec.md @@ -242,7 +242,7 @@ The `create` command performs three sequential steps internally: Sets up an azd environment and configures the Azure AI Foundry project connection. ```bash -azd ai models init [-e ] [-s ] [-p ] [-n ] +azd ai models init [--project-endpoint ] [-s ] [-p ] [-n ] ``` **Flow:** @@ -268,7 +268,7 @@ azd ai models init [-e ] [-s ] [-p ] [-n -s +azd ai models custom list --project-endpoint -s ``` **Example:** ```bash -azd ai models custom list -e "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" +azd ai models custom list --project-endpoint "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" ``` ![List Custom Models](images/06.1.jpg) @@ -96,13 +96,13 @@ azd ai models custom list -e "https://my-account.services.ai.azure.com/api/proje ### 5.2 Create a Custom Model ```bash -azd ai models custom create -e -s --name --source +azd ai models custom create --project-endpoint -s --name --source ``` **Example with local source:** ```bash -azd ai models custom create -e "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" --name my-model --source "D:\models\my-weights" --base-model "FW-DeepSeek-v3.1" +azd ai models custom create --project-endpoint "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" --name my-model --source "D:\models\my-weights" --base-model "FW-DeepSeek-v3.1" ``` **Example with remote source:** @@ -126,26 +126,26 @@ azd ai models custom create -e "https://my-account.services.ai.azure.com/api/pro ### 5.3 Show Custom Model Details ```bash -azd ai models custom show -e -s --name +azd ai models custom show --project-endpoint -s --name ``` ### 5.4 Delete a Custom Model ```bash -azd ai models custom delete -e -s --name +azd ai models custom delete --project-endpoint -s --name ``` Use `--force` to skip the confirmation prompt: ```bash -azd ai models custom delete -e -s --name --force +azd ai models custom delete --project-endpoint -s --name --force ``` --- ## Step 6: Initialize Project (Optional — Recommended) -Instead of passing `-e` and `-s` on every command, you can run `azd ai models init` to +Instead of passing `--project-endpoint` and `-s` on every command, you can run `azd ai models init` to configure your project once. This stores the project endpoint and subscription in the azd environment so all subsequent commands pick them up automatically. @@ -161,7 +161,7 @@ The init command will interactively guide you through: 4. Selecting a resource group 5. Selecting your AI Foundry project -After init, you can run commands without `-e` and `-s`: +After init, you can run commands without `--project-endpoint` and `-s`: ```bash azd ai models custom list @@ -173,7 +173,7 @@ azd ai models custom delete --name my-model You can also provide flags during init to skip interactive prompts: ```bash -azd ai models init -e "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" +azd ai models init --project-endpoint "https://my-account.services.ai.azure.com/api/projects/my-project" -s "8861a79b-1234-5678-abcd-1234567890ab" ``` ![Init Command](images/07.jpg) @@ -194,7 +194,7 @@ azd ai models init -e "https://my-account.services.ai.azure.com/api/projects/my- | Flag | Short | Description | |------|-------|-------------| -| `--project-endpoint` | `-e` | Foundry project endpoint URL | +| `--project-endpoint` | `-e` *(deprecated)* | Foundry project endpoint URL | | `--subscription` | `-s` | Azure subscription ID | | `--name` | `-n` | Model name | | `--version` | | Model version (default: "1") | diff --git a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go index fa5d624b390..de406f3eec2 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go @@ -38,6 +38,8 @@ func newCustomCommand() *cobra.Command { "Azure subscription ID") customCmd.PersistentFlags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") + customCmd.PersistentFlags().Lookup("project-endpoint").ShorthandDeprecated = + "use --project-endpoint instead; -e will be removed in a future release" customCmd.AddCommand(newCustomCreateCommand(flags)) customCmd.AddCommand(newCustomListCommand(flags)) @@ -118,8 +120,9 @@ func promptForProject(ctx context.Context, flags *customFlags, azdClient *azdext var err error azdClient, err = azdext.NewAzdClient() if err != nil { - return fmt.Errorf("--project-endpoint (-e) is required when azd is not available.\n\n" + - "Example: azd ai models custom list -e https://.services.ai.azure.com/api/projects/\n\n" + + return fmt.Errorf("--project-endpoint is required when azd is not available.\n\n" + + "Example: azd ai models custom list " + + "--project-endpoint https://.services.ai.azure.com/api/projects/\n\n" + "Or run 'azd ai models init' to set up your project first") } defer azdClient.Close() diff --git a/cli/azd/extensions/azure.ai.models/internal/cmd/init.go b/cli/azd/extensions/azure.ai.models/internal/cmd/init.go index 8826ec72973..da80fa3793c 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/init.go @@ -94,6 +94,8 @@ The init command will: cmd.Flags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") + cmd.Flags().Lookup("project-endpoint").ShorthandDeprecated = + "use --project-endpoint instead; -e will be removed in a future release" cmd.Flags().StringVarP(&flags.projectResourceId, "project-resource-id", "p", "", "ARM resource ID of the Foundry project")