[Agents Extension] Make VNext the only path#7764
Conversation
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
There was a problem hiding this comment.
Pull request overview
This PR removes the hosted-agent “vnext” feature-flag path from the Azure AI Agents extension and makes the vnext behavior unconditional, deleting the legacy container-management/scale code paths that were only needed for non-vnext.
Changes:
- Always set
enableVnextExperiencemetadata during agent deployment; removeenableHostedAgentVNextchecks throughout the extension. - Remove legacy container lifecycle + scaling configuration (schema/types/client ops/tests) and related command behaviors (show/monitor).
- Make RBAC checks and session/files commands no longer conditional on vnext being enabled.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json | Removes container scale schema definition. |
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go | Makes vnext metadata unconditional; removes non-vnext container start logic. |
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent_test.go | Updates tests to reflect unconditional vnext metadata. |
| cli/azd/extensions/azure.ai.agents/internal/project/config.go | Removes ScaleSettings type and default replica constants. |
| cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go | Runs developer RBAC check regardless of vnext flag. |
| cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac.go | Runs agent identity RBAC regardless of vnext flag; removes isVnextEnabled. |
| cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac_test.go | Removes tests for isVnextEnabled. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations.go | Removes container operation APIs and container logstream method. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/models.go | Removes container model types/enums. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/models_test.go | Removes round-trip tests for removed container models. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/show.go | Uses agent version output only (no container status output). |
| cli/azd/extensions/azure.ai.agents/internal/cmd/show_test.go | Removes container-status printing tests; adds agent-version output tests. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/monitor.go | Switches to session log streaming only; removes container logstream fallback. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/session.go | Removes vnext-gating (Hidden / pre-run validation). |
| cli/azd/extensions/azure.ai.agents/internal/cmd/files.go | Removes vnext-gating (Hidden / pre-run validation) and helper. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/listen.go | Removes vnext-dependent env/config branching (capability host + scale defaults). |
| cli/azd/extensions/azure.ai.agents/internal/cmd/invoke.go | Removes vnext-gating for remote invocations/responses routing. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/init.go | Removes non-vnext default container scale injection. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/init_from_code.go | Removes non-vnext default container scale injection. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/vnext_scale_test.go | Deletes tests that only validated vnext-flag conditional scale behavior. |
Signed-off-by: trangevi <trangevi@microsoft.com>
There was a problem hiding this comment.
Build, tests, and CI all pass, and the two earlier bot comments look addressed in the latest commit. A few things to fix:
-
No CHANGELOG entry. This is a user-visible change (flag removal,
container.scalesupport dropped,filesandsessionscommands unhidden by default), and every prior PR incli/azd/extensions/azure.ai.agents/CHANGELOG.mdgets a bullet under the current preview version. Add one, ideally under a "Breaking Changes" subsection given #2 below. -
Silent behavior change for users with
container.scale.{minReplicas,maxReplicas}inazure.yaml. TheScalefield is gone fromContainerSettingsandScaleSettingsis gone fromschemas/azure.ai.agent.json, whereContainerSettingsisadditionalProperties: false. Depending on how strictly the schema is enforced at runtime, existing configs will either fail validation or have those values silently dropped. At minimum call this out in the CHANGELOG; ideally log a warning on deploy whencontainer.scaleis present in the parsed config so users aren't surprised when their replica counts stop taking effect. -
"When vnext is enabled" comments are now misleading since vnext is the only path:
internal/cmd/listen.go:194internal/project/agent_identity_rbac.go:110internal/cmd/init_locations.go:10(the TODO can be retired or rewritten)internal/pkg/agents/agent_api/operations.go:560internal/project/service_target_agent.go:674(metadata key is a server contract, but the comment reads like a conditional path still exists)
Non-blocking: applyVnextMetadata is the only function name still shaped like a feature-flag gate. The enableVnextExperience key is presumably a server API contract, but the function could be named applyAgentMetadata with a comment noting why the key is what it is.
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac.go:93
- The doc comment says that when a principal ID is empty the function "falls back to polling Entra ID" / identity discovery, but that behavior has been removed in this PR. This makes the comment inaccurate for readers and future maintainers.
Update the comment to reflect the new contract (principal ID must be provided; otherwise assignment is skipped or treated as an error).
// agentIdentities maps agent name → instance identity principal ID. When a principal ID is
// provided (non-empty), the role is assigned directly without Graph API discovery. When empty,
// the function falls back to polling Entra ID for the platform-created service principal.
func EnsureAgentIdentityRBAC(
Signed-off-by: trangevi <trangevi@microsoft.com>
Remove the vnext feature flag, remove any non-vnext logic.
Fixes #7610