Skip to content

[Agents Extension] Make VNext the only path#7764

Draft
trangevi wants to merge 12 commits intomainfrom
trangevi/remove-vnext-feature-flag
Draft

[Agents Extension] Make VNext the only path#7764
trangevi wants to merge 12 commits intomainfrom
trangevi/remove-vnext-feature-flag

Conversation

@trangevi
Copy link
Copy Markdown
Member

Remove the vnext feature flag, remove any non-vnext logic.

Fixes #7610

Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
Copy link
Copy Markdown
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 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 enableVnextExperience metadata during agent deployment; remove enableHostedAgentVNext checks 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.

Comment thread cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/monitor.go
Signed-off-by: trangevi <trangevi@microsoft.com>
Copy link
Copy Markdown
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Build, tests, and CI all pass, and the two earlier bot comments look addressed in the latest commit. A few things to fix:

  1. No CHANGELOG entry. This is a user-visible change (flag removal, container.scale support dropped, files and sessions commands unhidden by default), and every prior PR in cli/azd/extensions/azure.ai.agents/CHANGELOG.md gets a bullet under the current preview version. Add one, ideally under a "Breaking Changes" subsection given #2 below.

  2. Silent behavior change for users with container.scale.{minReplicas,maxReplicas} in azure.yaml. The Scale field is gone from ContainerSettings and ScaleSettings is gone from schemas/azure.ai.agent.json, where ContainerSettings is additionalProperties: 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 when container.scale is present in the parsed config so users aren't surprised when their replica counts stop taking effect.

  3. "When vnext is enabled" comments are now misleading since vnext is the only path:

    • internal/cmd/listen.go:194
    • internal/project/agent_identity_rbac.go:110
    • internal/cmd/init_locations.go:10 (the TODO can be retired or rewritten)
    • internal/pkg/agents/agent_api/operations.go:560
    • internal/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>
Signed-off-by: trangevi <trangevi@microsoft.com>
Copy link
Copy Markdown
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

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(

Comment thread cli/azd/extensions/azure.ai.agents/cspell.yaml
Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/listen.go
Signed-off-by: trangevi <trangevi@microsoft.com>
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.

Remove the enableHostedAgentVNext requirement on preview launch

3 participants