Skip to content
2 changes: 1 addition & 1 deletion cli/azd/extensions/azure.ai.finetune/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cli/azd/extensions/azure.ai.models/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions cli/azd/extensions/azure.ai.models/design/design-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <endpoint>] [-s <subscription>] [-p <resource-id>] [-n <env-name>]
azd ai models init [--project-endpoint <endpoint>] [-s <subscription>] [-p <resource-id>] [-n <env-name>]
```

**Flow:**
Expand All @@ -268,7 +268,7 @@ azd ai models init [-e <endpoint>] [-s <subscription>] [-p <resource-id>] [-n <e
| Flag | Required | Description |
|------|----------|-------------|
| `--subscription, -s` | No | Azure subscription ID |
| `--project-endpoint, -e` | No | Foundry project endpoint URL |
| `--project-endpoint` | No | Foundry project endpoint URL |
| `--project-resource-id, -p` | No | ARM resource ID of the Foundry project |
| `--environment, -n` | No | Name of the azd environment to use |

Expand Down Expand Up @@ -338,7 +338,7 @@ azd ai models custom create --name my-model --source ./model-weights/ --base-mod
| `--description` | No | Human-readable description |
| `--base-model` | No | Base model architecture tag (e.g., FW-DeepSeek-v3.1) |
| `--azcopy-path` | No | Explicit path to azcopy binary |
| `--project-endpoint, -e` | No | Override project endpoint (reads from env if not set) |
| `--project-endpoint` | No | Override project endpoint (reads from env if not set) |
| `--subscription, -s` | No | Override subscription ID |

*Either `--source` or `--source-file` is required.
Expand Down Expand Up @@ -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 │
Expand Down
24 changes: 12 additions & 12 deletions cli/azd/extensions/azure.ai.models/docs/installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,32 @@ 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

```bash
azd ai models custom list -e <project_endpoint> -s <subscription_id>
azd ai models custom list --project-endpoint <project_endpoint> -s <subscription_id>
```

**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)

### 5.2 Create a Custom Model

```bash
azd ai models custom create -e <project_endpoint> -s <subscription_id> --name <model-name> --source <local_path_or_remote_url>
azd ai models custom create --project-endpoint <project_endpoint> -s <subscription_id> --name <model-name> --source <local_path_or_remote_url>
```

**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:**
Expand All @@ -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 <project_endpoint> -s <subscription_id> --name <model-name>
azd ai models custom show --project-endpoint <project_endpoint> -s <subscription_id> --name <model-name>
```

### 5.4 Delete a Custom Model

```bash
azd ai models custom delete -e <project_endpoint> -s <subscription_id> --name <model-name>
azd ai models custom delete --project-endpoint <project_endpoint> -s <subscription_id> --name <model-name>
```

Use `--force` to skip the confirmation prompt:

```bash
azd ai models custom delete -e <project_endpoint> -s <subscription_id> --name <model-name> --force
azd ai models custom delete --project-endpoint <project_endpoint> -s <subscription_id> --name <model-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.

Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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") |
Expand Down
7 changes: 5 additions & 2 deletions cli/azd/extensions/azure.ai.models/internal/cmd/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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://<account>.services.ai.azure.com/api/projects/<project>\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://<account>.services.ai.azure.com/api/projects/<project>\n\n" +
"Or run 'azd ai models init' to set up your project first")
}
defer azdClient.Close()
Expand Down
2 changes: 2 additions & 0 deletions cli/azd/extensions/azure.ai.models/internal/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading