Skip to content

Conversation

@achauhan-scc
Copy link
Member

This pull request adds support for specifying a project endpoint URL to the init command in the Azure AI Foundry Fine Tuning extension. Users can now initialize their environment using either an ARM project resource ID or a project endpoint URL, improving flexibility and usability. The update includes new flag options, endpoint parsing, and logic to resolve project details from the endpoint.

New project endpoint support:

  • Added a --project-endpoint (-e) flag to the init command, allowing users to specify the Azure AI Foundry project endpoint URL as an alternative to the ARM resource ID. [1] [2]
  • Implemented parseProjectEndpoint and findProjectByEndpoint functions to extract account and project names from the endpoint URL, search for the corresponding resources in Azure, and retrieve project details.
  • Updated the environment initialization logic to handle project endpoint URLs, including prompting for subscription ID if not provided, and using a spinner for user feedback during the search.

Flag and parameter changes:

  • Changed the --project flag to --project-resource-id (-p) and updated its description for clarity. Added new flags for --subscription (-s), --project-endpoint (-e), and changed --environment short flag from -e to -n.

Other updates:

  • Version bumped to 0.0.12-preview in extension.yaml, CHANGELOG.md, and version.txt. [1] [2] [3]
  • Updated logic throughout init.go to support the new endpoint-based workflow, including environment variable assignments and command argument construction. [1] [2]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the fine-tuning extension’s init command to support initializing via an Azure AI Foundry project endpoint URL, alongside the existing ARM resource ID flow, and bumps the extension version to 0.0.12-preview.

Changes:

  • Added new flags to init (--project-endpoint/-e, --subscription/-s, renamed --project to --project-resource-id/-p, changed --environment short flag to -n, and renamed --source to --working-directory/-w).
  • Implemented parseProjectEndpoint and findProjectByEndpoint plus new logic in ensureEnvironment to resolve a project from the endpoint, prompt for subscription, and populate AZURE_* environment values.
  • Updated version metadata in version.txt, extension.yaml, and CHANGELOG.md with a new entry describing the endpoint support.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cli/azd/extensions/azure.ai.finetune/version.txt Bumps the extension version to 0.0.12-preview to reflect the new functionality.
cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go Adds endpoint-parsing and project-discovery logic, new flags (subscription, project-endpoint), and updates environment initialization to work with either project endpoint or ARM resource ID.
cli/azd/extensions/azure.ai.finetune/extension.yaml Updates the extension manifest’s version to 0.0.12-preview to align with the code changes.
cli/azd/extensions/azure.ai.finetune/CHANGELOG.md Adds a 0.0.12-preview changelog entry describing the new project-endpoint parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +309 to +313
// Handle project endpoint URL - extract account/project names and find the ARM resource
if flags.projectEndpoint != "" {
accountName, projectName, err := parseProjectEndpoint(flags.projectEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to parse project endpoint: %w", err)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new --project-endpoint and existing --project-resource-id flags, if a user specifies both, this branch will silently take precedence and ignore the resource ID. To avoid ambiguous behavior in the CLI API, consider validating that these two options are mutually exclusive (e.g., early in Run or at the top of ensureEnvironment) and returning a clear error when both are provided.

Copilot uses AI. Check for mistakes.
@achauhan-scc achauhan-scc merged commit e4cab71 into Azure:main Jan 23, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants