Skip to content

[Agents extensions] Endpoint changes - #7545

Merged
trangevi merged 3 commits into
mainfrom
trangevi/agent-endpoint-changes
Apr 8, 2026
Merged

[Agents extensions] Endpoint changes#7545
trangevi merged 3 commits into
mainfrom
trangevi/agent-endpoint-changes

Conversation

@trangevi

@trangevi trangevi commented Apr 6, 2026

Copy link
Copy Markdown
Member

Migrate the rest of the vnext handling over to the new agents endpoints

Signed-off-by: trangevi <trangevi@microsoft.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

Migrates remaining “vnext” hosted-agent interactions in the azure.ai.agents extension to the newer session-based agent endpoints, removing agent-version scoping where it’s no longer required.

Changes:

  • Updated agent API operations to use new session/file endpoints and removed agentVersion from several client method signatures.
  • Adjusted monitor and files commands to call the updated client methods (and removed the files flow’s hard requirement on agent version).
  • Fixed files command PersistentPreRunE chaining to avoid Cobra recursion and added a regression test.

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.agents/internal/pkg/agents/agent_api/operations.go Switches session log streaming and session file operations to the new endpoint shapes and drops agentVersion parameters.
cli/azd/extensions/azure.ai.agents/internal/cmd/monitor.go Updates session logstream call site to match the new client signature.
cli/azd/extensions/azure.ai.agents/internal/cmd/files.go Fixes PersistentPreRunE chaining (prevents infinite recursion) and updates file-operation calls to the new endpoints/signatures.
cli/azd/extensions/azure.ai.agents/internal/cmd/files_test.go Adds a regression test to ensure files subcommands don’t trigger PersistentPreRunE recursion.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Endpoint migration and PersistentPreRunE fix both look correct - clean change overall.

monitor.go:96-102: info.Version is validated unconditionally, but session logstream (line 152) no longer needs it. If version metadata isn't set, monitor --session fails with "agent version could not be resolved" even though the API call works without it. Consider deferring the version check to the container-logstream branch only (after the sessionID == "" check at line 161).

Minor: resolveFilesContext still sets Version: info.Version (~line 158) though no file operation reads it anymore. The help text (line 76) also still says "name, version, endpoint" - could drop "version". Small cleanup for a follow-up.

trangevi added 2 commits April 8, 2026 09:05
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
@trangevi trangevi linked an issue Apr 8, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Review may take a bit longer — reach out to @rajeshkamal5050 or @kristenwomack if you'd like to discuss prioritization.

@trangevi
trangevi enabled auto-merge (squash) April 8, 2026 16:32
@trangevi
trangevi merged commit 4392247 into main Apr 8, 2026
18 of 19 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.

Update to use new agent endpoint for monitor, show, files

5 participants