Skip to content

[azure.ai.agents] Use v1 for endpoint requests#8347

Open
glharper wants to merge 1 commit into
mainfrom
glharper/fix-ai-agents-endpoint-api-version-v1
Open

[azure.ai.agents] Use v1 for endpoint requests#8347
glharper wants to merge 1 commit into
mainfrom
glharper/fix-ai-agents-endpoint-api-version-v1

Conversation

@glharper
Copy link
Copy Markdown
Member

Summary

  • use api-version=v1 for Azure AI Agents hosted endpoint protocol and session requests
  • keep agent management/deploy/eval/file/doctor APIs on 2025-11-15-preview
  • update generated endpoint URLs, help text, and tests

Fixes #8329

Testing

  • go test ./...
  • golangci-lint run ./...

Use v1 for hosted agent endpoint protocol and session requests while preserving the preview version for management APIs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@glharper glharper marked this pull request as ready for review May 23, 2026 13:17
Copilot AI review requested due to automatic review settings May 23, 2026 13:17
@github-actions
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.

@github-actions github-actions Bot added the ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions label May 23, 2026
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 updates the Azure AI Agents extension to use api-version=v1 for hosted agent endpoint protocol URLs and session lifecycle requests, while keeping agent management/deploy/eval/file/doctor APIs on 2025-11-15-preview (per issue #8329).

Changes:

  • Introduces a single source of truth constant (AgentEndpointAPIVersion = "v1") for hosted endpoint protocol + session requests.
  • Updates endpoint URL generation/help text to emit api-version=v1 and adjusts related unit tests.
  • Threads the endpoint API version through remote invoke session creation and LRO polling.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go Switches displayed protocol endpoint URLs to use the hosted endpoint API version constant.
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent_test.go Updates endpoint URL expectations to api-version=v1 and improves symlink skip logic.
cli/azd/extensions/azure.ai.agents/internal/pkg/paths/paths_test.go Improves symlink skip logic for permission-related failures.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations_test.go Updates session API version in tests to use the new endpoint API version constant.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/api_versions.go Adds AgentEndpointAPIVersion = "v1" constant.
cli/azd/extensions/azure.ai.agents/internal/cmd/show_test.go Updates expected shown endpoint URLs to api-version=v1.
cli/azd/extensions/azure.ai.agents/internal/cmd/session.go Uses hosted endpoint API version for session create/show/delete/list commands.
cli/azd/extensions/azure.ai.agents/internal/cmd/invoke.go Updates invoke help/example URLs and threads API version through version-session creation + LRO fallback polling.
cli/azd/extensions/azure.ai.agents/internal/cmd/invoke_test.go Updates URL validation and function seams to account for the new API version parameter.
cli/azd/extensions/azure.ai.agents/internal/cmd/agent_endpoint_test.go Updates parsed/built endpoint URL expectations to api-version=v1 and preserves custom versions.
cli/azd/extensions/azure.ai.agents/internal/cmd/agent_context.go Exposes AgentEndpointAPIVersion in cmd package as an alias to the agent_api constant.

}

if err := handleInvocationResponse(ctx, resp, "", "", agentKey, a.httpTimeout(), nil); err != nil {
if err := handleInvocationResponse(ctx, resp, "", "", agentKey, a.httpTimeout(), "", nil); err != nil {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong API version for requests

2 participants