Skip to content

chore(azure.ai.*): point no azd project guidance at azd ai agent init#8374

Merged
trangevi merged 1 commit into
Azure:mainfrom
therealjohn:chore/azure-ai-context-init-command
May 26, 2026
Merged

chore(azure.ai.*): point no azd project guidance at azd ai agent init#8374
trangevi merged 1 commit into
Azure:mainfrom
therealjohn:chore/azure-ai-context-init-command

Conversation

@therealjohn

@therealjohn therealjohn commented May 26, 2026

Copy link
Copy Markdown
Contributor

What this fixes

When a developer runs azd ai connection context, azd ai project context, azd ai routines context, or azd ai skills context outside an azd project, the extensions print a warning that suggests azd init. Following that suggestion gets them a generic azd project that the rest of the azure.ai.* family can't actually operate on -- no agent service target, no Foundry endpoint wiring, no model deployment.

This PR points all four extensions at azd ai agent init instead, which scaffolds a project the family is actually designed to work with.

Why it matters

A first-time azure.ai.* user is most likely to hit this message exactly when they're trying to set up a new project. The current suggestion sends them down a path that looks like it's working until much later, when they discover the project shape is wrong and they have to start over.

Scope

One-line change per file (string only). No runtime behavior change beyond the printed suggestion.

Fixes #8379

…nit`

When `azd ai <extension> context` is run outside an azd project, the
extensions print a yellow warning with a suggested next command.
Previously they recommended bare `azd init`, which scaffolds a generic
azd project but does not wire up the AI agent service target, model
deployment selection, or Foundry project endpoint that every
`azure.ai.*` extension assumes is in place.

`azd ai agent init` is the correct entry point: it goes through the
Foundry-aware init pre-flow, picks a sample, and writes an
`azure.yaml` that the rest of the `azure.ai.*` family can act on.

Update the guidance in four sibling extensions to match what the
agents extension actually expects:

* azure.ai.connections
* azure.ai.projects
* azure.ai.routines
* azure.ai.skills

One-line change per file; no runtime behavior change beyond the
printed string.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the “no azd project found” guidance in the azure.ai.* extensions so users are directed to azd ai agent init (which scaffolds an AI-agent-compatible project) instead of azd init (which can create a generic project shape that the azure.ai.* extensions can’t effectively use).

Changes:

  • Update the suggested remediation command from azd initazd ai agent init in the “no azd project” warning across four extensions.
  • Keep behavior unchanged aside from the printed suggestion string.

Reviewed changes

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

File Description
cli/azd/extensions/azure.ai.skills/internal/cmd/context.go Update “no azd project” suggestion to azd ai agent init.
cli/azd/extensions/azure.ai.routines/internal/cmd/context.go Update “no azd project” suggestion to azd ai agent init.
cli/azd/extensions/azure.ai.projects/internal/cmd/context.go Update “no azd project” suggestion to azd ai agent init.
cli/azd/extensions/azure.ai.connections/internal/cmd/context.go Update “no azd project” suggestion to azd ai agent init.

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label May 26, 2026
@trangevi

Copy link
Copy Markdown
Member

/check-enforcer override

@trangevi trangevi enabled auto-merge (squash) May 26, 2026 23:47
@trangevi trangevi merged commit 1929e61 into Azure:main May 26, 2026
75 of 80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect suggestions to use azd init instead of azd ai agent init

3 participants