[Agents extensions] Endpoint changes - #7545
Conversation
Signed-off-by: trangevi <trangevi@microsoft.com>
There was a problem hiding this comment.
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
agentVersionfrom several client method signatures. - Adjusted
monitorandfilescommands to call the updated client methods (and removed the files flow’s hard requirement on agent version). - Fixed
filescommandPersistentPreRunEchaining 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
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Migrate the rest of the vnext handling over to the new agents endpoints