From c470fd1a5990bcf2d677415edb61cf61e1fcd999 Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Fri, 3 May 2024 17:00:02 +0000 Subject: [PATCH 1/9] Test aks --- .../internal/repository/detect_confirm_apphost.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cli/azd/internal/repository/detect_confirm_apphost.go b/cli/azd/internal/repository/detect_confirm_apphost.go index 6dd319cc6bc..975d8c08288 100644 --- a/cli/azd/internal/repository/detect_confirm_apphost.go +++ b/cli/azd/internal/repository/detect_confirm_apphost.go @@ -83,13 +83,12 @@ func (d *detectConfirmAppHost) render(ctx context.Context) error { d.console.Message(ctx, " "+output.WithHighLightFormat(projectDisplayName(d.AppHost))) d.console.Message(ctx, " "+"Detected in: "+output.WithHighLightFormat(relSafe(d.root, d.AppHost.Path))) d.console.Message(ctx, "") - - if d.warningMessage != "" { - d.console.Message(ctx, d.warningMessage) - d.console.Message(ctx, "") - } - - d.console.Message(ctx, "azd will generate the files necessary to host your app on Azure.") + d.console.Message( + ctx, + "azd will generate the files necessary to host your app on Azure using "+color.MagentaString( + "Azure Container Apps", + )+".\n", + ) return nil } From bb62b715077b668c2ae1a4da80802d06126664bb Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Wed, 25 Mar 2026 07:38:22 -0700 Subject: [PATCH 2/9] Remove -e short flag from --project-endpoint in AI extensions The azure.ai.models and azure.ai.finetune extensions were using -e as a shorthand for --project-endpoint, which conflicts with azd's global -e for --environment. This collision caused #7271 when azd tried to parse -e globally and received a URL instead of an environment name. Drop the -e shorthand entirely from --project-endpoint. Users can still pass the full --project-endpoint flag. The -p shorthand was not usable as a replacement because init commands already use -p for --project-resource-id. Closes #7308 Closes #7309 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go | 2 +- cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go | 2 +- cli/azd/extensions/azure.ai.models/internal/cmd/custom.go | 2 +- cli/azd/extensions/azure.ai.models/internal/cmd/init.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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..fc32f3d8b55 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go @@ -146,7 +146,7 @@ func newInitCommand(rootFlags rootFlagsDefinition) *cobra.Command { cmd.Flags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - cmd.Flags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", + cmd.Flags().StringVar(&flags.projectEndpoint, "project-endpoint", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") cmd.Flags().StringVarP(&flags.src, "working-directory", "w", "", 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..66f7a271ab0 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go @@ -41,7 +41,7 @@ func newOperationCommand() *cobra.Command { cmd.PersistentFlags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID (enables implicit init if environment not configured)") - cmd.PersistentFlags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", + cmd.PersistentFlags().StringVar(&flags.projectEndpoint, "project-endpoint", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") cmd.AddCommand(newOperationSubmitCommand()) 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..2d50a263b6a 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go @@ -36,7 +36,7 @@ func newCustomCommand() *cobra.Command { customCmd.PersistentFlags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - customCmd.PersistentFlags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", + customCmd.PersistentFlags().StringVar(&flags.projectEndpoint, "project-endpoint", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") customCmd.AddCommand(newCustomCreateCommand(flags)) 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..07951c62df7 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/init.go @@ -92,7 +92,7 @@ The init command will: cmd.Flags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - cmd.Flags().StringVarP(&flags.projectEndpoint, "project-endpoint", "e", "", + cmd.Flags().StringVar(&flags.projectEndpoint, "project-endpoint", "", "Azure AI Foundry project endpoint URL (e.g., https://account.services.ai.azure.com/api/projects/project-name)") cmd.Flags().StringVarP(&flags.projectResourceId, "project-resource-id", "p", "", From 98506445103edb8f0340405dfecaea765d1c6cdf Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:48:21 -0700 Subject: [PATCH 3/9] ci: retry transient CI failures From 0213e4c5fcf97e7379c876f8c37f4124a8f5495f Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:57:22 -0700 Subject: [PATCH 4/9] fix: remove leftover -e shorthand references from error messages and docs Clean up error messages, validation text, design spec, and installation guide that still referenced the removed (-e) shorthand for --project-endpoint. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../extensions/azure.ai.finetune/internal/cmd/validation.go | 2 +- cli/azd/extensions/azure.ai.models/design/design-spec.md | 2 +- cli/azd/extensions/azure.ai.models/docs/installation-guide.md | 2 +- cli/azd/extensions/azure.ai.models/internal/cmd/custom.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) 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/design/design-spec.md b/cli/azd/extensions/azure.ai.models/design/design-spec.md index 747e5d8a842..b958816921d 100644 --- a/cli/azd/extensions/azure.ai.models/design/design-spec.md +++ b/cli/azd/extensions/azure.ai.models/design/design-spec.md @@ -482,7 +482,7 @@ Custom commands resolve the project endpoint using a 3-tier priority: ┌─────────────────────────────────────────────────────────────────────────────┐ │ Project Endpoint Resolution │ │ │ -│ Priority 1: Explicit --project-endpoint (-e) flag │ +│ Priority 1: Explicit --project-endpoint flag │ │ └─► Use directly, highest priority │ │ │ │ Priority 2: azd environment variables │ diff --git a/cli/azd/extensions/azure.ai.models/docs/installation-guide.md b/cli/azd/extensions/azure.ai.models/docs/installation-guide.md index 2a730360b5b..e32d7098cf2 100644 --- a/cli/azd/extensions/azure.ai.models/docs/installation-guide.md +++ b/cli/azd/extensions/azure.ai.models/docs/installation-guide.md @@ -77,7 +77,7 @@ azd auth login ## Step 5: Use Custom Model Commands -You can use the custom model commands by providing `--project-endpoint (-e)` and `--subscription (-s)` flags directly. +You can use the custom model commands by providing `--project-endpoint` and `--subscription (-s)` flags directly. ### 5.1 List Custom Models 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 2d50a263b6a..76062b31394 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go @@ -118,8 +118,8 @@ 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() From 2c597040b578154952ab8f0353de7673ee7569a9 Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:24:21 -0700 Subject: [PATCH 5/9] fix: add missing color import in detect_confirm_apphost.go --- cli/azd/internal/repository/detect_confirm_apphost.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/azd/internal/repository/detect_confirm_apphost.go b/cli/azd/internal/repository/detect_confirm_apphost.go index 975d8c08288..25721a193dc 100644 --- a/cli/azd/internal/repository/detect_confirm_apphost.go +++ b/cli/azd/internal/repository/detect_confirm_apphost.go @@ -13,6 +13,7 @@ import ( "github.com/azure/azure-dev/cli/azd/pkg/apphost" "github.com/azure/azure-dev/cli/azd/pkg/input" "github.com/azure/azure-dev/cli/azd/pkg/output" + "github.com/fatih/color" ) // detectConfirmAppHost handles prompting for confirming the detected project with an app host. From dfb9ff8372cc210a7a730bbcaed4dfd866ae109a Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:32:46 -0700 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20address=20wbreza=20review=20?= =?UTF-8?q?=E2=80=94=20revert=20unrelated=20apphost=20changes,=20update=20?= =?UTF-8?q?remaining=20-e=20references=20in=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../extensions/azure.ai.finetune/CHANGELOG.md | 2 +- .../azure.ai.models/design/design-spec.md | 6 ++--- .../docs/installation-guide.md | 22 +++++++++---------- .../repository/detect_confirm_apphost.go | 14 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) 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.models/design/design-spec.md b/cli/azd/extensions/azure.ai.models/design/design-spec.md index b958816921d..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` | | Foundry project endpoint URL | | `--subscription` | `-s` | Azure subscription ID | | `--name` | `-n` | Model name | | `--version` | | Model version (default: "1") | diff --git a/cli/azd/internal/repository/detect_confirm_apphost.go b/cli/azd/internal/repository/detect_confirm_apphost.go index 25721a193dc..6dd319cc6bc 100644 --- a/cli/azd/internal/repository/detect_confirm_apphost.go +++ b/cli/azd/internal/repository/detect_confirm_apphost.go @@ -13,7 +13,6 @@ import ( "github.com/azure/azure-dev/cli/azd/pkg/apphost" "github.com/azure/azure-dev/cli/azd/pkg/input" "github.com/azure/azure-dev/cli/azd/pkg/output" - "github.com/fatih/color" ) // detectConfirmAppHost handles prompting for confirming the detected project with an app host. @@ -84,12 +83,13 @@ func (d *detectConfirmAppHost) render(ctx context.Context) error { d.console.Message(ctx, " "+output.WithHighLightFormat(projectDisplayName(d.AppHost))) d.console.Message(ctx, " "+"Detected in: "+output.WithHighLightFormat(relSafe(d.root, d.AppHost.Path))) d.console.Message(ctx, "") - d.console.Message( - ctx, - "azd will generate the files necessary to host your app on Azure using "+color.MagentaString( - "Azure Container Apps", - )+".\n", - ) + + if d.warningMessage != "" { + d.console.Message(ctx, d.warningMessage) + d.console.Message(ctx, "") + } + + d.console.Message(ctx, "azd will generate the files necessary to host your app on Azure.") return nil } From c6e5a7e2e3dc8a6fc2565a690ff1ab9e6447e790 Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:48:21 -0700 Subject: [PATCH 7/9] ci: retry transient CI failures From 681f7b7e8a93a009e39e34bd4f322cbbf221467d Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:04:26 -0700 Subject: [PATCH 8/9] fix: deprecate -e shorthand instead of removing it Keep -e working for backward compatibility with existing portal CLI commands and user workflows. Mark it as deprecated via pflag's ShorthandDeprecated so users see a warning nudging them to --project-endpoint. Full removal planned after April 2025. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go | 4 +++- .../azure.ai.finetune/internal/cmd/operations.go | 4 +++- .../extensions/azure.ai.models/docs/installation-guide.md | 2 +- cli/azd/extensions/azure.ai.models/internal/cmd/custom.go | 7 +++++-- cli/azd/extensions/azure.ai.models/internal/cmd/init.go | 4 +++- 5 files changed, 15 insertions(+), 6 deletions(-) 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 fc32f3d8b55..36386a761c1 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go @@ -146,8 +146,10 @@ func newInitCommand(rootFlags rootFlagsDefinition) *cobra.Command { cmd.Flags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - cmd.Flags().StringVar(&flags.projectEndpoint, "project-endpoint", "", + 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 after April 2025" 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 66f7a271ab0..33b6b2dab00 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go @@ -41,8 +41,10 @@ func newOperationCommand() *cobra.Command { cmd.PersistentFlags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID (enables implicit init if environment not configured)") - cmd.PersistentFlags().StringVar(&flags.projectEndpoint, "project-endpoint", "", + 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 after April 2025" cmd.AddCommand(newOperationSubmitCommand()) cmd.AddCommand(newOperationShowCommand()) diff --git a/cli/azd/extensions/azure.ai.models/docs/installation-guide.md b/cli/azd/extensions/azure.ai.models/docs/installation-guide.md index 737f9714f98..42f4e8829f8 100644 --- a/cli/azd/extensions/azure.ai.models/docs/installation-guide.md +++ b/cli/azd/extensions/azure.ai.models/docs/installation-guide.md @@ -194,7 +194,7 @@ azd ai models init --project-endpoint "https://my-account.services.ai.azure.com/ | Flag | Short | Description | |------|-------|-------------| -| `--project-endpoint` | | 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 76062b31394..9c4dadc09eb 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go @@ -36,8 +36,10 @@ func newCustomCommand() *cobra.Command { customCmd.PersistentFlags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - customCmd.PersistentFlags().StringVar(&flags.projectEndpoint, "project-endpoint", "", + 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 after April 2025" customCmd.AddCommand(newCustomCreateCommand(flags)) customCmd.AddCommand(newCustomListCommand(flags)) @@ -119,7 +121,8 @@ func promptForProject(ctx context.Context, flags *customFlags, azdClient *azdext azdClient, err = azdext.NewAzdClient() if err != nil { 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" + + "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 07951c62df7..ef8855d1565 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/init.go @@ -92,8 +92,10 @@ The init command will: cmd.Flags().StringVarP(&flags.subscriptionId, "subscription", "s", "", "Azure subscription ID") - cmd.Flags().StringVar(&flags.projectEndpoint, "project-endpoint", "", + 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 after April 2025" cmd.Flags().StringVarP(&flags.projectResourceId, "project-resource-id", "p", "", "ARM resource ID of the Foundry project") From 1d1ec487e876502a49ea636a18a6e74622a4fd6f Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:41:31 -0700 Subject: [PATCH 9/9] fix: update deprecation date and add models CHANGELOG entry - Update ShorthandDeprecated messages from 'April 2025' to 'a future release' - Add -e deprecation entry to azure.ai.models CHANGELOG Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go | 2 +- cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go | 2 +- cli/azd/extensions/azure.ai.models/CHANGELOG.md | 1 + cli/azd/extensions/azure.ai.models/internal/cmd/custom.go | 2 +- cli/azd/extensions/azure.ai.models/internal/cmd/init.go | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) 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 36386a761c1..179f85e397e 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go @@ -149,7 +149,7 @@ 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 after April 2025" + "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 33b6b2dab00..8d58df95bcd 100644 --- a/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go +++ b/cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go @@ -44,7 +44,7 @@ func newOperationCommand() *cobra.Command { 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 after April 2025" + "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.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/internal/cmd/custom.go b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go index 9c4dadc09eb..de406f3eec2 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/custom.go @@ -39,7 +39,7 @@ func newCustomCommand() *cobra.Command { 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 after April 2025" + "use --project-endpoint instead; -e will be removed in a future release" customCmd.AddCommand(newCustomCreateCommand(flags)) customCmd.AddCommand(newCustomListCommand(flags)) 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 ef8855d1565..da80fa3793c 100644 --- a/cli/azd/extensions/azure.ai.models/internal/cmd/init.go +++ b/cli/azd/extensions/azure.ai.models/internal/cmd/init.go @@ -95,7 +95,7 @@ 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 after April 2025" + "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")