fix(azure.ai.agents): suggest azd ai project set, not the removed command - #9365
Merged
Merged
Conversation
…ommand The `missing_project_endpoint` error told users to run `azd ai agent project set <endpoint>`, which no longer exists. That command moved to the azure.ai.projects extension as `azd ai project set`. This was a missed spot when the command moved: every peer extension (azure.ai.projects, azure.ai.connections, azure.ai.toolboxes, azure.ai.skills) already emits the correct text, and this extension's own project_context_store.go already documents the command as removed. The new suggestion is also functionally correct here: `azd ai project set` writes `extensions.ai-projects.context`, which getProjectContext already reads as the canonical key. Adds a regression assertion on the suggestion string so this cannot drift again silently. Fixes #9331 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e7ba2e0e-80cf-4226-b56e-ac7cbbc7338f
glharper
requested review from
JeffreyCA,
huimiu,
hund030,
therealjohn,
trangevi and
trrwilson
as code owners
July 30, 2026 14:35
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Contributor
There was a problem hiding this comment.
Pull request overview
Corrects the agents extension’s recovery guidance for missing Foundry project endpoints.
Changes:
- Replaces the removed command with
azd ai project set. - Adds regression assertions for the supported and removed commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
internal/cmd/project_endpoint.go |
Corrects the suggested command. |
internal/cmd/project_endpoint_test.go |
Prevents stale command guidance from returning. |
trangevi
approved these changes
Jul 30, 2026
trangevi
added a commit
that referenced
this pull request
Jul 30, 2026
…leases (#9371) * chore: prepare azure.ai.agents 1.0.0-beta.8 release Bump version and add changelog for 10 PRs since beta.7: - Features: max_stalls early-stopping (#9314), invocations protocol 2.0.0 default (#9327) - Bug fixes: #9365, #9328, #9291, #9290, #9212, #9211, #9280, #9237 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: prepare azure.ai.projects 1.0.0-beta.4 release Bump version and add changelog for 1 PR since beta.3: - Bug fix: cap Foundry ARM deployment names to 64 chars (#9292) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: add imatiach to cspell contributor aliases Fix cspell-ext CI gate failure for the azure.ai.agents CHANGELOG entry referencing @imatiach-msft (PR #9314). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9331
Problem
When
azure.ai.agentscan't resolve a Foundry project endpoint,noProjectEndpointError()returned a suggestion telling the user to run:That command no longer exists — it moved to the
azure.ai.projectsextension asazd ai project set. A user following the suggestion hitsunknown command, with no path forward.This was a missed spot when the command moved. Every peer extension already emits the correct text:
azure.ai.projects/internal/cmd/project_endpoint.go:135azd ai project setazure.ai.connections/internal/foundry/projectctx/validator.go:108azd ai project setazure.ai.toolboxes/internal/foundry/projectctx/validator.go:108azd ai project setazure.ai.skills/internal/cmd/endpoint.go:191azd ai project setazure.ai.agents/internal/cmd/project_endpoint.go:130azd ai agent project set❌This extension's own
project_context_store.go:19already describes the command as removed, so only the user-facing string was stale.Fix
One-line change to the suggestion text.
The new suggestion is also functionally correct here, not just cosmetically:
azd ai project setpersists toextensions.ai-projects.context, andgetProjectContext(project_context_store.go) already reads that key as the canonical source, ahead of the legacy fallback. So a user who follows the corrected suggestion actually unblocks themselves.Regression coverage
TestNoProjectEndpointErrorpreviously asserted only the error code and category, which is why this drifted unnoticed. It now also asserts the suggestion namesazd ai project setand does not containazd ai agent project set.Verified the assertion is meaningful —
"azd ai agent project set"does not contain"azd ai project set"as a substring, so the newassert.Containsfails against the old string.Validation
From
cli/azd/extensions/azure.ai.agents:go build ./...— cleango test ./internal/cmd/ -count=1— ok (full package, 22.0s)gofmt -s -l ./internal— no outputgolangci-lint run ./internal/cmd/...— 0 issuesNotes
cli/azdchanges, so this needs no core release.go.mod/go.sumchanges.cli/azd/AGENTS.md,CHANGELOG.mdis intentionally left to the release/version-bump PR.